How to get replies to an X (Twitter) post

2 endpoints do it: X post detail → X post replies. The worked example below is 4 calls and costs $0.0063 in all; a failed call is not charged.

Open in ChatGPTOpen in Claude

You get the replies under one X (Twitter) post, page after page in X's order of relevance: text, author, time and counts, next to the post's own counts.

Step 1: X post detail

Get the post by its ID, or by its link as url (an x.com or twitter.com link with /status/ in it). metrics.comments is its reply count; the next step takes its id.

curl -G "https://api.dataxapi.com/v1/x/posts/get" \
  --data-urlencode "id=2108198226532708497" \
  -H "Authorization: Bearer $DATAXAPI_API_KEY"
from dataxapi import DataXAPI

dx = DataXAPI()  # reads DATAXAPI_API_KEY
result = dx.x.posts.get(id="2108198226532708497")
print(result["data"]["item"])
import { DataXAPI } from "@dataxapi/sdk";

const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.x.posts.get({ id: "2108198226532708497" });
console.log(result.data.item);
dataxapi call x.posts.get id=2108198226532708497
Recorded response
{
  "code": "ok",
  "request_id": "9a3158fb-2f1c-4829-9fcc-9b9690d84bb5",
  "data": {
    "item": {
      "id": "1889020583051160744",
      "url": "https://x.com/i/status/1889020583051160744",
      "type": "video",
      "text": "Three things nobody tells you about weekend hiking.",
      "lang": "en",
      "published_at": "2026-10-08T14:10:00.000Z",
      "author": {
        "id": "171254161496063062",
        "username": "maya_makes",
        "name": "Northside Coffee",
        "avatar_url": "https://pbs.twimg.com/profile_images/1817170446354046662/qJUxX-tg_normal.jpg",
        "verified": true,
        "followers": 932620
      },
      "metrics": {
        "likes": 155,
        "comments": 7,
        "favorites": 11,
        "views": 10638,
        "reposts": 40
      },
      "images": [],
      "hashtags": [],
      "mentions": [
        {
          "id": "192596166327376049",
          "username": "priya_reads",
          "name": "Priya R."
        }
      ],
      "post_id": null,
      "parent_id": null
    }
  },
  "warnings": [],
  "meta": {
    "capability": "x.posts.get",
    "result_status": "complete",
    "fetched_at": "2026-10-12T19:04:36.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "title": "platform",
      "metrics.shares": "platform",
      "is_pinned": "capability",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.0003",
      "currency": "USD",
      "balance_after": "9.9997"
    }
  }
}

From a response recorded 2026-10-12 19:04 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

X post detail · $0.0003 / a call · Parameters, fields and errors on the endpoint's page →

Step 2: X post replies

Get the replies by the post's id. A reply on X is a post itself and comes as one. For the next page, send page.next_cursor as cursor; the last page comes without one.

curl -G "https://api.dataxapi.com/v1/x/posts/replies/list" \
  --data-urlencode "id=2108198226532708497" \
  -H "Authorization: Bearer $DATAXAPI_API_KEY"
from dataxapi import DataXAPI

dx = DataXAPI()  # reads DATAXAPI_API_KEY
result = dx.x.posts.replies.list(id="2108198226532708497")
print(result["data"]["items"])
import { DataXAPI } from "@dataxapi/sdk";

const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.x.posts.replies.list({ id: "2108198226532708497" });
console.log(result.data.items);
dataxapi call x.posts.replies.list id=2108198226532708497
Recorded response
{
  "code": "ok",
  "request_id": "8d1c41ef-9476-4956-bef0-7cbcb9a72fe5",
  "data": {
    "items": [
      {
        "id": "1852059004504439503",
        "url": "https://x.com/i/status/1852059004504439503",
        "type": "text",
        "text": "My honest take on weekend hiking, a month in.",
        "lang": "en",
        "published_at": "2026-10-08T14:10:01.000Z",
        "author": {
          "id": "185515870194801997",
          "username": "trail_and_lens",
          "name": "Maya Chen",
          "avatar_url": "https://pbs.twimg.com/profile_images/1839650090733403766/2e9uy1Sn_normal.jpg",
          "verified": true
        },
        "metrics": {
          "likes": 14,
          "comments": 1,
          "favorites": 1,
          "views": 1419,
          "reposts": 3
        },
        "hashtags": [],
        "mentions": [
          {
            "id": "120227434360127747",
            "username": "maya_makes",
            "name": "Northside Coffee"
          }
        ],
        "post_id": "1811536513306299064"
      },
      // … 5 more
    ]
  },
  "page": {
    "next_cursor": null,
    "cursor_expires_at": null,
    "has_more": false,
    "returned": 6
  },
  "warnings": [],
  "meta": {
    "capability": "x.posts.replies.list",
    "result_status": "complete",
    "fetched_at": "2026-10-12T19:11:03.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "title": "platform",
      "metrics.shares": "platform",
      "is_pinned": "capability",
      "root_id": "platform",
      "author.followers": "capability",
      "images": "capability",
      "parent_id": "capability"
    },
    "billing": {
      "amount": "0.002",
      "currency": "USD",
      "balance_after": "9.998"
    }
  }
}

From a response recorded 2026-10-12 19:11 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

X post replies · $0.0020 / a call · Parameters, fields and errors on the endpoint's page →

What the example costs

the post itself, then three pages of its replies

EndpointCallsPriceSubtotal
X post detail1$0.0003$0.0003
X post replies3$0.0020$0.0060
Total4$0.0063

Prices are the prices in force when this page was built. A failed call, and an object that does not exist, cost nothing.

In your AI (MCP)

Connect DataXAPI to your AI client once. Then say what you want; the agent finds these endpoints, checks the price and calls them on your balance.

Say: Use DataXAPI to get three pages of replies to the X post 2108198226532708497, and sort them into agreeing, disagreeing and questions.
What the agent sends to the call tool
{
  "capability": "x.posts.get",
  "id": "2108198226532708497",
  "idempotency_key": "<a new UUID>"
}

Sign in to copy the setup prompt with your keyAbout the MCP server →

With a Skill

Good to know

  • About 35 replies a page, 60 at most; a cursor works for an hour.
  • Each reply's post_id is the conversation's root post. Which reply it answers directly (parent_id), its author's follower count and its image addresses are not returned.
  • The order is X's relevance, not time: sort by published_at yourself to read it by time.
  • A post that does not exist is reported as an upstream error that may be retried once and is not charged; an empty page of replies is charged.