# Twitter Video Downloader Scraper (`soft_alexist/twitter-video-downloader-scraper`) Actor

Download direct video links from X (Twitter) posts with one click. This scraper extracts download URLs from tweet videos, enabling archiving, research, and offline access. Supports batch processing, handles failures gracefully, and works with any X video post.

- **URL**: https://apify.com/soft\_alexist/twitter-video-downloader-scraper.md
- **Developed by:** [Soft Alexist](https://apify.com/soft_alexist) (community)
- **Categories:** Automation, Developer tools, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## X.com Video Downloader Scraper: Extract Direct Video Links Instantly

---

### What Is X.com?

X (formerly Twitter) is a global social media platform hosting millions of user-generated videos daily. From breaking news to entertainment, X videos are shared widely but are often ephemeral—creators delete posts, accounts disappear, or content becomes unavailable. Manually downloading videos one-by-one is tedious and impractical at scale. The **X.com Video Downloader Scraper** automates extraction of direct video download URLs, preserving content and enabling offline access.

---

### Overview

The **X Video Downloader Scraper** extracts direct downloadable video links from X.com tweet URLs. It is designed for:

- **Content researchers** archiving videos for studies or documentation
- **Journalists & newsrooms** preserving breaking news video evidence
- **Content creators** backing up reposted or shared video content
- **Developers** integrating X video URLs into custom applications

Key strengths include batch URL processing, robust error handling with `ignore_url_failures`, and direct download URL extraction—eliminating the need for third-party download services or browser extensions.

---

### Input Format

The scraper accepts a JSON configuration with two parameters:

```json
{
  "urls": [
    "https://x.com/afrojack/status/1672340271957422080",
    "https://x.com/username/status/1234567890123456789"
  ],
  "ignore_url_failures": true
}
````

| Field | Type | Description |
|---|---|---|
| `urls` | Array of strings | Direct links to X (Twitter) tweet posts containing video content. Paste one URL per line or use bulk edit. Each URL must point to a valid X.com tweet page. |
| `ignore_url_failures` | Boolean | If `true`, the scraper continues processing remaining URLs even if some fail (e.g., deleted tweets, private accounts). If `false`, the entire run stops on the first error. Default: `true`. |

**Requirements & Limitations:**

- URLs must link directly to tweets (not search results or user profiles)
- Tweets must contain native X video content or embedded video
- Private/protected tweets cannot be accessed
- Videos from suspended accounts are unavailable
- Rate limiting may apply during bulk runs

***

### Output Format

The scraper returns a single, essential field per processed URL:

#### Output Structure

```json
{
  "download_url": "https://ytdlp.online/api/v1/file/AFROJACK%20-%20videos%20on%20twitter%20ok%20ok.mp4",
  "from_url": "https://x.com/afrojack/status/1672340271957422080"
}
```

| Field | Meaning | Example |
|---|---|---|
| `Download URL` | Direct, downloadable link to the video file in MP4 format | `...` |

**Field Details:**

- **Direct Download:** The URL points directly to the video file, playable or downloadable in standard browsers and media players
- **Format:** MP4 video codec, compatible with Windows Media Player, VLC, mobile devices, and web browsers
- **Resolution:** Download URL may include resolution information (720p, 1080p, depending on X's encoding)
- **Expiry:** X-hosted video URLs typically remain valid indefinitely, but links may expire if X's infrastructure changes
- **No Authentication Required:** Downloaded videos can be played offline without X login

***

### How to Use

1. **Collect tweet URLs** — Browse X.com and find tweets with video content. Copy the full tweet URL (e.g., click "Share," then copy the link).
2. **Prepare your input** — Paste URLs into the `urls` array in the JSON input, or use the UI's bulk paste feature.
3. **Configure error handling** — Leave `ignore_url_failures: true` to skip problematic URLs without stopping the run.
4. **Start the scraper** — Click "Run" and monitor progress in the logs.
5. **Download videos** — Extract the Download URLs from the results and use your favorite downloader (or paste directly into a browser).

**Tips & Best Practices:**

- For large batches (100+ URLs), enable `ignore_url_failures` to avoid interruptions
- Test with a small batch first to verify URLs are valid
- Videos may take 5-10 seconds per URL; plan accordingly
- Keep timestamps of downloaded videos for attribution and evidence preservation

**Common Issues:**

- **"URL not found":** Tweet may be deleted or private. Verify the URL is correct and the tweet is public.
- **Empty result:** Video may be embedded from an external source (YouTube, etc.); native X videos only.

***

### Use Cases & Business Value

- **News archiving:** Preserve breaking news videos before deletion or account suspension
- **Evidence preservation:** Document social media incidents for legal or compliance purposes
- **Research & analysis:** Build datasets of viral videos for media studies
- **Offline access:** Save videos for viewing without internet connectivity
- **Backup & redundancy:** Create local archives of important video content

The X Video Downloader Scraper transforms ephemeral social media content into permanent, portable records—invaluable for researchers, journalists, and organizations managing digital assets.

***

### Legal & Compliance Disclaimer

**Important:** Users are responsible for ensuring compliance with X's Terms of Service, applicable copyright laws, and privacy regulations. Downloaded content may be protected by copyright, intellectual property rights, or privacy law. Only download and use videos you have rights to use, or obtain permission from content creators. This scraper is intended for personal archiving, research, and legitimate backup purposes only. Redistribution of copyrighted material without permission is prohibited.

***

### Conclusion

The **X.com Video Downloader Scraper** provides a fast, reliable way to extract direct video links from X posts. Whether preserving breaking news, backing up research materials, or enabling offline viewing, this scraper eliminates manual work and delivers actionable download URLs in seconds. Start scraping today and take control of your video content.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the videos urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

## Actor input object example

```json
{
  "urls": [
    "https://x.com/afrojack/status/1672340271957422080"
  ],
  "ignore_url_failures": true
}
```

# 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 = {
    "urls": [
        "https://x.com/afrojack/status/1672340271957422080"
    ],
    "ignore_url_failures": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("soft_alexist/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 = {
    "urls": ["https://x.com/afrojack/status/1672340271957422080"],
    "ignore_url_failures": True,
}

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

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "https://x.com/afrojack/status/1672340271957422080"
  ],
  "ignore_url_failures": true
}' |
apify call soft_alexist/twitter-video-downloader-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=soft_alexist/twitter-video-downloader-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter Video Downloader Scraper",
        "description": "Download direct video links from X (Twitter) posts with one click. This scraper extracts download URLs from tweet videos, enabling archiving, research, and offline access. Supports batch processing, handles failures gracefully, and works with any X video post.",
        "version": "0.0",
        "x-build-id": "79hM02lT9yanofH5L"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/soft_alexist~twitter-video-downloader-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-soft_alexist-twitter-video-downloader-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/soft_alexist~twitter-video-downloader-scraper/runs": {
            "post": {
                "operationId": "runs-sync-soft_alexist-twitter-video-downloader-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/soft_alexist~twitter-video-downloader-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-soft_alexist-twitter-video-downloader-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "URLs of the videos urls to scrape",
                        "type": "array",
                        "description": "Add the URLs of the videos urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ignore_url_failures": {
                        "title": "Continue running even if some URLs fail to be scraped",
                        "type": "boolean",
                        "description": "If true, the scraper will continue running even if some URLs fail to be scraped."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
