X (Twitter) Tweet API
Get one public post from its numeric ID: text, author handle and name, post time, language, likes and replies, and whether it is a reply, quote or repost.
- 10 credits per call
- Failed calls are free
- Updated
- x.tweet.syndication
{ "text": "just setting up my twttr", "likes": 308818, "author": "jack", "author_name": "jack", "created": "2006-03-21T20:50:14.000Z", "id": "20", "is_quote": false, "is_reply": false, "is_retweet": false, "lang": "en", "replies": 18073, "url": "https://x.com/jack/status/20"}
What you send
The input
object of the request, with every field the endpoint accepts.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
| tweet_id | string | yes | The post's numeric ID, the number at the end of its link (x.com/jack/status/20 is 20). | 20 |
Fields it returns
What each record in the response holds, with the values from the sample above.
| Field | Type | What it is | Example |
|---|---|---|---|
| text | string | The post's text. | just setting up my twttr |
| author | string | The author's handle. | jack |
| author_name | string | The author's display name. | jack |
| created | string | When the post was published. | 2006-03-21T20:50:14.000Z |
| likes | integer | Likes, as X shows them. | 308,818 |
| replies | integer | Replies, as X shows them. | 18,073 |
| lang | string | The language X detected for the post. | en |
| url | string | The post's link on X. | https://x.com/jack/status/20 |
| id | string | X's ID for the post. | 20 |
| is_quote | boolean | Whether the post quotes another post. | false |
| is_reply | boolean | Whether the post is a reply. | false |
| is_retweet | boolean | Whether the post is a repost. | false |
Call it from your code, or ask your agent
Set UPSCRAPE_API_KEY to your key and copy a working request.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "x.tweet.syndication", "input": { "tweet_id": "20" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "x.tweet.syndication", "input": { "tweet_id": "20" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "x.tweet.syndication", "input": { "tweet_id": "20" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
https://data.upscrape.com/mcp
Use Upscrape to get the X post with ID 20. Who posted it, when, what does it say, and how many likes and replies does it have?
X (Twitter) Tweet API FAQ
The short answers. The docs have the long ones.
How much does the X (Twitter) Tweet API cost?
10 credits per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send tweet_id. The input fields below list every option with its type and limits.
Do I need a X (Twitter) login?
No. It reads public X (Twitter) data; nothing runs on your account.
Can my AI agent call it?
Yes, over MCP: the agent finds x.tweet.syndication, checks its price and runs it with the same credits as the REST API.
Your first X (Twitter) call is free.
Up to 100 free credits to start, no card needed.