# Twitter (X) Video Downloader and Tweet Scraper (`pshivam/twitter-video-downloader-scraper`) Actor

Download videos, GIFs and photos from tweets and scrape tweet data without login or API key: text, author, likes, replies, date, quoted tweet and all video sizes as MP4 links. Paste tweet links, get clean rows. Export to Excel, CSV or API.

- **URL**: https://apify.com/pshivam/twitter-video-downloader-scraper.md
- **Developed by:** [Shivam Prajapati](https://apify.com/pshivam) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitter (X) Video Downloader and Tweet Scraper

**Paste tweet links, get the video, GIF and photo download links and the tweet data. No login, no cookies, no API key.** For every tweet you get the **MP4 links of every video size** (best first), the **original-size photos**, the **text, author, likes, replies, date, hashtags, mentions and links**, and the **quoted tweet** and the **tweet it answers**. Choose one row per tweet, one row per photo or video (a ready download list), or both. Export to Excel, CSV, JSON or the API.

**Actively maintained.** Last update: 2026-11-13. Every release passes 100+ automated tests on real saved X answers, and Apify test-runs it every day.

### What can you use it for?

- **Download Twitter videos and GIFs.** Every row has `videoUrl`, a direct MP4 link that opens and downloads in any browser or tool, and `videoQualities` with every size from 480p up to 1080p.
- **Save photos in original size.** `photoUrls` holds the full-size picture links of a tweet, in order.
- **Archive tweets.** Keep text, author, date, counts and media links of tweets you cite, report on or have to preserve.
- **Check engagement.** Likes and replies of a list of tweets in one table, for campaign reports and influencer checks.
- **Enrich a list of tweet links.** Turn links from a spreadsheet, a newsletter or a monitoring tool into rows with author, text and media.
- **Feed automations.** Use the Actor in Make, n8n, Zapier or your own code to get the media link of a tweet the moment it is posted.

### What data do you get?

One row per tweet (`recordType` is `tweet`) and, if you ask for them, one row per photo, GIF or video (`recordType` is `media`).

| Field | What it is |
|---|---|
| `recordType` | `tweet` for a tweet, `media` for one photo, GIF or video |
| `tweetId`, `url` | The tweet's number and address |
| `text` | The tweet's text with the real web addresses. The link to the attached media is removed |
| `createdAt` | When the tweet was published (UTC) |
| `language` | The language X detected |
| `edited`, `sensitive` | Whether the tweet was edited and whether X marks it as possibly sensitive |
| `textTruncated` | True for a long tweet, where X shows only the start of the text |
| `authorId`, `authorUsername`, `authorName` | Who wrote the tweet |
| `authorVerified`, `authorLegacyVerified` | The blue check and the old verified status |
| `authorAvatarUrl`, `authorUrl` | The profile picture (large) and the profile address |
| `likes`, `replies` | Likes and replies of the tweet |
| `hashtags`, `mentions`, `cashtags`, `links` | Hashtags, @mentions, cashtags such as $TSLA and the web addresses in the tweet |
| `replyToTweetId`, `replyToUsername` | The tweet this tweet answers |
| `replyTo` | The tweet this tweet answers: `tweetId`, `url`, `text`, `createdAt`, `authorUsername`, `authorName`, `likes`, `replies`, `reposts`, `photoUrls`, `videoUrl` |
| `quotedTweet` | The tweet this tweet quotes, with the same fields as `replyTo` |
| `place` | The place the author tagged |
| `communityNote` | The text of the community note under the tweet |
| `replyPolicy` | Who may reply, when the author limited it |
| `mediaType` | `photo`, `video`, `gif` or `mixed`. Empty for a tweet without media |
| `mediaCount` | Number of photos or videos |
| `photoUrls` | The photos in original size |
| `videoUrl` | The best MP4 file of the video or GIF |
| `videoQualities` | Every MP4 size: `url`, `width`, `height`, `bitrate` |
| `videoDuration`, `videoWidth`, `videoHeight` | Length in seconds and size of the best file |
| `thumbnailUrl` | The preview picture of the video, or the first photo |
| `streamUrl` | The HLS stream (`.m3u8`) of the video |
| `mediaIndex`, `mediaUrl`, `mediaWidth`, `mediaHeight` | For media rows: the position of the file in the tweet, its download link and its size |
| `sourceUrl`, `scrapedAt` | The address that was read and when the record was collected |

#### Example results

```json
{"recordType": "tweet", "tweetId": "1585341984679469056", "url": "https://x.com/elonmusk/status/1585341984679469056", "text": "Entering Twitter HQ – let that sink in!",
 "createdAt": "2022-10-26T18:45:58+00:00", "language": "en", "edited": false, "sensitive": false, "textTruncated": false, "authorUsername": "elonmusk", "authorName": "Elon Musk",
 "authorVerified": true, "authorLegacyVerified": false, "authorUrl": "https://x.com/elonmusk", "likes": 1222698, "replies": 58073, "mediaType": "video", "mediaCount": 1,
 "videoUrl": "https://video.twimg.com/ext_tw_video/1585341912877146112/pu/vid/1920x1080/aeoVUvTgj4wHShhN.mp4?tag=14",
 "videoQualities": [{"url": "https://video.twimg.com/ext_tw_video/1585341912877146112/pu/vid/1920x1080/aeoVUvTgj4wHShhN.mp4?tag=14", "width": 1920, "height": 1080, "bitrate": 10368000},
                    {"url": "https://video.twimg.com/ext_tw_video/1585341912877146112/pu/vid/1280x720/cwj11yOgYZ05R_sY.mp4?tag=14", "width": 1280, "height": 720, "bitrate": 2176000},
                    {"url": "https://video.twimg.com/ext_tw_video/1585341912877146112/pu/vid/640x360/UOvGixKQhzYgqVGG.mp4?tag=14", "width": 640, "height": 360, "bitrate": 832000},
                    {"url": "https://video.twimg.com/ext_tw_video/1585341912877146112/pu/vid/480x270/6tarM2TjLH1Ahh90.mp4?tag=14", "width": 480, "height": 270, "bitrate": 256000}],
 "videoDuration": 9.3, "videoWidth": 1920, "videoHeight": 1080, "thumbnailUrl": "https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg",
 "sourceUrl": "https://cdn.syndication.twimg.com/tweet-result?id=1585341984679469056"}
```

```json
{"recordType": "tweet", "tweetId": "1272656056259395586", "url": "https://x.com/EireannDolan/status/1272656056259395586", "text": "There’s always a dril tweet",
 "createdAt": "2020-06-15T22:23:43+00:00", "language": "en", "authorUsername": "EireannDolan", "authorName": "Eireann Dolan", "likes": 287, "replies": 4, "mediaCount": 0,
 "quotedTweet": {"tweetId": "459523497363271682", "url": "https://x.com/dril/status/459523497363271682", "text": "me: i dont even care if they cancel sports\nhoward stern: Thats wild",
                 "createdAt": "2014-04-25T02:45:13+00:00", "authorUsername": "dril", "authorName": "wint", "likes": 10233, "replies": 32, "reposts": 3907, "photoUrls": [], "videoUrl": null}}
```

```json
{"recordType": "media", "tweetId": "1461948320708919296", "mediaType": "photo", "mediaCount": 3, "mediaIndex": 2, "mediaUrl": "https://pbs.twimg.com/media/FEniO3IVkAUtaqh.jpg?name=orig",
 "mediaWidth": 1024, "mediaHeight": 768, "text": "We met @lizzo 😍🤙"}
```

### How to use it

1. Paste the tweet links into **Tweet links or numbers**, one per line. Links from x.com, twitter.com and mobile.twitter.com work, with or without the `?s=20` tail. A bare tweet number works too.
2. Choose **What to get**: tweets, media files or both.
3. Press Start. A tweet takes a fraction of a second, so a list of 1,000 tweets takes a few minutes.
4. Open the **Media files** view for a download list, or the **Tweets** view for the data.

#### Input options

| Input | What it does |
|---|---|
| `tweets` | Tweet links (`https://x.com/NASA/status/1585341984679469056`) or tweet numbers, one per line |
| `resultType` | `tweets` (default), `media` (one row per photo or video) or `both` |
| `onlyNew` | Skip records that earlier runs of the same list already returned |
| `maxItems` | Stop after this many records in total. 1,000 by default |
| `maxConcurrency` | Tweets read at the same time. 5 by default |
| `secondsBetweenRequests` | Pause between requests. 0.1 seconds by default |

### How much does it cost?

You pay per record returned (a tweet or a media file), nothing else. 1,000 tweets cost $0.50 on the Free plan, with no start fee. Tweets that cannot be read (deleted, suspended, protected or wrong numbers) are not returned and not charged. The first Apify plan includes free monthly credit to try it.

| Plan | Price per 1,000 records |
|---|---|
| Free | $0.50 |
| Bronze | $0.45 |
| Silver | $0.40 |
| Gold | $0.35 |

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/twitter-video-downloader-scraper").call(run_input={
    "tweets": ["https://x.com/elonmusk/status/1585341984679469056"],
    "resultType": "media",
})
for file in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(file["mediaType"], file["mediaWidth"], file["mediaHeight"], file["mediaUrl"])
```

#### Use it in Clay, n8n, Make or Zapier

Use the Actor ID `pshivam/twitter-video-downloader-scraper` and this input:

```json
{"tweets": ["https://x.com/NASA/status/1585341984679469056"], "resultType": "both"}
```

### Good to know

- **It reads tweets you give it.** The source is the public address X uses to show tweets on other websites. It answers for a tweet link or number. It cannot list a profile's tweets, search, or list replies, followers or likes.
- **Some counts are not in the source.** A tweet row has `likes` and `replies`. The number of reposts and views of the tweet itself is not offered. `replyTo` and `quotedTweet` carry `reposts`.
- **Long tweets are cut.** For a long tweet X sends only the start of the text. `textTruncated` is `true` for them.
- **Deleted, suspended and protected tweets** cannot be shown. The run message names them with the reason. They are not returned or charged.
- **Download links.** `videoUrl`, `mediaUrl` and `photoUrls` are public links on X's media servers. They open and download without login. The Actor does not store the files.
- **No account, no risk to your account.** The Actor never logs in.
- **Slow-downs.** The Actor paces its requests, waits as X asks, and switches to Apify Proxy when it runs on Apify and X keeps blocking.
- **Independent tool.** Not affiliated with or endorsed by X Corp. It reads public data. Respect the rights of the people who made the media you download.

### FAQ

#### How do I download a Twitter (X) video?

Paste the tweet link into `tweets` and press Start. The row has `videoUrl`, a direct MP4 link. Open it in a browser and save the file, or download it with any tool. `videoQualities` lists the other sizes.

#### Do I need an X account, cookies or an API key?

No. The Actor never logs in.

#### Which links work?

Links from x.com, twitter.com and mobile.twitter.com, with or without a user name (`x.com/i/web/status/...`), with a `?s=20` tail or a `/video/1` ending. A bare tweet number works too.

#### Can I download GIFs and photos?

Yes. A GIF is an MP4 file with `mediaType` set to `gif`. Photos are in `photoUrls` in original size. Set `resultType` to `media` to get one row per file.

#### Can I get all tweets of a user or search tweets?

No. The Actor reads the tweets whose links or numbers you give it. It does not list a profile and does not search.

#### What happens to deleted or private tweets?

They cannot be read. The run message tells which ones and why, and you are not charged for them.

#### How do I get the best quality?

`videoUrl` is the largest file. `videoQualities` lists every size, best first, with width, height and bitrate.

#### How do I get only new tweets from a list?

Turn on `onlyNew` and run the same list again later. Tweets that earlier runs returned are skipped and not charged.

#### Is it legal to download tweets and videos?

The Actor reads data that X shows publicly without login. You are responsible for how you use the data and the media, including privacy and copyright rules.

# Actor input Schema

## `tweets` (type: `array`):

The tweets to read: links such as https://x.com/NASA/status/1585341984679469056 (x.com, twitter.com, mobile links) or just the tweet number. One per line.

## `resultType` (type: `string`):

One row per tweet (text, author, counts, all media links), one row per photo or video (a download list), or both.

## `onlyNew` (type: `boolean`):

Skip records that earlier runs of this same list of tweets already returned, so you get and pay for new ones only. The first run works as usual and remembers what it returned, in your key-value store 'twitter-video-downloader-scraper-only-new'.

## `maxItems` (type: `integer`):

Stop after this many records in total (tweets and media files). You are charged per record.

## `maxConcurrency` (type: `integer`):

How many tweets are read in parallel. Raise it for long lists.

## `secondsBetweenRequests` (type: `number`):

Pause between requests. After a slow-down answer the Actor doubles the pause and switches to Apify Proxy when it can.

## Actor input object example

```json
{
  "tweets": [
    "https://x.com/elonmusk/status/1585341984679469056"
  ],
  "resultType": "tweets",
  "onlyNew": false,
  "maxItems": 100,
  "maxConcurrency": 5,
  "secondsBetweenRequests": 0.1
}
```

# Actor output Schema

## `tweets` (type: `string`):

Every tweet with text, author, counts and media links.

## `media` (type: `string`):

One row per photo or video with its download link.

## `runStats` (type: `string`):

Requests made, time spent and number of records for this run (RUN_STATS record).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tweets": [
        "https://x.com/elonmusk/status/1585341984679469056"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/twitter-video-downloader-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "tweets": ["https://x.com/elonmusk/status/1585341984679469056"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("pshivam/twitter-video-downloader-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tweets": [
    "https://x.com/elonmusk/status/1585341984679469056"
  ],
  "maxItems": 100
}' |
apify call pshivam/twitter-video-downloader-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pshivam/twitter-video-downloader-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/xhaK3MHKwOCaRKpSH/builds/40oJDildEcMtR1V6u/openapi.json
