/v1/comments"platform": "x"X (Twitter) Comments API
The comments under one post.
Get the comments under any public X post and get back text, likes, reply count and time, as JSON over HTTP or from your AI client over MCP. A call to the X (Twitter) Comments API costs 2 credits ($0.004 to $0.0067 depending on the pack), failed calls are free, and the response has the same format as every other call. Last tested 2026-11-05.
Last updated:
limit: 100 and one call pages for you: at most 3 pages, 6 credits. It stops once it has them or the list ends; pages it does not use are not charged, and neither are pages that fail. Reading 1,000 items comes to about 58 credits, about $0.19.Daily watch: tell your AI “watch this daily” and this call runs by itself every day, sending only what is new: at most 62 credits a month, about $0.21. How to set it up
What you get from the X (Twitter) Comments API.
From a recorded answer.
A recorded call returned 6 items; here is the first, field by field. Names and text are removed from the sample; the numbers are as recorded.
93 real calls in the last 7 days, 100% succeeded, median 2.1 s, usually 36 items (data to 2026-11-05).
Lighter for your AI: the same recorded data (6 items) is about 3,463 tokens as the platform's raw JSON and about 1,135 as this interface returns it, 67% fewer (measured 2026-11-06). How it was measured
| Field | In the recorded answer |
|---|---|
| url | removed from the sample |
| text | removed from the sample |
| published_at | 2026-10-08T14:10:01.000Z |
| author.label | anonymous_1 |
| metrics.likes | 14 |
| reply_count | 1 |
| content_id | removed from the sample |
| parent_id | null: X cannot give it |
| root_id | null: X cannot give it |
2 credits a call (≈ $0.004–$0.0067): about 1,500 calls for $10.
X (Twitter) Comments API: request and response
curl https://api.socialtoai.com/v1/comments \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "x", "id": "2108198226532708497" }'import osimport uuidimport requestsresponse = requests.post( "https://api.socialtoai.com/v1/comments", headers={ "Authorization": f"Bearer {os.environ['SOCIALTOAI_API_KEY']}", # A new key for each request; the same one again retries it without paying twice. "Idempotency-Key": str(uuid.uuid4()), }, json={ "platform": "x", "id": "2108198226532708497", },)print(response.json())# Connected over MCP? Ask in plain words.Read the comments under this X post: 2108198226532708497# Your AI calls the comments tool with:{ "platform": "x", "id": "2108198226532708497"}{ "platform": "x", "status": "ok", "items": [ { "platform": "x", "id": "…", "ref": "…", "approx": [], "type": "comment", "url": "https://example.com/…", "text": "…", "published_at": "2026-10-08T14:10:01.000Z", "author": { "label": "anonymous_1" }, "metrics": { "likes": 14 }, "reply_count": 1, "content_id": "…", "parent_id": null, "root_id": null } ], "unavailable": ["parent_id", "root_id"], "page": { "has_more": false }, "cost_credits": 2}Names and text were removed from the sample; the numbers are as recorded.
X (Twitter) Comments API parameters.
3 parameters, 2 required.
Send them as a JSON body with POST. Your key goes in the Authorization header, never in the URL.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| platform | string | Required | — | Always "x" on this page. |
| id | string | Required | — | Post ID, a string of digits |
| cursor | string | Optional | — | Pass page.cursor from the last response to get the next page. |
Where to get what you send.
idPost ID, a string of digits (e.g. 2108198226532708497)
Every item these return carries its ref; send it as it is:
searchX (Twitter) Search APIsearch · sort=latestX (Twitter) Search APIuser_postsX (Twitter) User Posts APIcommunity_postsX (Twitter) community posts APIlist_postsX (Twitter) list posts APIquotesX (Twitter) post quotes APIthreadX (Twitter) thread context APImentionsX (Twitter) user mentions API
X (Twitter) Comments API response fields.
What X cannot give is marked.
| Field | Type | Meaning |
|---|---|---|
| items[].url | string | A link to the comment, where the platform has one. |
| items[].text | string | The comment itself. |
| items[].published_at | string | When it was posted, ISO 8601 in UTC. |
| items[].author.label | string | An anonymous label, stable within one response. Whoever wrote it is never named. |
| items[].metrics.likes | integer | Likes. |
| items[].reply_count | integer | How many replies it has. |
| items[].content_id | string | The item the comment is under. |
| items[].parent_id | stringalways null | The comment it replies to directly; null for a top-level comment. |
| items[].root_id | stringalways null | The top-level comment its thread hangs under. |
nullFields X cannot giveRead null as “X did not give this”, not as zero. These are always null on this call:
parent_idThe comment it replies to directly; null for a top-level comment.root_idThe top-level comment its thread hangs under.
Compared with the TikTok Comments API, this call also gives link.
Every item also has platform, id, ref, approx and type; the response around the items is the same on every call. Response format
X (Twitter) Comments API: paging and billing.
5 calls per second per key, 20 after a purchase; going over is not charged. Rate limits
A failed call costs 0 credits and is never retried on its own. Error codes
“Last tested” above is the last day a real call of this interface succeeded. Each call reads from the platform, and fetched_at in the answer is when it was read. The same request sent again with the same key within 5 minutes is a replay (replayed: true): 0 credits, and the answer as first read.
These numbers come from real calls only, worked out once a day, without our own accounts: a customer's same request on one day counts once, by how it last ended; something that does not exist or a wrong parameter is not a failure; an interface with fewer than 20 calls shows none.
Once connected over MCP, these questions use the X (Twitter) Comments API.
Read the comments under this X post: 2108198226532708497
2 creditscomments {"platform":"x","id":"2108198226532708497"}Search X for posts about "weather forecast", then for the first 3: read the comments under this X post.
8 creditssearch {"platform":"x","query":"weather forecast"}comments {"platform":"x","id":"<ref>"} × 3
Give this to your AI.
Copy it into Claude or ChatGPT.
How to connectUse the SocialToAI MCP server (https://mcp.socialtoai.com/mcp) for this: Read the comments under this X post: 2108198226532708497Call the comments tool with {"platform":"x","id":"2108198226532708497"}. Needed: id.For many items pass limit (limit=100 is at most 3 pages) and one call pages for you; each page costs 2 credits and unused pages are not charged.Before you start, work out how many credits it will take in all and ask me; call it only after I agree.If SocialToAI is not connected yet, tell me how to connect it; never ask me to paste a key into the chat.Answer with a link to every item you used, and tell me how many credits it cost.Paste it into a chat once SocialToAI is connected over MCP. There is no key in it: Claude and ChatGPT sign in, other clients send a key in a header.
These ready-made tools call it when they run.
brand-buzzHow people feel about it on each platform, what comes up most, and the posts behind it
comment-insightsThe topics in their comments and how big each is, plus questions, buying intent and complaints
creator-cardTheir accounts on other platforms, the numbers on each, and how sure the match is
Work scenarios that use it.
brand-monitoringYour AI tells you what people say about a brand: the share of each attitude, what they praise and what they complain about, with the posts behind each point.
comment-sentiment-researchYour AI reads the comments under the posts you choose and tells you the topics and their shares, the questions people ask and the overall mood, with quotes.
The same call on other platforms.
All platforms and prices/v1/comments{ "platform": "x", "id": "2108198226532708497" }2 creditsper callRead next.
What its own API allows, who can use it and what it costs, with sources.
Which platforms give comments, how many a page, at what price.
X's official prices, with sources, and reading X per call instead
what comments say, with original words: the tool or your AI, price per platform, a recorded answer
Let your AI read X.