> ## Documentation Index
> Fetch the complete documentation index at: https://getanyapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# X / Twitter Tweet Thread

> Sell twitter.thread on AnyAPI: the request your endpoint receives, the response it must return, and what the real-request check judges.

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.

This page is the seller-facing summary of one catalog API, `twitter.thread`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$2.69 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `url` | string | yes | 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. |

> [accordion] Full input JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/twitter.thread.input.json",
>   "example": {
>     "url": "https://x.com/SpaceX/status/1732824684683784516"
>   },
>   "title": "X / Twitter tweet thread input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "url"
>   ],
>   "properties": {
>     "url": {
>       "type": "string",
>       "pattern": "^https?://(?:(?:www|mobile)\\.)?(?:x\\.com|twitter\\.com)/(?:[A-Za-z0-9_]+|i/web)/status/[0-9]+(?:/(?:photo|video)/[0-9]+)?/?(?:[?#].*)?$",
>       "description": "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."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | |
| `data.author` | object | yes | |
| `data.author.avatarUrl` | string | no | Avatar image URL of the author. |
| `data.author.bio` | string | no | Bio text on the author's profile. |
| `data.author.blueVerified` | boolean | no | Whether the author carries an X blue verification badge. |
| `data.author.coverUrl` | string | no | Profile banner image URL of the author. |
| `data.author.createdUtc` | number | no | UTC epoch timestamp in seconds (Unix time) the author's account was created. Multiply by 1000 for a JS Date in milliseconds. |
| `data.author.followers` | integer | no | Follower count of the author. |
| `data.author.following` | integer | no | Number of accounts the author follows. |
| `data.author.handle` | string | yes | |
| `data.author.id` | string | yes | |
| `data.author.location` | string | no | Location text on the author's profile. |
| `data.author.name` | string | yes | |
| `data.author.url` | string | no | Canonical X profile URL of the thread's author. |
| `data.author.verified` | boolean | no | Whether the author carries a legacy X verification badge. |
| `data.complete` | boolean | yes | Whether the provider reached the end of the self-thread without hitting its internal cap. |
| `data.conversationId` | string | yes | Conversation ID shared by the self-thread tweets. |
| `data.threadLength` | integer | yes | Number of tweets returned in the self-thread. |
| `data.tweets` | array | yes | Ordered self-thread tweets. Replies from other users are excluded. |
| `data.tweets[].authorHandle` | string | yes | |
| `data.tweets[].authorId` | string | yes | |
| `data.tweets[].authorName` | string | yes | |
| `data.tweets[].bookmarkCount` | integer | no | Bookmark count of the post. |
| `data.tweets[].conversationId` | string | yes | |
| `data.tweets[].createdUtc` | number | no | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.tweets[].id` | string | yes | |
| `data.tweets[].inReplyToId` | string or null | yes | |
| `data.tweets[].isReply` | boolean | no | Whether the post is a reply to another post. |
| `data.tweets[].lang` | string | no | Two-letter language code X detected for the post. |
| `data.tweets[].likeCount` | integer | no | Like count of the post. |
| `data.tweets[].media` | array | no | Photo, video, and GIF attachments on the post. Empty when the post has none. |
| `data.tweets[].media[].height` | integer | no | Pixel height of the media item, when the lane reports it. |
| `data.tweets[].media[].type` | string | yes | One of photo, video, or gif. |
| `data.tweets[].media[].url` | string | yes | 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 | no | Playable video file URL. Present only for video and gif items. |
| `data.tweets[].media[].width` | integer | no | Pixel width of the media item, when the lane reports it. |
| `data.tweets[].quoteCount` | integer | no | Quote count of the post. |
| `data.tweets[].replyCount` | integer | no | Reply count of the post. |
| `data.tweets[].repostCount` | integer | no | Repost count of the post. |
| `data.tweets[].source` | string | no | Client the post was sent from, e.g. "Twitter Web App". |
| `data.tweets[].text` | string | yes | |
| `data.tweets[].url` | string | yes | |
| `data.tweets[].viewCount` | integer | no | View count of the post. |
| `found` | boolean | yes | Whether the provider returned a tweet thread result. |

Extra fields are kept, missing declared fields fail.

> [accordion] Full output JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/twitter.thread.output.json",
>   "title": "X / Twitter tweet thread output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean",
>       "description": "Whether the provider returned a tweet thread result."
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "additionalProperties": false,
>           "required": [
>             "conversationId",
>             "threadLength",
>             "complete",
>             "author",
>             "tweets"
>           ],
>           "properties": {
>             "conversationId": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Conversation ID shared by the self-thread tweets."
>             },
>             "threadLength": {
>               "type": "integer",
>               "description": "Number of tweets returned in the self-thread."
>             },
>             "complete": {
>               "type": "boolean",
>               "description": "Whether the provider reached the end of the self-thread without hitting its internal cap."
>             },
>             "author": {
>               "type": "object",
>               "required": [
>                 "id",
>                 "handle",
>                 "name"
>               ],
>               "properties": {
>                 "id": {
>                   "x-anyapi-must-populate": true,
>                   "type": "string"
>                 },
>                 "handle": {
>                   "x-anyapi-must-populate": true,
>                   "type": "string"
>                 },
>                 "name": {
>                   "x-anyapi-must-populate": true,
>                   "type": "string"
>                 },
>                 "url": {
>                   "type": "string",
>                   "description": "Canonical X profile URL of the thread's author."
>                 },
>                 "verified": {
>                   "type": "boolean",
>                   "description": "Whether the author carries a legacy X verification badge."
>                 },
>                 "blueVerified": {
>                   "type": "boolean",
>                   "description": "Whether the author carries an X blue verification badge."
>                 },
>                 "avatarUrl": {
>                   "type": "string",
>                   "description": "Avatar image URL of the author."
>                 },
>                 "coverUrl": {
>                   "type": "string",
>                   "description": "Profile banner image URL of the author."
>                 },
>                 "bio": {
>                   "type": "string",
>                   "description": "Bio text on the author's profile."
>                 },
>                 "location": {
>                   "type": "string",
>                   "description": "Location text on the author's profile."
>                 },
>                 "followers": {
>                   "type": "integer",
>                   "description": "Follower count of the author."
>                 },
>                 "following": {
>                   "type": "integer",
>                   "description": "Number of accounts the author follows."
>                 },
>                 "createdUtc": {
>                   "type": "number",
>                   "description": "UTC epoch timestamp in seconds (Unix time) the author's account was created. Multiply by 1000 for a JS Date in milliseconds."
>                 }
>               }
>             },
>             "tweets": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "description": "Ordered self-thread tweets. Replies from other users are excluded.",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "id",
>                   "url",
>                   "text",
>                   "conversationId",
>                   "inReplyToId",
>                   "authorId",
>                   "authorHandle",
>                   "authorName"
>                 ],
>                 "properties": {
>                   "id": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "url": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "format": "uri"
>                   },
>                   "text": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "conversationId": {
>                     "type": "string"
>                   },
>                   "inReplyToId": {
>                     "type": [
>                       "string",
>                       "null"
>                     ]
>                   },
>                   "authorId": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "authorHandle": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "authorName": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "media": {
>                     "type": "array",
>                     "description": "Photo, video, and GIF attachments on the post. Empty when the post has none.",
>                     "items": {
>                       "type": "object",
>                       "required": [
>                         "type",
>                         "url"
>                       ],
>                       "properties": {
>                         "type": {
>                           "type": "string",
>                           "description": "One of photo, video, or gif."
>                         },
>                         "url": {
>                           "type": "string",
>                           "format": "uri",
>                           "description": "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."
>                         },
>                         "videoUrl": {
>                           "type": "string",
>                           "format": "uri",
>                           "description": "Playable video file URL. Present only for video and gif items."
>                         },
>                         "width": {
>                           "type": "integer",
>                           "description": "Pixel width of the media item, when the lane reports it."
>                         },
>                         "height": {
>                           "type": "integer",
>                           "description": "Pixel height of the media item, when the lane reports it."
>                         }
>                       }
>                     }
>                   },
>                   "createdUtc": {
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   },
>                   "likeCount": {
>                     "type": "integer",
>                     "description": "Like count of the post."
>                   },
>                   "replyCount": {
>                     "type": "integer",
>                     "description": "Reply count of the post."
>                   },
>                   "repostCount": {
>                     "type": "integer",
>                     "description": "Repost count of the post."
>                   },
>                   "quoteCount": {
>                     "type": "integer",
>                     "description": "Quote count of the post."
>                   },
>                   "viewCount": {
>                     "type": "integer",
>                     "description": "View count of the post."
>                   },
>                   "bookmarkCount": {
>                     "type": "integer",
>                     "description": "Bookmark count of the post."
>                   },
>                   "lang": {
>                     "type": "string",
>                     "description": "Two-letter language code X detected for the post."
>                   },
>                   "isReply": {
>                     "type": "boolean",
>                     "description": "Whether the post is a reply to another post."
>                   },
>                   "source": {
>                     "type": "string",
>                     "description": "Client the post was sent from, e.g. \"Twitter Web App\"."
>                   }
>                 }
>               }
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `authorHandle`
* `authorId`
* `authorName`
* `conversationId`
* `handle`
* `id`
* `name`
* `text`
* `tweets`
* `url`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty list is not a not-found: when the entity exists and has nothing to return, answer 2xx with `found: true` and an empty `tweets` array.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "url": "https://x.com/SpaceX/status/1732824684683784516"
}
```

The registration tests send this example to your endpoint, with the API's other test inputs. After that, the real-request check sends your endpoint real past customer inputs, and an AI reviewer compares each answer with AnyAPI's own answer to the same input.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the real-request check.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.