Tweetsmash Exports API
Turn a selection of saved posts into a file.
Turn a selection of saved posts into a file.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tweetsmash-com:tweetsmash-com-exports-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Tweetsmash Exports API
version: 1.0.0
summary: Read, label, filter and export your saved X (Twitter) posts.
description: 'The Tweetsmash REST API returns the X (Twitter) posts a user has saved to Tweetsmash, as JSON with unrolled threads and labels, and lets a caller label, filter and export them.
It reads only the authenticated account''s own saved posts. It cannot search public X, and it cannot post, reply, like or follow.
Authentication is a Bearer API key created at https://www.tweetsmash.com/integrations/api. See https://www.tweetsmash.com/auth.md.
The same account is also reachable over the Model Context Protocol at https://mcp.tweetsmash.com/api/mcp — see https://www.tweetsmash.com/.well-known/mcp/server-card.json.
Versioning: the version lives in the path (/v1). Inside a version we will not remove or rename a field, change a field''s type, remove an endpoint, or add a required parameter. New fields, new optional parameters, new error codes and new enum values are non-breaking and can appear at any time. A deprecated endpoint keeps working and starts answering with Deprecation and Sunset headers plus a Link rel="deprecation" pointing at the replacement, with at least 180 days between the two dates. See https://www.tweetsmash.com/developers#versioning.'
termsOfService: https://www.tweetsmash.com/terms
contact:
name: Tweetsmash Support
email: support@tweetsmash.com
url: https://www.tweetsmash.com/contact
license:
name: Proprietary
url: https://www.tweetsmash.com/terms
servers:
- url: https://api.tweetsmash.com/v1
description: Production. Reads and writes the authenticated account.
- url: https://api.tweetsmash.com/v1/sandbox
description: Sandbox. Same shapes, fixture data, no API key required. Reads and writes nothing. Send X-Tweetsmash-Sandbox-Error to force a specific failure.
security:
- bearerAuth: []
tags:
- name: Exports
description: Turn a selection of saved posts into a file.
paths:
/exports/pdf:
post:
operationId: ExportPDF
summary: Start a PDF export
description: Start an export job over an explicit `tweet_ids` array, a filter (`search_query` / `filter` / `value` / `tags`), or nothing at all (the whole library). Returns 202 with a `job_id` and a `Location` to poll; the finished file also appears in the Export Center at `page`.
externalDocs:
description: Endpoint documentation
url: https://www.tweetsmash.com/api-docs/export-bookmarks
responses:
'202':
description: Accepted. The export runs in the background; poll the Location for the download link.
headers:
Location:
description: Relative URL of the job resource to poll.
schema:
type: string
Retry-After:
description: Seconds to wait before the first poll.
schema:
type: integer
Idempotency-Replayed:
description: Present and true when this response was replayed from a stored idempotent result.
schema:
type: boolean
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
example:
status: true
data:
job_id: b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
status: pending
location: /v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
poll_url: https://api.tweetsmash.com/v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
format: pdf
count: 42
total: 42
sampled: false
page: /integrations/export/pdf
meta:
message: PDF export started. Poll the location for the download link, or check the Export Center.
'400':
description: Nothing matched, so there is nothing to export.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: INVALID_REQUEST
error: No bookmarks matched — nothing to export.
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'422':
$ref: '#/components/responses/IdempotencyConflict'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
tweet_ids:
type: array
items:
type: string
description: Explicit bookmark ids to export. When omitted, the filter fields below select the bookmarks instead.
search_query:
type: string
description: Free-text query selecting the bookmarks to export.
filter:
type: string
description: Filter dimension to select on, e.g. author.
value:
type: string
description: Value for the chosen filter.
tags:
type: array
items:
type: string
description: Labels the bookmarks must carry.
deselected:
type: array
items:
type: string
description: Bookmark ids to exclude from an otherwise matching selection.
tags:
- Exports
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
- $ref: '#/components/parameters/SandboxError'
/exports/csv:
post:
operationId: ExportCSV
summary: Start a CSV export
description: Start an export job over an explicit `tweet_ids` array, a filter (`search_query` / `filter` / `value` / `tags`), or nothing at all (the whole library). Returns 202 with a `job_id` and a `Location` to poll; the finished file also appears in the Export Center at `page`.
externalDocs:
description: Endpoint documentation
url: https://www.tweetsmash.com/api-docs/export-bookmarks
responses:
'202':
description: Accepted. The export runs in the background; poll the Location for the download link.
headers:
Location:
description: Relative URL of the job resource to poll.
schema:
type: string
Retry-After:
description: Seconds to wait before the first poll.
schema:
type: integer
Idempotency-Replayed:
description: Present and true when this response was replayed from a stored idempotent result.
schema:
type: boolean
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
example:
status: true
data:
job_id: b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
status: pending
location: /v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
poll_url: https://api.tweetsmash.com/v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
format: csv
count: 42
total: 42
sampled: false
page: /integrations/export/csv
meta:
message: CSV export started. Poll the location for the download link, or check the Export Center.
'400':
description: Nothing matched, so there is nothing to export.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: INVALID_REQUEST
error: No bookmarks matched — nothing to export.
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'422':
$ref: '#/components/responses/IdempotencyConflict'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
tweet_ids:
type: array
items:
type: string
description: Explicit bookmark ids to export. When omitted, the filter fields below select the bookmarks instead.
search_query:
type: string
description: Free-text query selecting the bookmarks to export.
filter:
type: string
description: Filter dimension to select on, e.g. author.
value:
type: string
description: Value for the chosen filter.
tags:
type: array
items:
type: string
description: Labels the bookmarks must carry.
deselected:
type: array
items:
type: string
description: Bookmark ids to exclude from an otherwise matching selection.
tags:
- Exports
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
- $ref: '#/components/parameters/SandboxError'
/exports/json:
post:
operationId: ExportJSON
summary: Start a JSON export
description: Start an export job over an explicit `tweet_ids` array, a filter (`search_query` / `filter` / `value` / `tags`), or nothing at all (the whole library). Returns 202 with a `job_id` and a `Location` to poll; the finished file also appears in the Export Center at `page`.
externalDocs:
description: Endpoint documentation
url: https://www.tweetsmash.com/api-docs/export-bookmarks
responses:
'202':
description: Accepted. The export runs in the background; poll the Location for the download link.
headers:
Location:
description: Relative URL of the job resource to poll.
schema:
type: string
Retry-After:
description: Seconds to wait before the first poll.
schema:
type: integer
Idempotency-Replayed:
description: Present and true when this response was replayed from a stored idempotent result.
schema:
type: boolean
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
example:
status: true
data:
job_id: b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
status: pending
location: /v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
poll_url: https://api.tweetsmash.com/v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
format: json
count: 42
total: 42
sampled: false
page: /integrations/export/json
meta:
message: JSON export started. Poll the location for the download link, or check the Export Center.
'400':
description: Nothing matched, so there is nothing to export.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: INVALID_REQUEST
error: No bookmarks matched — nothing to export.
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'422':
$ref: '#/components/responses/IdempotencyConflict'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
tweet_ids:
type: array
items:
type: string
description: Explicit bookmark ids to export. When omitted, the filter fields below select the bookmarks instead.
search_query:
type: string
description: Free-text query selecting the bookmarks to export.
filter:
type: string
description: Filter dimension to select on, e.g. author.
value:
type: string
description: Value for the chosen filter.
tags:
type: array
items:
type: string
description: Labels the bookmarks must carry.
deselected:
type: array
items:
type: string
description: Bookmark ids to exclude from an otherwise matching selection.
tags:
- Exports
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
- $ref: '#/components/parameters/SandboxError'
/exports/{job_id}:
get:
operationId: GetExportJob
summary: Poll an export job
description: 'Read the state of an export started by one of the /exports/* endpoints. While the job is running the response carries `status: "pending"` and a `Retry-After` header. Once it finishes, follow `download_url`. PDF links are signed and expire; CSV/JSON downloads require the same API-key header as this request.'
parameters:
- name: job_id
in: path
required: true
description: The job_id returned by the export call.
schema:
type: string
- $ref: '#/components/parameters/SandboxError'
responses:
'200':
description: The job state. Pending or completed.
headers:
Retry-After:
description: Present while the job is still pending.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
example:
status: true
data:
job_id: b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18
status: completed
format: pdf
count: 42
download_url: https://api.tweetsmash.com/v1/exports/b3a1f0c2-5d47-4e91-8a26-9f0b7c3d5e18/download
created_at: '2026-08-24T09:12:03.000Z'
updated_at: '2026-08-24T09:12:41.000Z'
meta:
message: Export ready. Follow download_url as instructed for its format.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
externalDocs:
description: Endpoint documentation
url: https://www.tweetsmash.com/developers#exports
tags:
- Exports
components:
responses:
Unauthorized:
description: Missing, malformed or revoked API key.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: UNAUTHORIZED
error: Unauthorized
PaymentRequired:
description: The account is on a plan that does not include this endpoint.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: SUBSCRIPTION_REQUIRED
error: A paid plan is required.
IdempotencyConflict:
description: The Idempotency-Key was already used with a different request body.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: INVALID_REQUEST
error: This Idempotency-Key was already used with a different request body.
NotFound:
description: No such record on this account.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
example:
status: false
code: NOT_FOUND
error: Resource not found
parameters:
IdempotencyKey:
name: Idempotency-Key
in: header
required: false
description: 'A caller-generated UUID identifying one logical write. The first request with a given key is executed and its response stored for 24 hours; a repeat of the same key returns the stored response with Idempotency-Replayed: true instead of doing the work twice. Reusing a key with a different body is rejected with 422.'
schema:
type: string
format: uuid
SandboxError:
name: X-Tweetsmash-Sandbox-Error
in: header
required: false
description: Sandbox server only. Forces the sandbox to answer with a specific failure so a client can test its error handling without an account.
schema:
type: string
enum:
- unauthorized
- subscription_required
- filter_not_allowed
- pagination_not_allowed
- invalid_request
- not_found
- rate_limited
- server_error
schemas:
ApiResponse:
type: object
required:
- status
properties:
status:
type: boolean
const: true
data:
description: The endpoint payload.
message:
type: string
next_cursor:
type:
- string
- 'null'
description: Pass back as `cursor` to fetch the next page.
meta:
type: object
description: Non-payload extras such as a human-readable message or paging counts.
additionalProperties: true
ApiError:
type: object
required:
- status
- code
properties:
status:
type: boolean
const: false
code:
type: string
enum:
- UNAUTHORIZED
- SUBSCRIPTION_REQUIRED
- FILTER_NOT_ALLOWED
- PAGINATION_NOT_ALLOWED
- VECTOR_SEARCH_NOT_ALLOWED
- INVALID_REQUEST
- NOT_FOUND
- RATE_LIMITED
- INTERNAL_ERROR
description: Machine-readable error code. Do not retry on UNAUTHORIZED.
error:
type: string
description: Human-readable message.
message:
type: string
description: Human-readable message.
upgrade_url:
type: string
format: uri
description: Where the user upgrades to unlock this endpoint.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'API key created at https://www.tweetsmash.com/integrations/api, sent as `Authorization: Bearer <key>`.'
externalDocs:
description: API reference
url: https://www.tweetsmash.com/api-docs