Sources › Social media › X (Twitter) › Tweet Detail

X (Twitter) Tweet Detail API

Tweet by URL or id: text, author, media, metrics, createdAt. viewCount null for pre-2023 tweets.

X (Twitter)GET /postAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/social-media:x-scraper/post

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 5 minutes.

Parameters

NameTypeInRequiredDescription
urlstringqueryNoTweet URL (x.com / twitter.com). Example: https://x.com/SpaceX/status/1732824684683784516
idstringqueryNoTweet id (alternative to url). Example: 1732824684683784516
freshenum: true | falsequeryNoSkip cache (impact rounds). Example: false

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/social-media:x-scraper/post?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/social-media:x-scraper/post?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/social-media:x-scraper/post",
    params={"url":"https://x.com/SpaceX/status/1732824684683784516","id":"1732824684683784516","fresh":"false"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Frequently asked questions

How do I call the X (Twitter) Tweet Detail API?

Send a GET request to https://api.zapi.ink/v1/social-media:x-scraper/post with your Zapi key in the x-api-key header. Parameters — optional: url, id, fresh. The response is JSON in the { project, data, timestamp } envelope.

What does the X (Twitter) Tweet Detail API return?

Tweet by URL or id: text, author, media, metrics, createdAt.

Is the X (Twitter) Tweet Detail API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the X (Twitter) Tweet Detail API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "x-scraper" and endpoint "post".

What other X (Twitter) API endpoints are there?

It has 3 endpoints. Besides Tweet Detail: Tweet Replies, User Tweets.