Twitter Media API
Get the photos and videos an X (Twitter) account has posted, with media URLs. $0.01 per call.
Pull the media timeline of any public X account: the tweets that contain photos or videos. Each tweet includes its media items with type, image URL, video URL, duration, width, height, and alt text, plus full engagement metrics and cursor pagination.
Try it live
Fill in the fields and hit Run to see a real response.
{
"ok": true,
"data": {
"cursor": "DAABCgABHV69S9c__-4KAAIdVTZJU9cQiwgAAwAAAAIAAA",
"tweets": [
{
"author": {
"avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"created_at": "2007-12-19T20:20:32+00:00",
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": 92298687,
"following_count": 115,
"id": "11348282",
"is_blue_verified": true,
"likes_count": 17049,
"listed_count": 96842,
"location": "Pale Blue Dot",
"media_count": 28221,
"name": "NASA",
"pinned_tweet_ids": [
"2116263878807998722"
],
"protected": false,
"tweet_count": 74477,
"url": "https://x.com/NASA",
"username": "NASA",
"verified": false,
"verified_type": null,
"website": "http://www.nasa.gov/"
},
"bookmarks": 29,
"conversation_id": "2116263878807998722",
"created_at": "2026-10-30T20:20:01+00:00",
"hashtags": [],
"id": "2116263878807998722",
"in_reply_to_tweet_id": null,
"in_reply_to_username": null,
"is_quote": false,
"is_retweet": false,
"lang": "en",
"likes": 681,
"media": [
{
"alt_text": "Three jet aircraft, each with a white nose and blue body, fly in a triangle formation against a clear blue sky. White trails follow each jet. ",
"duration_ms": null,
"height": 1280,
"type": "photo",
"url": "https://pbs.twimg.com/media/HV56yHnXcAAwYJ2.jpg",
"video_url": null,
"width": 1920
}
],
"mentions": [],
"possibly_sensitive": false,
"quoted_tweet": null,
"quotes": 4,
"replies": 38,
"retweeted_tweet": null,
"retweets": 86,
"text": "MAX POWER, America’s newest aerospace expo and air show, is just a week away!\n\nThis showcase will be packed with events—from aircraft flyovers to a chance to meet NASA astronauts and experts. Here's w…",
"url": "https://x.com/NASA/status/2116263878807998722",
"urls": [
"https://go.nasa.gov/4zjj9BD"
],
"views": 202236
}
]
}
}Features
The profile's Media tab as JSON: every item has at least one photo or video.
Each media item includes type, url, video_url, duration_ms, width, height, and alt_text.
likes, retweets, replies, quotes, bookmarks, and views.
Same inputs, count, and cursor as the other timeline endpoints.
Use cases
Visual Content Research
See which images and videos perform best for an account.
Media Archiving
Collect an account's public photos and videos with alt text.
Creative Benchmarks
Compare video vs. image engagement across competitors.
Quick start
Copy this snippet and start making calls.
const res = await fetch('https://api.yepapi.com/v1/twitter/user-media', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"username": "NASA",
"count": 20
}),
});
const data = await res.json();
console.log(data);The Twitter Media API for an account's photos and videos
The YepAPI Twitter Media API returns the tweets with photos or video from any public X account. Send a username to /v1/twitter/user-media and get back tweets with media URLs, dimensions, durations, alt text, and engagement metrics, at $0.01 per call.
It is the Media tab of a profile, without the scrolling.
What does the Twitter Media API return?
A tweets array and a cursor. Each tweet has a media array whose items include type (such as photo or video), url, video_url, duration_ms, width, height, and alt_text, plus the usual likes, retweets, replies, quotes, bookmarks, and views.
Build a creative performance report
Pull an account's media timeline, split items by media type, and compare average views and likes for photos vs. videos. Run it on competitors to see what visual formats work in your niche.
Twitter Media API pricing: $0.01 per call
Every call costs a flat $0.01 and failed calls are free. There is no monthly tier to buy, no developer account to get approved, and no separate Twitter API key: one YepAPI key covers every endpoint. Timelines are cached for 10 minutes.
Media on other endpoints
Every Tweet object on YepAPI carries the same media array, so search results, single tweets, and replies give you media URLs too. This endpoint just filters a timeline to media posts.
Try the Twitter Media API free
Sign up and get $5 in free credit with no card required. That is 500 calls at $0.01 each to test the Twitter Media API on live X data before you spend anything. The rest of the Twitter / X API is on the same key.
Start making API calls in 30 seconds
$5 free credit on signup. No credit card required. Pay per call.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Pull the media timeline of any public X account: the tweets that contain photos or videos. Each tweet includes its media items with type, image URL, video URL, duration, width, height, and alt text, plus full engagement metrics and cursor pagination.
Each API call costs $0.01. No monthly minimums or subscriptions — you only pay for what you use.
Sign up for a free API key, then send a POST request to /v1/twitter/user-media. Check the code example above for a ready-to-use snippet in JavaScript, cURL, or Python.
YepAPI bundles SEO, AI, and web scraping APIs under one key with no monthly minimums. You get lower per-call pricing, a unified dashboard, and one billing account instead of managing multiple providers.
Ready to integrate?
Get your API key and start making calls in 30 seconds. $5 free credit on signup — no credit card required.
More Twitter / X API endpoints
Twitter Followers API
$0.01List the followers of any X (Twitter) account with full profiles. $0.01 per call.
Twitter Following API
$0.01List the accounts any X (Twitter) user follows, with full profiles. $0.01 per call.
Twitter User API (X Profile API)
$0.01Get any X (Twitter) profile by username: followers, following, tweets, bio, and verification. $0.01 per call.
X About This Account API
$0.01Get X's "About this account" data: country, username changes, verified-since date, and affiliation. $0.01 per call.
Twitter Bulk Users API
$0.01Look up to 100 X (Twitter) profiles by user id in a single call. $0.01 per call.
Tweet Scraper API (User Tweets)
$0.01Get the latest tweets from any X (Twitter) account with full engagement metrics. A tweet scraper at $0.01 per call.