GET/twitter/replies/post

    Retrieve Replies for a Post

    The Tweets and Replies by User API enables users to retrieve relevant tweets and replies based on specified search queries without relying on AI-powered models. It analyzes and extracts links from X posts that align with the provided search criteria. Billed per post returned, with a minimum of 10 posts (never more than `count`). A search with no replies returns 200 with an empty list and is not charged. Replies come from X search, so for a large thread they are a best-effort sample, not every reply. Replies come newest first. When more may exist, the response has an `x-desearch-next-cursor` header: send it back as `cursor` for the next page. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. Current prices are at https://desearch.ai/pricing. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Retrieve Replies for a Post when your application needs fresh X data without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. Start here to retrieve replies associated with one X post, identified by post_id, rather than choosing an account and retrieving that account's tweets and replies; the separate user reply lookup accepts a username for that account-oriented search. The post identifier is required and must be a numeric string of 1 to 20 digits, so provide the ID itself instead of a complete post URL; a malformed ID is rejected before search with HTTP 422 and incurs no charge. This endpoint searches for replies without AI analysis and sorts its returned matches newest first; on large threads it is a best-effort sample from X search, with no guarantee that every reply in the thread will be returned. Use the optional query string to add an advanced search expression, whose default is empty, and choose count for the number requested on a page; the count defaults to 10 and accepts whole numbers between 1 and 100. Because the large-thread result is explicitly sampled, requesting the maximum page size or receiving a successful response does not establish that you have collected a complete thread; preserve this limitation when interpreting reply totals in an application. Continue a post's search only when the response includes x-desearch-next-cursor, sending that header value as the next request's cursor; the value is opaque and should be copied directly rather than decoded or reconstructed. The first page does not need a cursor, and subsequent calls must retain the same other parameters and use the token for this route and target; switching to another post or altering the search is not a valid reuse of that pagination token. After 24 hours the cursor expires, and a bad value, an expired one or a token belonging to a different request produces an unbilled validation response; absence of the header indicates the last available page for this request. Pages do not repeat a reply, but timestamp density imposes a further caveat: if over 100 replies fall within a single second, replies beyond that second's first 100 may be skipped, independently of the large-thread sampling warning. Charging follows the number of posts returned, subject to a minimum of 10 and a ceiling of the requested count; an empty list with status 200 costs nothing, and current pricing is the reference for monetary rates. Inspect X-Desearch-Usage-Count for billed units and X-Desearch-Cost-Usd for the request charge, together with the service and currency headers; this route's documented service example is X Post Replies, and the currency header identifies USD. Billing values may also appear in optional object-body fields named cost_usd, usage_count, service and currency; when the response is an array, those extra body properties are not added, so header accounting remains necessary for that body shape. The successful JSON contract allows either an object or a tweet array, with array entries described by TwitterScraperTweet; a client should therefore respect the documented union instead of assuming a mandatory object wrapper around all replies. A reply item requires a string id, its string text and the created_at string, plus integer counters for replies, retweets, likes, quotes and bookmarks; optional views differ from those required counters because view_count can be missing or null. To show what a particular reply answers, use the nullable parent fields: in_reply_to_status_id for the parent post, in_reply_to_user_id for the user being answered and in_reply_to_screen_name for that user's name; none is a required property in this common schema. The thread identifier is separately named conversation_id, and quote context uses quoted_status_id with an optional nested quote; these distinct properties let a consumer keep the thread, parent and quoted-post relationships separate when the corresponding values exist. An optional replies array can contain further tweet objects, but the array is nullable and is not promised on each result; combined with the endpoint's sampling limitation, its presence must not be interpreted as proof of a complete recursive thread export. If rendering the reply body, accommodate optional display_text_range indices, hashtags and mentions in entities, media data in extended_entities, and a nullable media collection; these fields supplement the required text instead of being required attachments on every reply. A reply's own url, lang, quote flag, retweet flag and sensitivity flag all permit null, as does the nested user; the user object in turn requires only id and username, with profile name, bio, imagery and audience details allowed to be absent. Additional presentation objects remain conditional: a card represents an attached link preview, video player or live broadcast, an article belongs to article posts, and edit_control describes edit history and remaining allowance when supplied. Although the shared schema includes a nested retweet object, that field is documented as available only for the user-posts endpoint; its inclusion in the model does not extend that availability guarantee to replies on this post route. An upstream crawl that fails or times out returns HTTP 503, with an error_code of upstream_failed or upstream_timeout and zero cost and usage; authorization, rate limiting and internal server failures have their own 401, 429 and 500 response entries. For an integration that needs other account or post operations alongside thread replies, the X API product page provides the product overview; retain the sampling, nullable-field and cursor constraints above when combining these results with other data. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to GET /twitter/replies/post with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Query Parameters

    post_idstringrequired

    The numeric ID of the post to search for.

    countinteger

    The number of tweets to fetch.

    Default: 10

    querystring

    Advanced search query

    Default:

    cursorstring

    Opaque pagination cursor. Omit it for the first page. For the next page, send the `x-desearch-next-cursor` response header of the previous page back unchanged, with the same other parameters. A cursor is valid for 24 hours. Any other value, including an expired cursor or one from another request, returns 422 and is not charged. Pages never repeat a reply. If more than 100 replies were posted in the same second, the ones past the first 100 may be skipped.

    Responses

    200Replies, newest first.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    422Validation Error. `post_id` must be a numeric X post id (1 to 20 digits). A malformed id is not charged. Also returned, not charged, when `cursor` is not a next cursor this route returned for the same parameters in the last 24 hours.
    429Too Many Requests
    500Internal Server Error
    503X search is temporarily unavailable because the X crawler failed or timed out (`error_code: upstream_failed` or `upstream_timeout`). The request is not charged (`X-Desearch-Cost-Usd: 0`, `X-Desearch-Usage-Count: 0`).
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X GET "https://api.desearch.ai/twitter/replies/post?post_id=1234567890" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    GET /twitter/replies/post
    ResponseSchema
    [
      {
        "user": {
          "id": "123456789",
          "url": "https://twitter.com/example_user",
          "name": "John Doe",
          "username": "johndoe",
          "created_at": "2023-01-01T00:00:00Z",
          "description": "This is an example user description.",
          "favourites_count": 100,
          "followers_count": 1500,
          "followings_count": 100,
          "listed_count": 10,
          "media_count": 50,
          "profile_image_url": "https://example.com/profile.jpg",
          "profile_banner_url": "https://example.com/banner.jpg",
          "statuses_count": 500,
          "verified": true,
          "is_blue_verified": true,
          "entities": {},
          "can_dm": true,
          "can_media_tag": true,
          "location": "Jamaica",
          "pinned_tweet_ids": [
            "123456789",
            "987654321"
          ],
          "professional": {
            "professional_type": "Business",
            "category": []
          },
          "affiliates_highlighted_label": {},
          "website": "https://t.co/4sVzS0XYIW"
        },
        "id": "987654321",
        "text": "This is an example tweet.",
        "reply_count": 10,
        "view_count": 1000,
        "retweet_count": 5,
        "like_count": 100,
        "quote_count": 2,
        "bookmark_count": 3,
        "url": "https://twitter.com/example_tweet",
        "created_at": "2023-01-01T00:00:00Z",
        "media": [],
        "is_quote_tweet": false,
        "is_retweet": false,
        "lang": "en",
        "conversation_id": "987654321",
        "in_reply_to_screen_name": "someuser",
        "in_reply_to_status_id": "987654320",
        "in_reply_to_user_id": "123456789",
        "quoted_status_id": "987654319",
        "quote": {
          "user": {
            "id": "123456789",
            "url": "https://twitter.com/example_user",
            "name": "John Doe",
            "username": "johndoe",
            "created_at": "2023-01-01T00:00:00Z",
            "description": "This is an example user description.",
            "favourites_count": 100,
            "followers_count": 1500,
            "followings_count": 100,
            "listed_count": 10,
            "media_count": 50,
            "profile_image_url": "https://example.com/profile.jpg",
            "profile_banner_url": "https://example.com/banner.jpg",
            "statuses_count": 500,
            "verified": true,
            "is_blue_verified": true,
            "can_dm": true,
            "can_media_tag": true,
            "location": "Jamaica",
            "pinned_tweet_ids": [
              "123456789",
              "987654321"
            ],
            "website": "https://t.co/4sVzS0XYIW"
          },
          "id": "987654321",
          "text": "This is an example tweet.",
          "reply_count": 10,
          "view_count": 1000,
          "retweet_count": 5,
          "like_count": 100,
          "quote_count": 2,
          "bookmark_count": 3,
          "url": "https://twitter.com/example_tweet",
          "created_at": "2023-01-01T00:00:00Z",
          "media": [],
          "is_quote_tweet": false,
          "is_retweet": false,
          "lang": "en",
          "conversation_id": "987654321",
          "in_reply_to_screen_name": "someuser",
          "in_reply_to_status_id": "987654320",
          "in_reply_to_user_id": "123456789",
          "quoted_status_id": "987654319",
          "quote": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "replies": [
            {}
          ],
          "display_text_range": [
            0,
            280
          ],
          "entities": {},
          "extended_entities": {},
          "retweet": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "article": {
            "id": "2036821104418029568",
            "title": "How to become so creative it feels illegal"
          },
          "content_disclosure": {},
          "edit_control": {
            "edit_tweet_ids": [
              "987654321"
            ],
            "editable_until_msecs": "1784103100000",
            "edits_remaining": "5",
            "is_edit_eligible": false
          },
          "possibly_sensitive": false,
          "card": {
            "type": "summary_large_image",
            "url": "https://t.co/hVHgyxtOZ9",
            "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
            "description": "14th test flight of the two-stage Starship launch vehicle.",
            "domain": "www.missionstatus.com",
            "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
            "player_url": "https://www.youtube.com/embed/abc123",
            "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
            "state": "ENDED"
          }
        },
        "replies": [
          {
            "user": {},
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "quote": {},
            "replies": [],
            "display_text_range": [
              0,
              280
            ],
            "entities": {},
            "extended_entities": {},
            "retweet": {},
            "article": {},
            "content_disclosure": {},
            "edit_control": {},
            "possibly_sensitive": false,
            "card": {}
          }
        ],
        "display_text_range": [
          0,
          280
        ],
        "entities": {
          "hashtags": [
            {}
          ],
          "media": [
            {}
          ],
          "symbols": [
            {}
          ],
          "timestamps": [],
          "urls": [
            {}
          ],
          "user_mentions": [
            {}
          ]
        },
        "extended_entities": {
          "media": [
            {}
          ]
        },
        "retweet": {
          "user": {
            "id": "123456789",
            "url": "https://twitter.com/example_user",
            "name": "John Doe",
            "username": "johndoe",
            "created_at": "2023-01-01T00:00:00Z",
            "description": "This is an example user description.",
            "favourites_count": 100,
            "followers_count": 1500,
            "followings_count": 100,
            "listed_count": 10,
            "media_count": 50,
            "profile_image_url": "https://example.com/profile.jpg",
            "profile_banner_url": "https://example.com/banner.jpg",
            "statuses_count": 500,
            "verified": true,
            "is_blue_verified": true,
            "can_dm": true,
            "can_media_tag": true,
            "location": "Jamaica",
            "pinned_tweet_ids": [
              "123456789",
              "987654321"
            ],
            "website": "https://t.co/4sVzS0XYIW"
          },
          "id": "987654321",
          "text": "This is an example tweet.",
          "reply_count": 10,
          "view_count": 1000,
          "retweet_count": 5,
          "like_count": 100,
          "quote_count": 2,
          "bookmark_count": 3,
          "url": "https://twitter.com/example_tweet",
          "created_at": "2023-01-01T00:00:00Z",
          "media": [],
          "is_quote_tweet": false,
          "is_retweet": false,
          "lang": "en",
          "conversation_id": "987654321",
          "in_reply_to_screen_name": "someuser",
          "in_reply_to_status_id": "987654320",
          "in_reply_to_user_id": "123456789",
          "quoted_status_id": "987654319",
          "quote": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "replies": [
            {}
          ],
          "display_text_range": [
            0,
            280
          ],
          "entities": {},
          "extended_entities": {},
          "retweet": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "article": {
            "id": "2036821104418029568",
            "title": "How to become so creative it feels illegal"
          },
          "content_disclosure": {},
          "edit_control": {
            "edit_tweet_ids": [
              "987654321"
            ],
            "editable_until_msecs": "1784103100000",
            "edits_remaining": "5",
            "is_edit_eligible": false
          },
          "possibly_sensitive": false,
          "card": {
            "type": "summary_large_image",
            "url": "https://t.co/hVHgyxtOZ9",
            "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
            "description": "14th test flight of the two-stage Starship launch vehicle.",
            "domain": "www.missionstatus.com",
            "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
            "player_url": "https://www.youtube.com/embed/abc123",
            "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
            "state": "ENDED"
          }
        },
        "article": {
          "id": "2036821104418029568",
          "title": "How to become so creative it feels illegal",
          "preview_text": "string",
          "plain_text": "string",
          "cover_media": {
            "url": "https://pbs.twimg.com/media/example.jpg",
            "width": 1920,
            "height": 768
          },
          "first_published_at": 0
        },
        "content_disclosure": {
          "advertising_disclosure": {
            "is_paid_promotion": true
          }
        },
        "edit_control": {
          "edit_tweet_ids": [
            "987654321"
          ],
          "editable_until_msecs": "1784103100000",
          "edits_remaining": "5",
          "is_edit_eligible": false
        },
        "possibly_sensitive": false,
        "card": {
          "type": "summary_large_image",
          "url": "https://t.co/hVHgyxtOZ9",
          "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
          "description": "14th test flight of the two-stage Starship launch vehicle.",
          "domain": "www.missionstatus.com",
          "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
          "image_alt": "string",
          "player_url": "https://www.youtube.com/embed/abc123",
          "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
          "state": "ENDED"
        }
      }
    ]
    Status codes200301304401422429500503