# yt-dlp Video Link Extractor - Any URL to Links, 1000+ Sites (`anshumanatrey/yt-dlp-video-link-extractor`) Actor

Paste any video URL and get back direct stream/download links plus full metadata. Powered by yt-dlp across 1000+ sites. No files stored, no RAM burned.

- **URL**: https://apify.com/anshumanatrey/yt-dlp-video-link-extractor.md
- **Developed by:** [Anshuman Atrey](https://apify.com/anshumanatrey) (community)
- **Categories:** Videos, Developer tools, Other
- **Stats:** 4 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 video resolveds

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

## yt-dlp Video Link Extractor - Any URL to Links, 1000+ Sites

Paste any video URL and get back the direct stream and download links plus full metadata. No files are stored, no RAM is burned - it resolves the links, it does not host the bytes.

Available as an [Apify Actor](https://apify.com/anshumanatrey/yt-dlp-video-link-extractor). $0.002 per run + $0.003 per URL processed + $0.04 per video resolved.

---

### What does it do?

Give it one or more video URLs. For each one it returns the direct media links (a single combined audio+video file when one exists, plus the best video-only and audio-only streams), every available format with its own URL, thumbnails, subtitles, and the metadata: title, uploader, duration, view count, upload date.

It is powered by [yt-dlp](https://github.com/yt-dlp/yt-dlp), so it works on **1,872 sites** (verified at build time) - YouTube, Vimeo, SoundCloud, Twitch, Dailymotion, Reddit, Rumble, Bilibili and far more - not just YouTube. You paste a URL, you get the links. That is the whole tool.

It never downloads the actual file. That is deliberate: downloading large videos into cloud storage is slow, expensive, and memory-heavy. Resolving the link is instant and lets you fetch, stream, or transcode the media yourself.

### How is it different from a YouTube downloader?

| | Typical YouTube downloader | This actor |
|---|---|---|
| Sites | YouTube only | Any of 1,000+ yt-dlp sites |
| Output | An .mp4 file in storage | The direct links + full metadata |
| Speed | Waits for the full download | Resolves in seconds, no transfer |
| Cost driver | Per MB downloaded | Per URL + per video resolved (flat) |
| RAM | Buffers the video | Flat - nothing is downloaded |

Most actors in this space stop at YouTube. This one hands you the raw links for almost any video site, so you can build your own download, archive, or analysis pipeline on top.

### When should I use it?

- Get a direct, playable/downloadable link for a video on almost any site
- Pull metadata (title, duration, views, upload date, uploader) in bulk
- Feed stream URLs into your own downloader, transcoder, or player
- Grab subtitle and caption track URLs across languages
- Resolve every video in a playlist or channel to its links in one run

### What does it cost?

Pay-per-event:

- **$0.002** per run
- **$0.003** per URL processed (covers the resolve attempt for any URL)
- **$0.04** per video successfully resolved

A single video costs about **$0.045**. A failed URL costs only **$0.005** (run + URL fee, never the $0.04 resolution fee). Resolving a 50-video playlist costs about **$2.00**.

### Which inputs does it take?

| Field | Required | What it does |
|---|---|---|
| `urls` | yes | One or more video URLs. Any yt-dlp site works. A playlist/channel URL expands to its videos. |
| `includeFormats` | optional | Include the full format list (every resolution + codec with its URL) and all thumbnails. Default on. |
| `includeSubtitles` | optional | Include subtitle and auto-caption URLs by language. Default off. |
| `playlistLimit` | optional | Max videos to resolve from a playlist/channel. Default 50. |
| `proxyConfiguration` | optional | Route through a proxy. Use a residential group for sites that block datacenter IPs. |
| `cookies` | optional | Netscape-format cookie contents for age-restricted or login-gated videos. |

### What does the output look like?

One record per resolved video. The link-first fields:

```json
{
  "input_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "ok": true,
  "extractor": "youtube",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "uploader": "Rick Astley",
  "duration": "3:33",
  "view_count": 1779349674,
  "upload_date": "2009-10-25",
  "best_url": "https://rr3---sn-gwpa-a3ve7.googlevideo.com/videoplayback?...",
  "best_url_kind": "combined",
  "best_resolution": "640x360",
  "best_video_url": "https://...  (up to 3840x2160)",
  "best_audio_url": "https://...  (.m4a)",
  "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/sddefault.jpg",
  "formats": [ { "format_id": "...", "ext": "mp4", "resolution": "1920x1080", "url": "..." } ]
}
````

- `best_url` is the single link most people want: a combined audio+video file when the site offers one, otherwise the best audio (for music/podcasts) or best video.
- `best_video_url` + `best_audio_url` matter for high-resolution sources. YouTube and Vimeo serve 1080p/4K video and audio as **separate** streams, so `best_url` (the combined file) tops out lower - use the two separate links for maximum quality.
- A failed URL returns `{ "input_url": ..., "ok": false, "error": "..." }`.

### How reliable is it?

yt-dlp is the most actively maintained extractor project in the world, and this actor pulls the latest release on every rebuild, so extractor fixes land automatically. Validated at build time across YouTube, YouTube Shorts, Vimeo (adaptive streams correctly resolved to a progressive file), and SoundCloud, plus playlist expansion and graceful handling of dead URLs.

### Common questions

**Q: Does it download the video file?** No. It returns the direct links. Fetch, stream, or transcode the media yourself. This keeps it fast and cheap.

**Q: Do the links expire?** Often yes. Many sites (YouTube especially) issue time-limited URLs that expire in a few hours. Use them promptly.

**Q: Which sites are supported?** Anything yt-dlp supports - 1,872 extractors at last build, including YouTube, TikTok, Vimeo, Twitch, SoundCloud, Reddit, Dailymotion, Rumble, Bilibili, Facebook and more.

**Q: A TikTok / Instagram / X link failed. Why?** Those platforms aggressively block datacenter IPs. Supply a residential proxy in `proxyConfiguration` and/or `cookies` and retry. Most other sites work with no proxy.

**Q: Does YouTube work?** Yes for a single or a few URLs per run. YouTube rate-limits rapid repeated requests from cloud (datacenter) IPs, so resolving many YouTube URLs in one run can trip a "confirm you're not a bot" challenge after the first few. For heavy YouTube bulk, pass `cookies` or a residential proxy, or split the work across runs.

**Q: Can I pass a whole playlist or channel?** Yes. It expands to the videos inside, capped by `playlistLimit`.

**Q: Can I get just the audio?** Yes - `best_audio_url` is the best audio-only stream. For music sites it is also the `best_url`.

**Q: Am I charged for failed URLs?** Only the small per-URL processing fee ($0.003), which covers the resolve attempt. You are never charged the $0.04 resolution fee unless a video is actually resolved.

### Limitations

- Returns links, not downloaded files (by design).
- Direct links are time-limited by the source platform - use them quickly.
- Datacenter-blocked sites (TikTok, Instagram, X) need a residential proxy and/or cookies.
- Live streams resolve to HLS/DASH manifest URLs, not a single finished file.

### Ethical use

Download and use only content you have the right to access. Respect each platform's terms of service and copyright. This tool resolves publicly reachable media links; it does not bypass paywalls or DRM.

### Other actors by the same maintainer

Part of a portfolio of cloud tools built and maintained by **Anshuman Atrey** ([@AnshumanAtrey](https://github.com/AnshumanAtrey)). Custom features shipped within 24-48h for legitimate use cases via [atrey.dev](https://atrey.dev).

| Actor | Use case |
|---|---|
| [holehe-email-osint](https://apify.com/anshumanatrey/holehe-email-osint) | Email to registered accounts across 120+ sites |
| [social-analyzer](https://apify.com/anshumanatrey/social-analyzer) | Username across 900+ social sites |
| [theharvester-osint](https://apify.com/anshumanatrey/theharvester-osint) | Domain to emails + subdomains |
| [netintel](https://apify.com/anshumanatrey/netintel) | IP/domain to WHOIS + DNS + GeoIP + ports |
| [instagram-profile-intel-no-login](https://apify.com/anshumanatrey/instagram-profile-intel-no-login) | Instagram profile fields, no login |

### License

MIT (see LICENSE). Built on top of [yt-dlp](https://github.com/yt-dlp/yt-dlp) (Unlicense / public domain).

# Actor input Schema

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

Paste one or more video URLs. Any site yt-dlp supports works - YouTube, TikTok, Vimeo, Twitch, SoundCloud, Reddit, Dailymotion and 1000+ more. A playlist or channel URL expands into its videos (capped by Playlist limit).

## `includeFormats` (type: `boolean`):

Return the full list of available formats (every resolution and codec with its direct URL), plus all thumbnail URLs. Turn off for a leaner result with only the best links.

## `includeSubtitles` (type: `boolean`):

Include subtitle and auto-caption track URLs grouped by language.

## `playlistLimit` (type: `integer`):

When a URL is a playlist or channel, resolve at most this many videos from it. Keeps big channels from running long.

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

Optional. Route requests through a proxy. Useful for sites that block datacenter IPs (TikTok, Instagram, X) - use a residential group there.

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

Optional Netscape-format cookie file contents, for age-restricted or login-gated videos. Leave blank for public videos.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "includeFormats": true,
  "includeSubtitles": false,
  "playlistLimit": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `items` (type: `string`):

Direct stream/download links and metadata for each input URL.

## `log` (type: `string`):

Full execution log.

# 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("anshumanatrey/yt-dlp-video-link-extractor").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("anshumanatrey/yt-dlp-video-link-extractor").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 anshumanatrey/yt-dlp-video-link-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=anshumanatrey/yt-dlp-video-link-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "yt-dlp Video Link Extractor - Any URL to Links, 1000+ Sites",
        "description": "Paste any video URL and get back direct stream/download links plus full metadata. Powered by yt-dlp across 1000+ sites. No files stored, no RAM burned.",
        "version": "0.1",
        "x-build-id": "zfT8Lddfo97Dqkbih"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/anshumanatrey~yt-dlp-video-link-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-anshumanatrey-yt-dlp-video-link-extractor",
                "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/anshumanatrey~yt-dlp-video-link-extractor/runs": {
            "post": {
                "operationId": "runs-sync-anshumanatrey-yt-dlp-video-link-extractor",
                "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/anshumanatrey~yt-dlp-video-link-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-anshumanatrey-yt-dlp-video-link-extractor",
                "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": "Paste one or more video URLs. Any site yt-dlp supports works - YouTube, TikTok, Vimeo, Twitch, SoundCloud, Reddit, Dailymotion and 1000+ more. A playlist or channel URL expands into its videos (capped by Playlist limit).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeFormats": {
                        "title": "Include all formats",
                        "type": "boolean",
                        "description": "Return the full list of available formats (every resolution and codec with its direct URL), plus all thumbnail URLs. Turn off for a leaner result with only the best links.",
                        "default": true
                    },
                    "includeSubtitles": {
                        "title": "Include subtitles",
                        "type": "boolean",
                        "description": "Include subtitle and auto-caption track URLs grouped by language.",
                        "default": false
                    },
                    "playlistLimit": {
                        "title": "Playlist limit",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "When a URL is a playlist or channel, resolve at most this many videos from it. Keeps big channels from running long.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Optional. Route requests through a proxy. Useful for sites that block datacenter IPs (TikTok, Instagram, X) - use a residential group there.",
                        "default": {
                            "useApifyProxy": false
                        }
                    },
                    "cookies": {
                        "title": "Cookies (optional)",
                        "type": "string",
                        "description": "Optional Netscape-format cookie file contents, for age-restricted or login-gated videos. Leave blank for public videos."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
