Piloterr

X Post Info (twitter)

GET
/v2/x/post/info

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

Autorisierung

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Abfrageparameter

query*string

X tweet to retrieve. Accepts a full status URL or numeric tweet ID.

Examples:

https://x.com/example-user/status/0000000000000000001
2070215849970119090

Notes:

  • Legacy twitter.com status URLs are supported.
  • created_at and name may 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.

fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Antworttext

Successful response

application/json
  1. response
url?string
name?unknown
text?string
media?array<string>
tweet_id?string
username?string
verified?boolean
created_at?unknown
like_count?integer
view_count?integer
reply_count?integer
retweet_count?integer
Example Request
curl -X GET 'https://api.piloterr.com/v2/x/post/info?query=string'
Example Response
{  "url": "https://x.com/example-user/status/0000000000000000001",  "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": "0000000000000000001",  "username": "example-user",  "verified": true,  "created_at": null,  "like_count": 2517,  "view_count": 232,  "reply_count": 279,  "retweet_count": 791}