X / Twitter Thread API
Resolve the linear self-thread containing an X (Twitter) post, from its root through the author's linked continuations. This excludes replies from other users.
Try it
Make your first request
{
"data": {
"author": {
"handle": "alex_rivera",
"id": "a1b2c3d4",
"name": "Example title"
},
"complete": true,
"conversationId": "a1b2c3d4",
"threadLength": 180,
"tweets": [
{
"authorHandle": "alex_rivera",
"authorId": "Alex Rivera",
"authorName": "Alex Rivera",
"conversationId": "a1b2c3d4",
"id": "a1b2c3d4",
"inReplyToId": "a1b2c3d4",
"media": [
{
"height": 42,
"type": "general",
"url": "https://example.com/page",
"videoUrl": "https://example.com/page",
"width": 1024
}
],
"text": "A short example description of this item.",
"url": "https://example.com/page"
}
]
},
"found": true
}interface TwitterThreadResponse {
data: {
author: {
handle: string;
id: string;
name: string;
};
complete: boolean;
conversationId: string;
threadLength: number;
tweets: {
authorHandle: string;
authorId: string;
authorName: string;
conversationId: string;
id: string;
inReplyToId: string | null;
media?: {
height?: number;
type: string;
url: string;
videoUrl?: string;
width?: number;
}[];
text: string;
url: string;
}[];
} | null;
found: boolean;
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
Request, response, and price
Last verified 2026-09-14 · uptime and latency measured over 30dcurl -X POST https://api.getanyapi.com/v1/run/twitter.thread \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://x.com/SpaceX/status/1732824684683784516"}'| Field | Type | Example value |
|---|---|---|
| Request body | ||
| url | string | "https://x.com/SpaceX/status/1732824684683784516"Canonical x.com or twitter.com status URL with a numeric tweet ID. Any tweet in the self-thread can be supplied; the provider resolves the thread root. |
| Response | ||
| data | object | |
| data.author | object | |
| data.author.handle | string | Populated whenever the provider has data for the entity. |
| data.author.id | string | Populated whenever the provider has data for the entity. |
| data.author.name | string | Populated whenever the provider has data for the entity. |
| data.complete | boolean | Whether the provider reached the end of the self-thread without hitting its internal cap. |
| data.conversationId | string | Conversation ID shared by the self-thread tweets. Populated whenever the provider has data for the entity. |
| data.threadLength | integer | Number of tweets returned in the self-thread. |
| data.tweets | object[] | Ordered self-thread tweets. Replies from other users are excluded. Populated whenever the provider has data for the entity. |
| data.tweets[].authorHandle | string | Populated whenever the provider has data for the entity. |
| data.tweets[].authorId | string | Populated whenever the provider has data for the entity. |
| data.tweets[].authorName | string | Populated whenever the provider has data for the entity. |
| data.tweets[].conversationId | string | |
| data.tweets[].id | string | Populated whenever the provider has data for the entity. |
| data.tweets[].inReplyToId | string | |
| data.tweets[].media | object[] | Photo, video, and GIF attachments on the post. Empty when the post has none. |
| data.tweets[].media[].height | integer | Pixel height of the media item, when the lane reports it. |
| data.tweets[].media[].type | string | One of photo, video, or gif. |
| data.tweets[].media[].url | string | Image URL. For a video or GIF this is the poster/thumbnail frame. X media URLs on pbs.twimg.com are publicly fetchable without authentication; append ?name=orig for the full-resolution original. |
| data.tweets[].media[].videoUrl | string | Playable video file URL. Present only for video and gif items. |
| data.tweets[].media[].width | integer | Pixel width of the media item, when the lane reports it. |
| data.tweets[].text | string | Populated whenever the provider has data for the entity. |
| data.tweets[].url | string | Populated whenever the provider has data for the entity. |
| found | boolean | Whether the provider returned a tweet thread result. |
| Price | ||
| Price per request | USD | $0.005 |
| Price /1k req | USD | $5.00 |
FAQ
About the X / Twitter Thread API
The AnyAPI X / Twitter Thread API returns X / Twitter thread data as normalized JSON from one POST call to /v1/run/twitter.thread. Resolve the linear self-thread containing an X (Twitter) post, from its root through the author's linked continuations. This excludes replies from other users. AnyAPI returns one normalized schema whichever source serves it. It costs from $5 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 100.0% of X / Twitter thread calls through AnyAPI succeeded, with a median response time of 3.7 seconds across 212 measured calls.