# Universal Video Downloader (`moving_beacon-owner1/my-actor-58`) Actor

Universal Video Downloader — Apify Actor
Download videos, extract audio, and scrape metadata from 1800+ websites.

Supported Sites
YouTube, TikTok, Instagram, Twitter/X, Reddit, Facebook, Vimeo, Dailymotion, Twitch, Bluesky, Bilibili, SoundCloud, Bandcamp, BBC, CNN, and 1800+ more.

- **URL**: https://apify.com/moving\_beacon-owner1/my-actor-58.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

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

## Universal Video Downloader — Apify Actor

Download videos, extract audio, and scrape metadata from **1800+ websites** using [yt-dlp](https://github.com/yt-dlp/yt-dlp).

### Supported Sites

YouTube, TikTok, Instagram, Twitter/X, Reddit, Facebook, Vimeo, Dailymotion, Twitch, Bluesky, Bilibili, SoundCloud, Bandcamp, BBC, CNN, and [1800+ more](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md).

### Features

- **9 download modes**: best quality, 720p/480p/360p, MP3, FLAC, with subtitles, with metadata, or thumbnail-only
- **Metadata scraping**: title, uploader, views, likes, duration, description, tags, chapters, available formats, subtitles, and thumbnails
- **File storage**: downloaded files are saved to Apify Key-Value Store with public URLs
- **Concurrency**: process multiple URLs in parallel
- **Retries**: automatic retry on failure with configurable attempts
- **Proxy support**: use Apify proxy or custom proxies for geo-restricted content
- **Cookie support**: pass browser cookies as JSON for login-gated content (Instagram, Facebook, etc.)

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `urls` | array | *required* | List of video URLs to process |
| `mode` | string | `metadata` | Download mode (see below) |
| `subtitleLanguages` | string | `en` | Comma-separated language codes |
| `maxFileSize` | integer | `500` | Skip files larger than this (MB), 0 = no limit |
| `maxConcurrency` | integer | `3` | Parallel downloads (1-10) |
| `maxRetries` | integer | `2` | Retry attempts per URL |
| `cookies` | string | — | Browser cookies as JSON array |
| `proxyConfiguration` | object | — | Apify or custom proxy config |

#### Download Modes

| Mode | Output |
|------|--------|
| `metadata` | Metadata only, no file download |
| `best_video` | Best quality MP4 |
| `video_720p` | 720p MP4 |
| `video_480p` | 480p MP4 |
| `video_360p` | 360p MP4 |
| `audio_mp3` | Audio extracted as MP3 (192kbps) |
| `audio_flac` | Audio extracted as FLAC (lossless) |
| `video_with_subs` | Best video with embedded subtitles |
| `video_with_metadata` | Best video with embedded metadata & thumbnail |
| `thumbnail` | Thumbnail image only |

### Example Input

```json
{
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.tiktok.com/@username/video/1234567890",
        "https://x.com/user/status/1234567890"
    ],
    "mode": "audio_mp3",
    "maxConcurrency": 3,
    "maxRetries": 2,
    "maxFileSize": 200
}
````

### Example Output

Each URL produces one item in the dataset:

```json
{
    "input_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "mode": "audio_mp3",
    "status": "success",
    "error": null,
    "processing_time_seconds": 12.34,
    "scraped_at": "2025-01-15T10:30:00Z",
    "attempt": 1,
    "metadata": {
        "id": "dQw4w9WgXcQ",
        "title": "Rick Astley - Never Gonna Give You Up",
        "uploader": "Rick Astley",
        "duration": 212,
        "duration_string": "3:32",
        "view_count": 1500000000,
        "like_count": 15000000,
        "upload_date": "20091025",
        "description": "...",
        "categories": ["Music"],
        "tags": ["rick astley", "never gonna give you up"],
        "extractor": "youtube",
        "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
        "format_count": 22,
        "formats": [...],
        "subtitles_available": {"en": ["vtt", "srv3"]},
        "chapters": []
    },
    "download": [
        {
            "filename": "dQw4w9WgXcQ.mp3",
            "kv_key": "Rick_Astley___Never_Gonna_Give_You_Up_dQw4w9WgXcQ.mp3",
            "public_url": "https://api.apify.com/v2/key-value-stores/.../records/...",
            "size_bytes": 5120000,
            "size_mb": 4.88,
            "content_type": "audio/mpeg",
            "skipped": false
        }
    ]
}
```

### Using Cookies for Login-Gated Content

For sites like Instagram or Facebook, export your cookies from a browser extension (e.g., "Get cookies.txt") and pass them as a JSON array:

```json
{
    "urls": ["https://www.instagram.com/reel/ABC123/"],
    "mode": "best_video",
    "cookies": "[{\"domain\":\".instagram.com\",\"name\":\"sessionid\",\"value\":\"...\",\"path\":\"/\",\"secure\":true}]"
}
```

### API Usage

Call this actor via the Apify API:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("YOUR_ACTOR_ID").call(run_input={
    "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "mode": "audio_mp3",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["metadata"]["title"])
    if item.get("download"):
        print(item["download"][0]["public_url"])
```

### Notes

- Downloaded files are stored in the actor's default Key-Value Store and accessible via public URLs
- The actor requires `ffmpeg` (included in the Docker image) for audio extraction and format merging
- Not all 1800+ sites are guaranteed to work — websites change frequently
- Respect copyright laws and terms of service when downloading content

# Actor input Schema

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

List of video URLs to process. Supports 1800+ sites: YouTube, TikTok, Instagram, Twitter/X, Reddit, Facebook, Vimeo, Dailymotion, etc.

## `mode` (type: `string`):

What to extract from each URL.

## `subtitleLanguages` (type: `string`):

Comma-separated language codes for subtitles (e.g. 'en,es,fr'). Used when mode is 'video\_with\_subs'.

## `maxFileSize` (type: `integer`):

Skip files larger than this (in MB). Set 0 for no limit. Files are stored in Apify Key-Value Store.

## `proxyConfiguration` (type: `object`):

Proxy to use for geo-restricted content.

## `memoryMbytes` (type: `integer`):

Actor memory allocation in MB. 512 for metadata-only, 1024 for audio, 2048 for standard video, 4096+ for HD/playlists.

## `timeoutSecs` (type: `integer`):

Max run time in seconds. 0 = no timeout. Set higher for large playlists or slow sites.

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

How many videos to process simultaneously.

## `maxRetries` (type: `integer`):

Number of retry attempts per URL on failure.

## `cookies` (type: `string`):

Optional cookies as JSON array (Netscape format) for login-gated content. Export from browser using a cookie extension.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "mode": "metadata",
  "subtitleLanguages": "en",
  "maxFileSize": 500,
  "memoryMbytes": 4096,
  "timeoutSecs": 3600,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

# 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://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/my-actor-58").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://www.youtube.com/watch?v=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/my-actor-58").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://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}' |
apify call moving_beacon-owner1/my-actor-58 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=moving_beacon-owner1/my-actor-58",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Universal Video Downloader",
        "description": "Universal Video Downloader — Apify Actor\nDownload videos, extract audio, and scrape metadata from 1800+ websites.\n\nSupported Sites\nYouTube, TikTok, Instagram, Twitter/X, Reddit, Facebook, Vimeo, Dailymotion, Twitch, Bluesky, Bilibili, SoundCloud, Bandcamp, BBC, CNN, and 1800+ more.",
        "version": "0.0",
        "x-build-id": "qGyBTUTyTx1HevO4Q"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/moving_beacon-owner1~my-actor-58/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-my-actor-58",
                "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/moving_beacon-owner1~my-actor-58/runs": {
            "post": {
                "operationId": "runs-sync-moving_beacon-owner1-my-actor-58",
                "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/moving_beacon-owner1~my-actor-58/run-sync": {
            "post": {
                "operationId": "run-sync-moving_beacon-owner1-my-actor-58",
                "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": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "List of video URLs to process. Supports 1800+ sites: YouTube, TikTok, Instagram, Twitter/X, Reddit, Facebook, Vimeo, Dailymotion, etc.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Download Mode",
                        "enum": [
                            "metadata",
                            "best_video",
                            "video_720p",
                            "video_480p",
                            "video_360p",
                            "audio_mp3",
                            "audio_flac",
                            "video_with_subs",
                            "video_with_metadata",
                            "thumbnail"
                        ],
                        "type": "string",
                        "description": "What to extract from each URL.",
                        "default": "metadata"
                    },
                    "subtitleLanguages": {
                        "title": "Subtitle Languages",
                        "type": "string",
                        "description": "Comma-separated language codes for subtitles (e.g. 'en,es,fr'). Used when mode is 'video_with_subs'.",
                        "default": "en"
                    },
                    "maxFileSize": {
                        "title": "Max File Size (MB)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Skip files larger than this (in MB). Set 0 for no limit. Files are stored in Apify Key-Value Store.",
                        "default": 500
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy to use for geo-restricted content."
                    },
                    "memoryMbytes": {
                        "title": "Memory (MB)",
                        "minimum": 256,
                        "maximum": 32768,
                        "type": "integer",
                        "description": "Actor memory allocation in MB. 512 for metadata-only, 1024 for audio, 2048 for standard video, 4096+ for HD/playlists.",
                        "default": 4096
                    },
                    "timeoutSecs": {
                        "title": "Timeout (seconds)",
                        "minimum": 0,
                        "maximum": 86400,
                        "type": "integer",
                        "description": "Max run time in seconds. 0 = no timeout. Set higher for large playlists or slow sites.",
                        "default": 3600
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many videos to process simultaneously.",
                        "default": 3
                    },
                    "maxRetries": {
                        "title": "Max Retries",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Number of retry attempts per URL on failure.",
                        "default": 2
                    },
                    "cookies": {
                        "title": "Cookies (JSON)",
                        "type": "string",
                        "description": "Optional cookies as JSON array (Netscape format) for login-gated content. Export from browser using a cookie extension."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
