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 · 233 calls
Requests
241
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"
    },
    "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"
}
Response interface
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 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.avatarUrlstringAvatar image URL of the author.
data.biostringBio text on the author's profile.
data.blueVerifiedbooleanWhether the author carries an X blue verification badge.
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.coverUrlstringProfile banner image URL of the author.
data.createdUtcnumberUTC epoch timestamp in seconds (Unix time) the author's account was created. Multiply by 1000 for a JS Date in milliseconds.
data.followersintegerFollower count of the author.
data.followingintegerNumber of accounts the author follows.
data.locationstringLocation text on the author's profile.
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[].bookmarkCountintegerBookmark count of the post.
data.tweets[].conversationIdstring
data.tweets[].createdUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.
data.tweets[].idstringPopulated whenever the provider has data for the entity.
data.tweets[].inReplyToIdstring
data.tweets[].isReplybooleanWhether the post is a reply to another post.
data.tweets[].langstringTwo-letter language code X detected for the post.
data.tweets[].likeCountintegerLike count of the post.
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[].quoteCountintegerQuote count of the post.
data.tweets[].replyCountintegerReply count of the post.
data.tweets[].repostCountintegerRepost count of the post.
data.tweets[].sourcestringClient the post was sent from, e.g. "Twitter Web App".
data.tweets[].textstringPopulated whenever the provider has data for the entity.
data.tweets[].urlstringPopulated whenever the provider has data for the entity.
data.tweets[].viewCountintegerView count of the post.
data.urlstringCanonical X profile URL of the thread's author.
data.verifiedbooleanWhether the author carries a legacy X verification badge.
foundbooleanWhether 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 requestUSD$0.00375
Price /1k reqUSD$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.

It costs from $3.75 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 233 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.