# X(Twitter) Video Scraper API – Extract Video, Audio & Metadata (`apple_yang/twitter-video-scraper-api`) Actor

X (Twitter) Video Scraper API for extracting videos, audio, and metadata from tweets, threads, and timelines. Download Twitter videos, extract media content, and access structured data for AI, automation, and data pipelines. Fast, reliable, and built for developers.

- **URL**: https://apify.com/apple\_yang/twitter-video-scraper-api.md
- **Developed by:** [APISmith](https://apify.com/apple_yang) (community)
- **Categories:** AI, Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

## 🎥 Twitter Video & Audio Downloader API

A fast, reliable API to **extract and download video & audio content from Twitter (X) posts by URL** — built for developers, data teams, and AI Agents who need clean, structured media data without dealing with scraping complexity.

---

### 🚀 Overview

**Twitter Video & Audio Downloader API** allows you to input one or multiple Twitter (X) post URLs and instantly retrieve:

- Direct **video download links**
- Rich **tweet metadata**
- Complete **author profile information**
- Engagement metrics (likes, retweets, replies, bookmarks)

No browser automation, no fragile scripts — just a **production-ready API** designed for scale and automation.

This API is especially suitable for:
- Backend services
- Data pipelines
- AI Agent workflows
- Media analysis and archiving systems

---

### 📦 What You Can Get From This API

With a single request, you can obtain:

- 🎬 **Direct video URL** (ready for download or processing)
- 📝 Tweet content & title
- ⏱️ Video duration & creation time
- 📊 Engagement metrics:
  - Likes
  - Retweets
  - Replies
  - Quotes
  - Bookmarks
- 👤 Author details:
  - Nickname & screen name
  - Bio description
  - Avatar
  - Followers / following / media count
- 🧠 Clean, structured JSON output for easy parsing

---

### 💡 Typical Use Cases

#### 👨‍💻 Developers & Data Teams
- Build **Twitter media download tools**
- Archive video content for research or compliance
- Enrich social media datasets with engagement metrics

#### 🤖 AI Agent Developers
- Feed Twitter video content into **LLM pipelines**
- Power **AI content analysis**, summarization, or moderation
- Automate monitoring of specific Twitter accounts via URLs

#### 📈 Marketing & Growth Teams
- Track high-performing Twitter videos
- Analyze creator engagement patterns
- Collect assets for competitive analysis

#### 🗂️ Content & Media Platforms
- Curate Twitter videos for internal dashboards
- Store media for offline processing or editing

---

### 💰 Cost of Usage

💳 **Simple & Transparent Pricing**

- 🆓 **3 days free trial**
- 💵 **$3.00 / month**

No hidden fees. Cancel anytime.

---

### 📥 Input Parameters

#### (1) Input Format Description

| Field      | Type            | Required | Description |
|------------|-----------------|----------|-------------|
| videoUrls  | Array of string | ✅ Yes   | A list of Twitter (X) post URLs containing videos |

---

#### (2) Input Example

```json
{
    "videoUrls": [
        "https://x.com/tokyoislandfes/status/1973372369621361107",
        "https://x.com/cryptorover/status/2017937809311400099?s=20"
    ]
}
````

***

### 📤 Output Parameters

#### (1) Output Format Description

| Field | Type | Description |
|------|------|-------------|
| url | string | Original Twitter post URL |
| title | string | Tweet text content |
| videoUrl | string | Direct downloadable video URL |
| createTime | number | Tweet creation timestamp (Unix) |
| duration | number | Video duration in seconds |
| bookmarkCount | number | Number of bookmarks |
| favoriteCount | number | Number of likes |
| retweetCount | number | Number of retweets |
| replyCount | number | Number of replies |
| quoteCount | number | Number of quotes |
| nickname | string | Author display name |
| screenName | string | Author username |
| authorDesc | string | Author bio |
| avatarUri | string | Author avatar image URL |
| authorFollowersCount | number | Followers count |
| authorFriendsCount | number | Following count |
| authorMediaCount | number | Media posts count |
| authorStatusesCount | number | Total tweets count |
| errMsg | string | Error message (empty if successful) |
| timestamp | string | API response timestamp (ISO 8601) |

***

#### (2) Output Example

```json
[
{
    "url": "https://x.com/cryptorover/status/2017937809311400099?s=20",
    "title": "BULLISH: Michael Saylor says “If Bitcoin goes to $1, we’ll buy all the Bitcoin.” https://t.co/9nR30545e5",
    "videoUrl": "https://video.twimg.com/amplify_video/2017937756798824449/vid/avc1/884x498/nLdRj_vu_P2YiNWl.mp4?tag=21",
    "createTime": 1769948839,
    "bookmarkCount": 93,
    "favoriteCount": 2367,
    "quoteCount": 48,
    "replyCount": 347,
    "retweetCount": 217,
    "duration": 14.432,
    "nickname": "Crypto Rover",
    "screenName": "cryptorover",
    "authorDesc": "#Bitcoin Crypto YouTuber (200K+ SUBS) | TG: cryptoroveryt | Cryptocurrency investments are high risk, volatile, and can be dangerous. All tweets are NFA.",
    "avatarUri": "https://pbs.twimg.com/profile_images/1891433835675475969/J-TloTb6_normal.png",
    "authorFavouritesCount": 29726,
    "authorFollowersCount": 1522783,
    "authorFriendsCount": 543,
    "authorListedCount": 4893,
    "authorMediaCount": 38006,
    "authorStatusesCount": 62662,
    "errMsg": "",
    "timestamp": "2026-02-02T08:34:52.975Z"
  }
]
```

***

### ⭐ Why This API Is Different

✅ **Built for Reliability**\
No browser simulation. No brittle scraping logic. Stable results even at scale.

🤖 **AI-Agent Friendly by Design**\
Clean JSON, predictable fields, and rich metadata — perfect for autonomous agents and workflows.

✅ **Deeply Understands X Data Structures**\
Our team has long-term experience dealing with **Twitter / X media extraction**, including edge cases most tools miss.

⚡ **Focus on One Thing, Do It Well**\
We only support **URL-based video extraction**, which means:

- Faster responses
- Higher success rate
- Lower failure complexity

📄 **Clear Documentation, Zero Guesswork**\
What you see is exactly what you get — no undocumented fields.

***

### ⚠️ Notes

- This API **only supports Twitter (X) post URLs**
- It does **not** support keyword search or timelines
- Private, deleted, or restricted tweets may not be accessible
- Video URLs are provided for **downloading or processing**, not re-hosting

***

### 🛠️ Support

Need help or have questions?

📧 **Email:** support@apismith.online

We usually respond within 24 hours.

***

Happy building! 🚀

# Actor input Schema

## `videoUrls` (type: `array`):

The URL of the twitter you want to get the data from.

## Actor input object example

```json
{
  "videoUrls": [
    "https://x.com/Dell_JPN/status/1975063471155970378"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "videoUrls": [
        "https://x.com/Dell_JPN/status/1975063471155970378"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apple_yang/twitter-video-scraper-api").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 = { "videoUrls": ["https://x.com/Dell_JPN/status/1975063471155970378"] }

# Run the Actor and wait for it to finish
run = client.actor("apple_yang/twitter-video-scraper-api").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 '{
  "videoUrls": [
    "https://x.com/Dell_JPN/status/1975063471155970378"
  ]
}' |
apify call apple_yang/twitter-video-scraper-api --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X(Twitter) Video Scraper API – Extract Video, Audio & Metadata",
        "description": "X (Twitter) Video Scraper API for extracting videos, audio, and metadata from tweets, threads, and timelines. Download Twitter videos, extract media content, and access structured data for AI, automation, and data pipelines. Fast, reliable, and built for developers.",
        "version": "0.0",
        "x-build-id": "YwfNtmg5c3D3I6FJt"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apple_yang~twitter-video-scraper-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apple_yang-twitter-video-scraper-api",
                "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/apple_yang~twitter-video-scraper-api/runs": {
            "post": {
                "operationId": "runs-sync-apple_yang-twitter-video-scraper-api",
                "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/apple_yang~twitter-video-scraper-api/run-sync": {
            "post": {
                "operationId": "run-sync-apple_yang-twitter-video-scraper-api",
                "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",
                "required": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "The URLs of the twitter",
                        "type": "array",
                        "description": "The URL of the twitter you want to get the data from.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
