X Media Scraper & Downloader
Pricing
from $0.40 / 1,000 media results
X Media Scraper & Downloader
Extract photo, video and GIF metadata and source URLs from public X (Twitter) posts or profile media tabs: one row per asset with type, dimensions, duration, quality variants, alt text and the parent post. Optional image downloads. No login, no cookies. Pay only for media saved.
Pricing
from $0.40 / 1,000 media results
Rating
0.0
(0)
Developer
Delowar Munna
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share

Get every photo, video and GIF from public X (Twitter) posts and profiles as clean data. Paste post URLs or profile handles and get one row per media asset: type, direct file URL, preview image, width and height, video duration and bitrate, every quality variant, alt text, and the post it came from. Turn on Download images to store the photo files too. Export to JSON, CSV, Excel or Google Sheets, or call it from the API, Make, Zapier, n8n or an AI agent.
- No login, no cookies, no X account. Public posts and profiles only.
- Two inputs, one run: individual post URLs, and profiles whose media tab is collected newest first. Use either or both.
- One row per asset. A post with four photos gives four rows; a video's quality variants stay together on one row.
- Direct links at the quality you want. Original-size photos, or the highest, middle or lowest bitrate MP4 for videos and GIFs, with all variants listed.
- Optional image downloads to the run's key-value store, with per-file and per-run size caps. Video and GIF files are not downloaded (see Limits).
- Filters: media type (photos, videos, GIFs), minimum width, and a "posted since" date for profiles.
- Incremental runs. Skip media or post IDs you already have, and pay nothing for them.
- Pay only for media saved. Plus one small lookup charge per post URL that returns media; profiles have none. Posts without media, duplicates, filtered items, skipped IDs, failed sources and the run summary are free.
What can you do with it?
| Use case | Setup |
|---|---|
| Archive a brand's or agency's visual output | A profile, Maximum media items 500, scheduled weekly with Posted since |
| Build an image dataset | Several profiles, Media types = Photos, Download images on |
| Collect videos for review | Profiles or post URLs, Media types = Videos; use mediaUrl or variants to fetch the files |
| Accessibility audit | Post URLs; check the altText column for missing descriptions (profiles don't carry alt text) |
| Media from specific posts | Paste the post URLs; every photo, video and GIF in them comes back as its own row |
How to use it
- Add Profiles (handles or profile URLs), Post URLs, or both.
- Set Maximum media items for the whole run.
- Optionally pick Media types, a Minimum width or a Posted since date.
- Optionally turn on Download images.
- Click Start, then download the results from the Output tab.
Run it with the defaults and it returns the 10 latest media items from @NASA's media tab.
Profiles and posts
- Profiles:
NASA,@NASA,https://x.com/NASAorhttps://x.com/NASA/media. The Actor reads the profile's media tab, newest first, page by page until your limit. - Post URLs:
https://x.com/elonmusk/status/1808168603721650364, the same with/photo/1on the end, or just the number. Each post is one request, charged as one post lookup when its media is saved; a post without media is free and noted in the run summary. For many posts from the same account, its profile is usually cheaper.
Profiles and posts share Maximum media items fairly, so one busy profile can't use up the whole limit. An entry given twice runs once, and the same asset reached twice (from a profile and a post URL) is saved once.
Quality and variants
Preferred quality decides which file mediaUrl points to:
- Photos: Best (original size), Large, Medium or Small.
- Videos and GIFs: Best or Large = highest-bitrate MP4, Medium = the middle one, Small = the lowest.
Every MP4 and streaming variant of a video is listed in variants with its bitrate, so you can pick another later. GIFs on X are short MP4 files, so they come back as MP4 links too.
Image downloads
Turn on Download images to store each saved photo in the run's key-value store. The row then gets downloaded: true, the file's storageKey, a downloadUrl and its size. Two caps keep a run bounded: Maximum file size (default 25 MB) and Download budget per run (default 100 MB). When a file is skipped, the row is still saved and downloadError says why. Only stored files are charged as downloads.
Files in a run's key-value store follow Apify's storage retention for your plan; copy them elsewhere if you need to keep them.
Filters and incremental runs
- Media types keeps photos, videos, GIFs, or any mix.
- Minimum width drops media narrower than the value when X reports a width; media without a width is kept. Photos from profiles come without a width, so on profiles it filters videos and GIFs only; on post URLs it filters everything.
- Posted since (profiles only) drops media from older posts, and stops reading a profile once a whole page is older.
- Skip list takes media IDs, post IDs or post URLs from earlier runs. Skipped items aren't saved or charged.
Filters are applied after fetching, so a strict filter can take more requests to reach your limit. Maximum pages per profile and Maximum requests per run (Advanced) bound that.
Input examples
The latest 10 media items from a profile (the default run):
{"handles": ["NASA"],"maxItems": 10}
All media in specific posts:
{"tweetUrls": ["https://x.com/elonmusk/status/1808168603721650364"],"maxItems": 50}
All media from two profiles, with the photos downloaded (the run behind the screenshots below):
{"handles": ["NASA", "SpaceX"],"mediaTypes": ["image", "video", "gif"],"maxItems": 20,"includePostMetadata": true,"preferredQuality": "best","downloadMedia": true}
This month's videos from a profile, lowest bitrate:
{"handles": ["NASA"],"mediaTypes": ["video"],"since": "2026-11-01","preferredQuality": "small","maxItems": 200}
Output
One row per photo, video or GIF. Every row has every field; fields X doesn't provide are null, never guessed.
The output has four tabs. Each shows a few columns of the same rows; the examples below are real records from the NASA and SpaceX run in the input examples, with only the tab's fields.
Overview
A preview, the media type, author, size and direct links. Here, a NASA video:

{"previewUrl": "https://pbs.twimg.com/media/HXk_T7cWcAAEUL9.jpg","mediaType": "video","authorUsername": "NASA","tweetCreatedAt": "2026-11-20T15:19:11.000Z","width": 720,"height": 405,"durationMs": 100714,"mediaUrl": "https://video.twimg.com/amplify_video/2123798254152208384/vid/avc1/1920x1080/xw57gVAFRVo6Us_M.mp4?tag=16","tweetUrl": "https://x.com/NASA/status/2123798314843787300","collectedAt": "2026-11-23T00:04:28.574Z"}
Media details
IDs, position in the post, dimensions, duration, bitrate, variant count and alt text:

{"mediaId": "2123798254152208384","mediaType": "video","mediaIndex": 1,"mediaCountInPost": 1,"width": 720,"height": 405,"durationMs": 100714,"bitrate": 10368000,"variantCount": 5,"altText": null,"mediaPageUrl": "https://x.com/NASA/status/2123798314843787300/video/1","mediaUrl": "https://video.twimg.com/amplify_video/2123798254152208384/vid/avc1/1920x1080/xw57gVAFRVo6Us_M.mp4?tag=16"}
Post context
The post text and engagement counts. Here, a SpaceX photo:

{"previewUrl": "https://pbs.twimg.com/media/HXwCJi3WgAAfTj_?format=jpg&name=small","authorUsername": "SpaceX","authorName": "SpaceX","tweetText": "Falcon 9 and NROL-136 lift off from pad 4E in California 32 hours after teams launched USSF-317, completing our fastest turnaround between launches from the same pad https://t.co/I7wQ5NeDGG","tweetCreatedAt": "2026-11-22T18:50:14.000Z","likeCount": 3968,"retweetCount": 444,"replyCount": 201,"viewCount": 683455,"isRepost": false,"tweetUrl": "https://x.com/SpaceX/status/2124576203113636183"}
Downloads
Each file's download result. Photos are stored; videos and GIFs show NOT_AN_IMAGE:

{"previewUrl": "https://pbs.twimg.com/media/HXwCJi3WgAAfTj_?format=jpg&name=small","mediaType": "image","downloaded": true,"downloadBytes": 1125675,"downloadContentType": "image/jpeg","storageKey": "media_2124575487213076480.jpg","downloadUrl": "https://api.apify.com/v2/key-value-stores/V8ebDCe6yyfMAfrF6/records/media_2124575487213076480.jpg","downloadError": null,"sourceInput": "SpaceX"}
Every row has all the fields below, whichever tab you view. See a full sample of 20 rows with every field.
| Field | Meaning |
|---|---|
id | Stable row ID: m:<mediaId>, or a fingerprint of the post ID, file and type when X gives no media ID. |
mediaId, mediaKey | X's media ID (every row) and media key (post URLs only). |
mediaType | image, video or gif. |
mediaIndex, mediaCountInPost | Position of the asset in its post (1–4) and how many the post has. |
mediaUrl | Direct file link at your Preferred quality. |
previewUrl | Small preview image (a video's or GIF's poster frame). |
mediaPageUrl | The asset's page on X (…/photo/1, …/video/1). |
width, height | Pixels as X reports them: videos always, GIFs when reported, photos from post URLs only (profiles give photos no dimensions). |
durationMs, bitrate | Video length and the chosen variant's bitrate (videos; bitrate also for GIFs). |
variants, variantCount | Every file X offers for a video or GIF: URL, content type, bitrate. null for photos. |
altText | The author's image description, when set. Post URLs only; profiles don't carry it. |
tweetId, tweetUrl, tweetCreatedAt | The post the asset belongs to. For a repost, the original post. |
authorUsername, authorName, authorId | Who posted it. |
isRepost | The profile reposted someone else's post; the asset and author are the original's. |
tweetText, lang, likeCount, retweetCount, replyCount, quoteCount, viewCount | Post details; null when Include post details is off. |
downloaded, storageKey, downloadUrl, downloadBytes, downloadContentType, downloadError | Image download result; all null when Download images is off. |
mode, sourceInput, inputIndex | profile or post, the entry you gave, and its position. |
collectedAt, scrapedAt | When the data was fetched and when the row was saved (ISO, UTC). |
Run summary
The key-value store record RUN_SUMMARY lists the sources requested and processed, per-source status, pages, posts and media seen, posts without media, duplicates, skipped and filtered items, downloads tried, stored and skipped (with reasons), warnings, errors and the reason the run stopped.
Pricing
This Actor uses pay-per-event pricing: you pay per media item saved to the dataset, once per post URL looked up whose media is saved (each post URL is a separate request, while a profile returns about 20 posts per request, so profiles carry no lookup charge), and, only if you turn on Download images, per image file stored. Posts without media, duplicates, items dropped by your filters or skip list, failed or private sources, skipped or failed downloads and the run summary aren't charged. See the Pricing tab for current rates; this README deliberately doesn't quote figures, because they can change.
You can set a maximum cost per run in Apify's run options; the Actor stops cleanly when it's reached.
Limits and coverage
- Public content only. Private, protected and suspended accounts, and posts X hides from logged-out visitors, return nothing.
- Image downloads only. X's video server doesn't allow automated downloading (its
robots.txtblocks it), so this Actor never downloads video or GIF files. Their direct links and all variants are on every row. - Links can expire or change. X controls its media URLs; a deleted post's media stops loading. Download what you need to keep.
- Media in quoted posts belongs to the quoted post and isn't included; add that post's URL to get it.
- Media tab depth. X may stop serving a long media tab before its end. The run summary shows how many pages each profile gave.
- Profile photos come without dimensions or alt text. The data source's media tab gives a photo only its link and ID. Post URLs return width, height, media key and alt text (when the author set one). Videos have dimensions either way.
- Counts are a moment in time. Engagement counts are as X showed them when the page was fetched.
- Rights. Collecting a file doesn't give you the right to reuse it. Respect the creators' copyright.
Use it from the API
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('coregent/x-media-scraper').call({handles: ['NASA'],mediaTypes: ['image', 'video'],maxItems: 100,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Monitor on a schedule
Create a schedule in Apify Console (for example daily) with your profiles and a Posted since date, or pass the media IDs you already have to the Skip list, to save and pay only for new media.
Troubleshooting
| Message | What to do |
|---|---|
profile URL, not a post (put it under Profiles) | Move the entry to Profiles. |
post URL, not a profile (put it under Post URLs) | Move the entry to Post URLs. |
the profile was not found or is unavailable | Check the handle and that the profile opens on X without logging in. |
X returned no media | The profile may be private, suspended or have no media. |
the post was not found or is unavailable | The post may be deleted or private, or the ID is wrong. |
the post has no photos, videos or GIFs | Nothing to save; the post isn't charged. |
NOT_AN_IMAGE in downloadError | Video and GIF files aren't downloaded; use mediaUrl or variants. |
TOO_LARGE / BYTE_BUDGET in downloadError | Raise Maximum file size or Download budget per run. |
the data provider did not answer / rate-limited | A temporary provider problem. Saved rows are kept; run again, or turn on Fail on partial results to make it visible in your pipeline. |
Per-run request limit reached | Raise Maximum requests per run, or set it to 0 (automatic). |
Privacy and disclaimer
This is an independent tool by Coregent. It isn't affiliated with, sponsored by or endorsed by X Corp or Apify; X and Twitter are named only to identify the data source. It collects public media data only and asks for no X login, password or cookies. Public availability isn't unrestricted permission to reuse: use the data and files in line with copyright, applicable privacy laws and X's terms, and not for harassment, spam, surveillance or unauthorized distribution of copyrighted material.
Support
Found a problem or need a feature? Open an issue on the Actor's Issues tab with the run ID, and we'll take a look.