X Post Info (twitter)
X Post Info API β fetch public tweet data (text, likes, retweets, views, media) from a status URL or tweet ID via browser rendering.
Credit cost: 2 credits per call
Authorization
ApiKeyAuth x-api-key<token>
Your API key. Include it in the x-api-key header for every request.
In: header
Query Parameters
query*string
X tweet to retrieve. Accepts a full status URL or numeric tweet ID.
Examples:
https://x.com/rauchg/status/2070215849970119090
2070215849970119090
Notes:
- Legacy
twitter.comstatus URLs are supported. created_atandnamemay be null when not shown on the rendered page.
return_page_source?boolean
When true, return the raw HTML page source as {"result": "..."} instead of structured JSON. Defaults to false.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.piloterr.com/v2/x/post/info?query=string"{
"url": "https://x.com/rauchg/status/2070215849970119090",
"name": null,
"text": "Grok Imagine Video has become the clear leader in @vercel AI Gateway, now amounting to ~50% of videos generated by developers π€― vercel.com/ai-gateway/leaβ¦",
"media": [
"https://pbs.twimg.com/media/HLrgznVbwAAG4y8.png"
],
"tweet_id": "2070215849970119090",
"username": "rauchg",
"verified": true,
"created_at": null,
"like_count": 2517,
"view_count": 232,
"reply_count": 279,
"retweet_count": 791
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Payment required"
}{
"error": "Rate limit exceeded for the API key: quota monthly"
}{
"error": "Internal Error"
}