X / Twitter API

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.

POST/v1/run/twitter.thread
Uptime
100.00%
30d · 212 calls
Requests
219
30d · weekly, last 12 wks
Response
3.7s
median · 30d

Pricing

One price, in dollars

Try it

Make your first request

Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
  "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
}
Response interface
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 30d
POST /v1/run/twitter.thread
curl -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"}'
FieldTypeExample value
Request body
urlstring"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
dataobject
data.authorobject
data.author.handlestringPopulated whenever the provider has data for the entity.
data.author.idstringPopulated whenever the provider has data for the entity.
data.author.namestringPopulated whenever the provider has data for the entity.
data.completebooleanWhether the provider reached the end of the self-thread without hitting its internal cap.
data.conversationIdstringConversation ID shared by the self-thread tweets. Populated whenever the provider has data for the entity.
data.threadLengthintegerNumber of tweets returned in the self-thread.
data.tweetsobject[]Ordered self-thread tweets. Replies from other users are excluded. Populated whenever the provider has data for the entity.
data.tweets[].authorHandlestringPopulated whenever the provider has data for the entity.
data.tweets[].authorIdstringPopulated whenever the provider has data for the entity.
data.tweets[].authorNamestringPopulated whenever the provider has data for the entity.
data.tweets[].conversationIdstring
data.tweets[].idstringPopulated whenever the provider has data for the entity.
data.tweets[].inReplyToIdstring
data.tweets[].mediaobject[]Photo, video, and GIF attachments on the post. Empty when the post has none.
data.tweets[].media[].heightintegerPixel height of the media item, when the lane reports it.
data.tweets[].media[].typestringOne of photo, video, or gif.
data.tweets[].media[].urlstringImage 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[].videoUrlstringPlayable video file URL. Present only for video and gif items.
data.tweets[].media[].widthintegerPixel width of the media item, when the lane reports it.
data.tweets[].textstringPopulated whenever the provider has data for the entity.
data.tweets[].urlstringPopulated whenever the provider has data for the entity.
foundbooleanWhether the provider returned a tweet thread result.
Price
Price per requestUSD$0.005
Price /1k reqUSD$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.

It costs from $5 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.

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. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

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. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.