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"
},
"avatarUrl": "https://example.com/image.jpg",
"bio": "A short example description of this item.",
"blueVerified": true,
"complete": true,
"conversationId": "a1b2c3d4",
"coverUrl": "https://example.com/page",
"createdUtc": 12.5,
"followers": 12500,
"following": 12500,
"location": "example",
"threadLength": 180,
"tweets": [
{
"authorHandle": "alex_rivera",
"authorId": "Alex Rivera",
"authorName": "Alex Rivera",
"bookmarkCount": 12500,
"conversationId": "a1b2c3d4",
"createdUtc": 12.5,
"id": "a1b2c3d4",
"inReplyToId": "a1b2c3d4",
"isReply": true,
"lang": "en",
"likeCount": 12500,
"media": [
{
"height": 42,
"type": "general",
"url": "https://example.com/page",
"videoUrl": "https://example.com/page",
"width": 1024
}
],
"quoteCount": 12500,
"replyCount": 12500,
"repostCount": 12500,
"source": "https://example.com/page",
"text": "A short example description of this item.",
"url": "https://example.com/page",
"viewCount": 12500
}
],
"url": "https://example.com/page",
"verified": true
},
"found": true,
"reason": "not_found"
}interface TwitterThreadResponse {
data: {
author: {
handle: string;
id: string;
name: string;
};
avatarUrl?: string;
bio?: string;
blueVerified?: boolean;
complete: boolean;
conversationId: string;
coverUrl?: string;
createdUtc?: number;
followers?: number;
following?: number;
location?: string;
threadLength: number;
tweets: {
authorHandle: string;
authorId: string;
authorName: string;
bookmarkCount?: number;
conversationId: string;
createdUtc?: number;
id: string;
inReplyToId: string | null;
isReply?: boolean;
lang?: string;
likeCount?: number;
media?: {
height?: number;
type: string;
url: string;
videoUrl?: string;
width?: number;
}[];
quoteCount?: number;
replyCount?: number;
repostCount?: number;
source?: string;
text: string;
url: string;
viewCount?: number;
}[];
url?: string;
verified?: boolean;
} | null;
found: boolean;
reason?: "not_found";
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
Request, response, and price
Last verified 2026-09-20 · 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.avatarUrl | string | Avatar image URL of the author. |
| data.bio | string | Bio text on the author's profile. |
| data.blueVerified | boolean | Whether the author carries an X blue verification badge. |
| 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.coverUrl | string | Profile banner image URL of the author. |
| data.createdUtc | number | UTC epoch timestamp in seconds (Unix time) the author's account was created. Multiply by 1000 for a JS Date in milliseconds. |
| data.followers | integer | Follower count of the author. |
| data.following | integer | Number of accounts the author follows. |
| data.location | string | Location text on the author's profile. |
| 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[].bookmarkCount | integer | Bookmark count of the post. |
| data.tweets[].conversationId | string | |
| data.tweets[].createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.tweets[].id | string | Populated whenever the provider has data for the entity. |
| data.tweets[].inReplyToId | string | |
| data.tweets[].isReply | boolean | Whether the post is a reply to another post. |
| data.tweets[].lang | string | Two-letter language code X detected for the post. |
| data.tweets[].likeCount | integer | Like count of the post. |
| 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[].quoteCount | integer | Quote count of the post. |
| data.tweets[].replyCount | integer | Reply count of the post. |
| data.tweets[].repostCount | integer | Repost count of the post. |
| data.tweets[].source | string | Client the post was sent from, e.g. "Twitter Web App". |
| 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. |
| data.tweets[].viewCount | integer | View count of the post. |
| data.url | string | Canonical X profile URL of the thread's author. |
| data.verified | boolean | Whether the author carries a legacy X verification badge. |
| found | boolean | Whether the provider returned a tweet thread result. |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Price | ||
| Price per request | USD | $0.00375 |
| Price /1k req | USD | $3.75 |
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 $3.75 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 233 measured calls.