All sections

REST API · GET

X (Twitter) Media API

Download videos, GIFs, and photos from X (Twitter) posts via x.com or twitter.com links.

GEThttps://api.interapi.dev/api/v1/x

Price: 5 credits per successful response. 5xx is free, 4xx costs at most 1 credit. Pricing

What it does

Accepts post links in the x.com/…/status/… and twitter.com/…/status/… form, including posts with several attachments. For videos it returns every MP4 variant from best to worst with a quality label and frame height; GIFs come back as short MP4 videos with quality GIF, photos in their original size. video_hd_url is the best quality, video_url a variant up to 720p, title holds the post text and author the account handle. The same endpoint also answers at /api/v1/twitter.

  • Videos, GIFs, and photos
  • Every MP4 quality, up to 1080p
  • x.com and twitter.com
  • Multiple attachments per post
  • Alias /api/v1/twitter

How to use it

  1. Copy a link to an X post (x.com or twitter.com).
  2. GET /api/v1/x?url=…
  3. Response: media[] with MP4 variants, GIFs, or photos, plus video_hd_url and thumbnail.

Parameters

urlstringrequired
Link to a public post: x.com/<account>/status/<id> or twitter.com/<account>/status/<id>.

Request example

curl -G "https://api.interapi.dev/api/v1/x" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "url=https://x.com/elonmusk/status/1585341984679469056"

Response example

{
  "status": "success",
  "platform": "InterAPI",
  "title": "Entering Twitter HQ – let that sink in!",
  "description": "Entering Twitter HQ – let that sink in!",
  "author": "elonmusk",
  "media": [
    {
      "type": "video",
      "url": "https://video.twimg.com/…/vid/1920x1080/aeoVUvTgj4wHShhN.mp4",
      "quality": "1080p",
      "download_url": "https://video.twimg.com/…/vid/1920x1080/aeoVUvTgj4wHShhN.mp4",
      "height": 1080,
      "ext": "mp4"
    },
    {
      "type": "video",
      "url": "https://video.twimg.com/…/vid/1280x720/cwj11yOgYZ05R_sY.mp4",
      "quality": "720p",
      "download_url": "https://video.twimg.com/…/vid/1280x720/cwj11yOgYZ05R_sY.mp4",
      "height": 720,
      "ext": "mp4"
    }
  ],
  "video_url": "https://video.twimg.com/…/vid/1280x720/cwj11yOgYZ05R_sY.mp4",
  "video_hd_url": "https://video.twimg.com/…/vid/1920x1080/aeoVUvTgj4wHShhN.mp4",
  "music_url": null,
  "thumbnail": "https://pbs.twimg.com/ext_tw_video_thumb/…/DwJ7wlGIe9iryk6N.jpg",
  "duration_sec": 9,
  "channel_url": null,
  "duration_ms": 1140
}

duration_ms is server processing time. URLs in the example are shortened.

Test a request

Without a key — up to 30 requests per hour per IP. With your key, each request costs the API price in credits.

GET

Paste a link and press Send. The response shows up here.

See also