tweetsmash-api
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Uses the TweetSmash REST API to fetch bookmarks, inspect labels, and add or remove labels from saved tweets. Use when integrating TweetSmash into scripts, agents, workflows, cron jobs, or internal tools that need bookmark retrieval, filtering, pagination, or label management. Do not use for direct browser automation inside TweetSmash, unrelated X or Twitter APIs, or tasks that only need product marketing copy.
10installs
Sourcepedronauck/skills
Added on
NPX Install
npx skill4agent add pedronauck/skills tweetsmash-apiTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →TweetSmash API
Use this skill to work directly with the TweetSmash REST API after verifying the current docs. Read before choosing an endpoint. Read only when bookmark filtering is required.
references/api-reference.mdreferences/bookmarks-filters.mdProcedures
Step 1: Validate Credentials and Scope
- Confirm that a TweetSmash API key is available before making requests. Prefer in the shell environment.
TWEETSMASH_API_KEY - Read to confirm the current endpoint, required headers, rate limits, and status codes.
references/api-reference.md - If the task requires bookmark filtering or pagination, read .
references/bookmarks-filters.md
Step 2: Build the Request
- Use on every request.
Authorization: Bearer $TWEETSMASH_API_KEY - Use for all examples in this skill. Keep the base URL as
Content-Type: application/json.https://api.tweetsmash.com/v1 - If the task fetches bookmarks with filters, execute with the needed flags to generate a correctly encoded URL.
python3 scripts/build-bookmarks-url.py - If the task adds labels, start from and fill in
assets/add-labels-body.jsonplus eithertweet_idsorlabel_id.label_name - If the task removes labels, start from and fill in
assets/remove-labels-body.jsonplustweet_ids.label_name
Step 3: Execute the Correct Endpoint
- Fetch bookmarks with . Use the URL from
GET /bookmarkswhen filters, search, or cursors are present.scripts/build-bookmarks-url.py - List labels with when the task needs current label IDs, label names, or usage counts.
GET /labels - Add labels with when the task needs to organize one or more bookmarked tweets.
POST /labels/add - Remove labels with when the task needs to clean up or reclassify bookmarked tweets.
POST /labels/remove - Use cURL for quick execution or translate the same request into the caller’s runtime only after the endpoint and payload are confirmed.
Step 4: Verify the Response
- Confirm that the response JSON contains before reporting success.
"status": true - For bookmark reads, inspect ,
meta.next_cursor, andmeta.limitwhen pagination matters.meta.total_count - For label mutations, confirm the success message matches the intended action.
- If the task depends on label existence, call again after a mutation to verify the resulting state.
GET /labels
Step 5: Return a Usable Result
- Summarize the request method, endpoint, and effective filters or payload fields that were used.
- Return the response body or a structured summary, depending on the caller’s requested output format.
- If follow-up pagination is possible, expose so the next request can continue from the prior page.
meta.next_cursor
Error Handling
- If authentication fails with , confirm that the bearer token is present, non-empty, and taken from the correct TweetSmash account.
401 - If the API returns , stop and report that the current plan does not permit the requested API access.
402 - If the API returns , stop sending additional requests, note the documented limit of 100 requests per hour per API key, and retry later.
429 - If a bookmark query becomes hard to assemble by hand, rerun and rebuild the URL instead of manually concatenating query strings.
python3 scripts/build-bookmarks-url.py --help - If a label mutation is ambiguous, list labels first with and then rerun the mutation using the confirmed label identifier or label name.
GET /labels