X (Twitter)

GIF

Download a GIF from a post. X stores GIFs as short silent MP4 files.

Endpoint

GET
/s/twitter/post

Send 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

NameDescription
urlrequired
Link to the post. You can pass the numeric ID as id instead.Example: https://x.com/user/status/1834567890123456791

Example request

curl '/s/twitter/post?url=https%3A%2F%2Fx.com%2Fuser%2Fstatus%2F1834567890123456791' \
  -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": "1834567890123456791",
    "url": "https://x.com/user/status/1834567890123456791",
    "type": "tweet",
    "text": "Friday mood",
    "author": {
      "id": "1234567890",
      "username": "user",
      "name": "Example User",
      "avatar": "https://cdn.example/avatar.jpg",
      "verified": false
    },
    "media": [
      {
        "type": "gif",
        "url": "https://video.twimg.example/tweet_video/abc.mp4",
        "thumbnail": "https://pbs.twimg.example/tweet_video_thumb/abc.jpg",
        "width": 498,
        "height": 280
      }
    ],
    "stats": {
      "likes": 120,
      "comments": 4,
      "reposts": 9
    }
  }
}

Notes