X (Twitter)
Video
Download the video of a post in every quality X offers.
Endpoint
GET
/s/twitter/postSend your API key in the X-API-Key header. twitter is the usual service slug; use the one shown on your subscription if it differs.
Query parameters
| Name | Description |
|---|---|
urlrequired | Link to the post. You can pass the numeric ID as id instead.Example: https://x.com/NASA/status/1834567890123456789 |
Accepted links
- https://x.com/<user>/status/<id>
- https://twitter.com/<user>/status/<id> (also mobile.twitter.com, fxtwitter.com, vxtwitter.com)
- A numeric post ID
Example request
curl '/s/twitter/post?url=https%3A%2F%2Fx.com%2FNASA%2Fstatus%2F1834567890123456789' \
-H 'X-API-Key: YOUR_API_KEY'Example response
The result is in data. Fields the platform didn't report are left out. Field reference: response shapes.
{
"data": {
"platform": "twitter",
"id": "1834567890123456789",
"url": "https://x.com/NASA/status/1834567890123456789",
"type": "tweet",
"text": "Liftoff! 🚀",
"createdAt": "2026-11-10T14:02:00Z",
"author": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"avatar": "https://cdn.example/avatar.jpg",
"verified": true
},
"media": [
{
"type": "video",
"url": "https://video.twimg.example/1280x720.mp4",
"thumbnail": "https://pbs.twimg.example/thumb.jpg",
"width": 1280,
"height": 720,
"duration": 42.1,
"variants": [
{
"url": "https://video.twimg.example/640x360.mp4",
"contentType": "video/mp4",
"bitrate": 832000,
"width": 640,
"height": 360
}
]
}
],
"stats": {
"likes": 48000,
"comments": 1900,
"reposts": 7200,
"quotes": 640,
"views": 3100000,
"saves": 2100
}
}
}Notes
- media[0].url is the highest-bitrate MP4; variants lists the rest, best first.
- Media URLs are signed by the platform and expire after a few hours. Download the files promptly instead of storing the links.