Skip to content

Twitter image API: get a tweet's images and media

When you look up a tweet or read an account's timeline, each tweet comes back with a media array. Photos carry an image URL. Videos carry a thumbnail and a direct video URL. You get the links as JSON and download the files from them yourself. It reads public X tweets only.

Look up a tweet and its media now, no signupThen run the same call from code.
Twitter image API: prints sorted on a light table.

The job

To get an image from a tweet, you need the tweet itself, not a screenshot. The tweet lookup returns the full record with its media, so a single call by id or URL gives you the image links, the text and the author.

To collect images from many tweets, read an account's timeline or run a search and keep the rows where media is not empty. Each item has a type of photo or video, an image url, and, for videos, a videoUrl you can fetch.

The API returns links, not the files, and it doesn't resize or convert anything. Fetch the URLs from your own server, and check the image owner's rights before you reuse a picture. This is X only.

How it works

  1. Get the tweet id

    For the lookup, you can pass the number at the end of a tweet link or the full link.

  2. Look up the tweet

    GET /v1/x/tweets/{id} and read the media array on the returned tweet.

  3. Or scan a timeline

    GET /v1/x/users/{handle}/tweets or run a search, then keep the rows whose media array has entries.

  4. Download from the URLs

    Fetch each url for photos, or videoUrl for videos, from your own server and store the files where you need them.

Endpoints that do it

EndpointWhat it's forCredits
Get a tweetGET /v1/x/tweets/{id}One tweet by id or link, with its media array, text and author.2 credits
List user tweetsGET /v1/x/users/{handle}/tweetsAn account's recent tweets, each with its media, so you can collect images in bulk.2 credits
Search tweetsGET /v1/x/tweets/searchTweets that match a query, for example with filter:images, with their media.2 credits

Free tools for the same job

Try the job in a browser first. These tools call the same endpoints, and you don't need a key or any code.

Tweets with their media

Each tweet carries a media array. Look for entries with a photo or video type. The response below was recorded from a real call.

curl "https://api.chatterapi.com/v1/x/users/levelsio/tweets" \
  -H "Authorization: Bearer $CHATTERAPI_KEY"
response, first 2 rows
{
  "data": [
    {
      "id": "2110066474513793361",
      "text": "✨ 200,000+ users on my computer nostalgia project @pieter\n\nSometimes it takes a few years for things to take off, in this case about 2 years!\n\nKeep creating 💖 https://t.co/Na0LXnwAjW",
      "url": "https://x.com/levelsio/status/2110066474513793361",
      "createdAt": "2026-10-13T17:53:45.000Z",
      "lang": "en",
      "likes": 129,
      "retweets": 4,
      "replies": 37,
      "quotes": 0,
      "views": 15475,
      "bookmarks": 9,
      "isReply": false,
      "inReplyToId": null,
      "conversationId": "2110066474513793361",
      "isRetweet": false,
      "quotedTweetId": "2108957488410161442",
      "type": "quote",
      "isQuote": true,
      "isPinned": false,
      "source": null,
      "hasVideo": false,
      "urls": [],
      "mentions": [
        "pieter"
      ],
      "author": {
        "id": "1577241403",
        "handle": "levelsio",
        "name": "@levelsio",
        "bio": "💸http://levels.vc\n📸http://PhotoAI.com $86K/m\n🎮http://VibeJam.com $44K/m\n🏡http://InteriorAI.com $23K/m\n👙@X $13K/m\n🌍http://Nomads.com $7K/m\n🏩http://Hotelist.com $5K/m",
        "followers": 974707,
        "following": 3276,
        "tweets": 181450,
        "verified": false,
        "blueVerified": true,
        "canDm": false,
        "protected": false,
        "location": "📕My book $5K/m 👉",
        "url": "https://readMAKE.com",
        "avatarUrl": "https://pbs.twimg.com/profile_images/2077111020305162240/PwddgOau_400x400.jpg",
        "createdAt": "2013-07-08T09:31:59.000Z",
        "profileUrl": "https://x.com/levelsio",
        "bannerUrl": "https://pbs.twimg.com/profile_banners/1577241403/1665964220",
        "likesGiven": 185852,
        "mediaCount": 19829,
        "pinnedTweetIds": [
          "2109949585737052316"
        ]
      },
      "media": [
        {
          "type": "photo",
          "url": "https://pbs.twimg.com/media/HUh2NAYWQAAP7ZK.jpg",
          "videoUrl": null
        }
      ],
      "quotedTweet": {
        "id": "2108957488410161442",
        "text": "💾 Two years ago I started working on these crazy nostalgia projects, kind of randomly, because I was bored and wanted to do something different than just build another SaaS or AI app/website\n\nI wanted to try to run Wind…",
        "url": "https://x.com/levelsio/status/2108957488410161442",
        "createdAt": null,
        "lang": null,
        "likes": null,
        "retweets": null,
        "replies": null,
        "quotes": null,
        "views": null,
        "bookmarks": null,
        "isReply": false,
        "inReplyToId": null,
        "conversationId": null,
        "isRetweet": false,
        "quotedTweetId": null,
        "type": "tweet",
        "isQuote": false,
        "isPinned": false,
        "source": null,
        "hasVideo": false,
        "urls": [],
        "mentions": [],
        "author": {
          "id": "",
          "handle": "levelsio",
          "name": "@levelsio",
          "bio": null,
          "followers": null,
          "following": null,
          "tweets": null,
          "verified": null,
          "blueVerified": null,
          "canDm": null,
          "protected": null,
          "location": null,
          "url": null,
          "avatarUrl": null,
          "createdAt": null,
          "profileUrl": "https://x.com/levelsio",
          "bannerUrl": null,
          "likesGiven": null,
          "mediaCount": null,
          "pinnedTweetIds": null
        },
        "media": []
      },
      "retweetedTweet": null
    },
    {
      "id": "2110030627336540370",
      "text": "This is also interesting to think about\n\nRight now it still takes, let's say, 30 minutes to a few hours to build something usable with AI and then you still polish for days/weeks/months\n\nIf we assume this will keep getti…",
      "url": "https://x.com/levelsio/status/2110030627336540370",
      "createdAt": "2026-10-13T15:31:18.000Z",
      "lang": "en",
      "likes": 324,
      "retweets": 11,
      "replies": 112,
      "quotes": 10,
      "views": 38339,
      "bookmarks": 118,
      "isReply": false,
      "inReplyToId": null,
      "conversationId": "2110030627336540370",
      "isRetweet": false,
      "quotedTweetId": null,
      "type": "quote",
      "isQuote": true,
      "isPinned": false,
      "source": null,
      "hasVideo": false,
      "urls": [],
      "mentions": [],
      "author": {
        "id": "1577241403",
        "handle": "levelsio",
        "name": "@levelsio",
        "bio": "💸http://levels.vc\n📸http://PhotoAI.com $86K/m\n🎮http://VibeJam.com $44K/m\n🏡http://InteriorAI.com $23K/m\n👙@X $13K/m\n🌍http://Nomads.com $7K/m\n🏩http://Hotelist.com $5K/m",
        "followers": 974707,
        "following": 3276,
        "tweets": 181450,
        "verified": false,
        "blueVerified": true,
        "canDm": false,
        "protected": false,
        "location": "📕My book $5K/m 👉",
        "url": "https://readMAKE.com",
        "avatarUrl": "https://pbs.twimg.com/profile_images/2077111020305162240/PwddgOau_400x400.jpg",
        "createdAt": "2013-07-08T09:31:59.000Z",
        "profileUrl": "https://x.com/levelsio",
        "bannerUrl": "https://pbs.twimg.com/profile_banners/1577241403/1665964220",
        "likesGiven": 185852,
        "mediaCount": 19829,
        "pinnedTweetIds": [
          "2109949585737052316"
        ]
      },
      "media": [],
      "quotedTweet": {
        "id": "",
        "text": "",
        "url": "https://x.com/i/status/",
        "createdAt": null,
        "lang": null,
        "likes": null,
        "retweets": null,
        "replies": null,
        "quotes": null,
        "views": null,
        "bookmarks": null,
        "isReply": false,
        "inReplyToId": null,
        "conversationId": null,
        "isRetweet": false,
        "quotedTweetId": null,
        "type": "tweet",
        "isQuote": false,
        "isPinned": false,
        "source": null,
        "hasVideo": false,
        "urls": [],
        "mentions": [],
        "author": {
          "id": "",
          "handle": "",
          "name": "",
          "bio": null,
          "followers": null,
          "following": null,
          "tweets": null,
          "verified": null,
          "blueVerified": null,
          "canDm": null,
          "protected": null,
          "location": null,
          "url": null,
          "avatarUrl": null,
          "createdAt": null,
          "profileUrl": "https://x.com/",
          "bannerUrl": null,
          "likesGiven": null,
          "mediaCount": null,
          "pinnedTweetIds": null
        },
        "media": []
      },
      "retweetedTweet": null
    }
  ],
  "page": {
    "nextCursor": "AYCt…",
    "hasMore": true
  }
}

Recorded from a live call on . Long text is shortened and the cursor is cut. A live key is charged 2 credits for this call. A test key returns this same sample for 0 credits.

What it won't do

  • X only. For Reddit images, read the post's own URL fields.
  • You get links to the files, not the files. Downloading, resizing and storing are up to you.
  • Public tweets only. Deleted tweets and protected accounts are not returned, and a media link can stop working if the owner removes it.
  • It does not upload images or post tweets with media.

Questions

How do I get an image from a tweet with the API?
Look up the tweet by id or link and read its media array. Each photo has a url you can fetch.
Can I download a video through the API?
Video tweets include a videoUrl in the response. The API gives you the link, and you download the file yourself.
Can I see a tweet's media without code first?
Yes. The free X tweet lookup tool runs in the browser with no signup.
Can I collect every image an account has posted?
Page through the timeline and keep the rows that have media. Each call returns about 20 tweets, so a long history takes several pages.
Can I reuse the images I get?
Images belong to whoever posted them. Check their rights and X's terms before you republish anything.

More ways to use the API

Build it with one API key

Try it free for 7 days with 1,000 credits.