# Youtube V2 Video Downloader (`myagizm/youtube-video-downloader-v2`) Actor

Download YouTube videos in up to 4K as MP4 and get a direct download link. Optional subtitles. No login. Age-restricted or login/verification-gated content cannot be retrieved automatically. See access limitations.

- **URL**: https://apify.com/myagizm/youtube-video-downloader-v2.md
- **Developed by:** [MYM](https://apify.com/myagizm) (community)
- **Categories:** Videos
- **Stats:** 11 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.86 / 1,000 4k · seconds

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

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## YouTube Video Downloader — Download YouTube Videos in up to 4K MP4 (No API Key, No Login)

### YouTube access limitations

This actor retrieves only content that YouTube makes accessible to automated requests. “No login required” means you do not supply a YouTube account to this actor; it is not a promise of access to restricted content.

- **Age restriction:** when YouTube explicitly indicates an age restriction or asks to confirm your age, the error is: **“This video is age-restricted. The actor cannot retrieve it automatically.”**
- **Login or verification:** a generic `LOGIN_REQUIRED` response does **not** establish an age restriction. The error is: **“YouTube requires login or verification. The actor cannot retrieve this content automatically.”**
- **Bot verification:** a bot check or CAPTCHA is reported separately as **“YouTube requires bot verification. The actor cannot retrieve this content automatically; automated retries stopped.”**
- Access denials, proxy-authentication failures and rate limits stop automated attempts. The actor does not switch accounts, cookies, clients or proxy identities to bypass a denial. Connection-only retries do not bypass these restrictions.
- A terminal access denial fails the run without delivering or charging for error rows. Check the run status message for the safe explanation. Availability of a public watch page does not guarantee automated access to metadata, captions, comments or media.

These messages explain access limitations; they do not remove YouTube restrictions or guarantee retrieval. Use only content you are authorized to access.

<p align="center">
Download YouTube videos, Shorts, or an entire channel as a ready-to-play MP4 in up to 4K, with an instant direct download link — <b>no API key, no login, no cookies or account required</b>, and nothing to install. Paste a link, a batch, a channel, or even a plain search query and get clean MP4 files back. Export scraped data to JSON, CSV, Excel, or XML, schedule runs via API, and integrate with your tools and AI workflows.
</p>

<p align="center">
<b>Built for AI agents:</b> works out of the box with Claude, ChatGPT / Codex, and Cursor through the Apify MCP server, so an assistant can download YouTube videos for you on command.
</p>

<p align="center">
<a href="https://apify.com/myagizm/youtube-video-downloader"><img src="https://img.shields.io/badge/Try%20Now-Apify-00b04f?style=for-the-badge" alt="Try Now"></a>
<a href="https://apify.com/myagizm/youtube-video-downloader/input-schema"><img src="https://img.shields.io/badge/Input%20Schema-View-blue?style=for-the-badge" alt="Input Schema"></a>
<a href="https://docs.apify.com/api/v2"><img src="https://img.shields.io/badge/API%20Docs-Apify-orange?style=for-the-badge" alt="API Docs"></a>
<a href="https://mcp.apify.com"><img src="https://img.shields.io/badge/MCP-AI%20Agents-8a2be2?style=for-the-badge" alt="MCP"></a>
</p>

<p align="center">
<a href="#what-can-youtube-video-downloader-do">What it does</a> •
<a href="#use-with-ai-agents-mcp">AI agents (MCP)</a> •
<a href="#how-to-download-youtube-videos">How to use</a> •
<a href="#what-data-can-you-download-from-youtube">Output data</a> •
<a href="#limits">Limits</a> •
<a href="#output-example">Output example</a> •
<a href="#how-much-does-it-cost-to-download-youtube-videos">Pricing</a> •
<a href="#integrations">Integrations</a> •
<a href="#faq">FAQ</a> •
<a href="#want-other-youtube-data">Other Actors</a>
</p>

***

### What can YouTube Video Downloader do? {#what-can-youtube-video-downloader-do}

**YouTube Video Downloader** lets you **download YouTube videos** as real, playable **MP4 files** with a **direct download link** you can click, share, or feed into another tool. Paste one video, a batch of links, an entire channel, a Shorts tab, or even a plain search query — the actor finds the videos, downloads them at the resolution you choose, merges audio and video into a clean MP4, and hands you a ready link for each one.

There is **no API key to obtain, no login, and no cookies or account required**. You do not install anything on your computer, and you never touch a command line. Everything — resolution selection, audio/video merging, optional subtitles, and hosting of the finished file — is handled for you in the cloud, so you can **download YouTube videos at scale** without the limitations of the official YouTube API. Get your first results free in under 2 minutes.

#### ✅ Download YouTube videos in the quality you want (up to 4K)

Choose your maximum resolution: 360p, 480p, 720p, 1080p Full HD, 1440p (2K), 2160p (4K), or simply "best available." The actor grabs the highest-quality stream up to your chosen height and merges it into a single playable MP4 — no separate audio and video files to stitch together yourself.

#### 🗂️ Batch download YouTube videos from links, channels, or Shorts tabs

Pass a single URL or hundreds and **scrape YouTube videos at once**. Standard `watch?v=` links, `youtu.be` short links, and `/shorts/` links all work. Point it at a **channel or profile URL** (including the `/shorts` tab) and every video is expanded and queued automatically. One run, many downloads — no limitations on the number of links.

#### 🔎 Download YouTube videos straight from a search query

Skip the manual link-hunting. Type plain search terms like `best places of england` and the actor finds matching videos and downloads them alongside anything else you passed. Perfect for building a themed collection without opening YouTube at all.

#### 💬 Optional subtitles in any language

Need captions? Provide a language code (for example `en`) and the actor fetches the auto-generated subtitles for that language and includes them with your download. Leave it empty to skip.

#### 🔊 Optional dubbed audio tracks

Many videos ship with dubbed audio in multiple languages. Ask for a specific language code (for example `es` or `hi`) and the dubbed track is downloaded as a separate file, so you get the version your audience actually needs.

#### 📊 Clean, structured output for every YouTube video

Each downloaded video becomes one structured record: the direct download link, resolution, file size in MB, duration, filename, content type, and how long the link stays live. Export the whole run to JSON, CSV, Excel, or XML in one click.

#### ⚡ Instant direct links, fast, fresh data

Every finished MP4 comes with a **direct download URL** you can open in a browser, drop into a script, or pass to another app. Links are hosted for you and stay live for a set retention window, so there is nothing to configure on your end. Fast response times deliver your files in seconds to minutes.

#### 🔄 Reliable, hands-off delivery

The actor manages the entire pipeline — locating streams, downloading, merging, and publishing — so you get consistent MP4 output every time without babysitting the process.

***

### Use with AI agents — Claude, ChatGPT & Cursor (MCP) {#use-with-ai-agents-mcp}

This actor is fully compatible with the **Apify MCP (Model Context Protocol) server**, which means AI assistants can call it directly as a tool to **download YouTube videos** on command. Just connect the Apify MCP server to your assistant and ask in plain language — for example, *"Download this YouTube video in 1080p and give me the link"* — and the agent runs the actor and returns the download URL.

Supported assistants and clients include:

- **Claude** (Claude Desktop and Claude-powered agents)
- **ChatGPT / Codex**
- **Cursor**
- Any other MCP-compatible client

Because the output is clean structured data, it flows naturally into downstream **MCP connectors and automation platforms** such as **Slack, Notion, Airtable, Google Sheets, Zapier, Make, and n8n**. An agent can download a video, post the link to Slack, log the record in Airtable, or archive the file reference in Notion — all in one automated flow.

> Learn more about the Apify MCP server: https://mcp.apify.com

***

### How to download YouTube videos {#how-to-download-youtube-videos}

You do not need any technical skills to **download YouTube videos** with this actor. Follow these steps:

1. **Open the actor** on Apify: [YouTube Video Downloader](https://apify.com/myagizm/youtube-video-downloader).
2. **Paste your YouTube URLs** into the *YouTube URLs* field — one or many. You can use video, Shorts, `youtu.be`, channel, or search-result links. Optionally, add plain **search terms** instead of (or in addition to) links.
3. **Pick your quality** from the *Quality* dropdown (default is 1080p Full HD).
4. *(Optional)* Enter a **subtitles language code** and/or a **dubbing language code**.
5. **Set the maximum number of videos** to process in the run (default 20).
6. Click **▶ Start** and wait for the run to finish.
7. **Open the results** and grab the direct download link for each video, or export the whole dataset to JSON, CSV, Excel, or XML.

That's it — no API key, no login, no downloads on your machine. Get your first results free in under 2 minutes.

***

### What data can you download from YouTube? {#what-data-can-you-download-from-youtube}

Each YouTube video you download produces one structured record. The main fields returned are:

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | Direct download link to the finished MP4 file. |
| `token` | string | Internal identifier describing the merged output and resolution. |
| `height` | integer | Actual video resolution height in pixels (e.g. 2160 for 4K). |
| `sizeMB` | number | File size of the downloaded video in megabytes. |
| `storage` | string | Where the finished file is hosted for delivery. |
| `filename` | string | Human-readable name of the MP4 file. |
| `expiresAt` | string (ISO 8601) | Timestamp when the download link stops working. |
| `sourceUrl` | string | The original YouTube URL the video came from. |
| `contentType` | string | MIME type of the file (e.g. `video/mp4`). |
| `deleteAfter` | string | Retention window in human-readable form (e.g. `24h`). |
| `driveFileId` | string | Identifier for the hosted file. |
| `retentionHours` | integer | Number of hours the download link stays live. |
| `durationSeconds` | integer | Length of the video in seconds. |

You can export any combination of these fields to **JSON, CSV, Excel, XML, or RSS** directly from the Apify dataset.

***

### Use cases for downloading YouTube videos

- **Archive your own channel** — batch-download every video from a channel URL for offline backup.
- **Build a content library** — pull a themed set of videos from a single search query.
- **Offline viewing** — save videos in Full HD or 4K to watch without an internet connection.
- **Research & analysis** — collect video files together with duration and metadata for study.
- **Repurposing & editing** — grab high-resolution source files to edit or clip in your own tools.
- **Localization workflows** — download dubbed audio and subtitles for translation projects.
- **Feeding AI pipelines** — hand MP4 links to transcription, captioning, or vision models.
- **Social media teams** — quickly fetch Shorts and long-form clips for cross-posting.
- **Automations** — trigger downloads from Zapier, Make, or n8n whenever a new video appears.

***

### Input examples

Below are ready-to-use input examples using the **real field names** this actor accepts. Copy any block into the JSON input editor.

#### Download a single YouTube video in 1080p

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }
  ],
  "quality": "1080"
}
```

#### Download several YouTube videos in 4K

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=ew1m1OmrHM4" },
    { "url": "https://youtu.be/dQw4w9WgXcQ" },
    { "url": "https://www.youtube.com/shorts/abcdEFGH123" }
  ],
  "quality": "2160",
  "maxItems": 10
}
```

#### Download an entire YouTube channel

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/@SomeChannel" }
  ],
  "quality": "720",
  "maxItems": 50
}
```

#### Download from a search query with subtitles

```json
{
  "searchTerms": [
    "best places of england"
  ],
  "quality": "1080",
  "subtitles": "en",
  "maxItems": 5
}
```

#### Download a video with dubbed audio

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=ew1m1OmrHM4" }
  ],
  "quality": "1080",
  "dubbing": "es"
}
```

***

### Input reference

Every field this actor accepts:

#### `startUrls` — YouTube URLs

An array of YouTube video URLs to download (standard, Shorts, or `youtu.be` links). You can also pass **channel/profile URLs** (including the `/shorts` tab) and **YouTube search-result URLs**; each is expanded automatically into the individual videos it contains.

#### `quality` — Quality

Maximum video resolution. The best available stream up to this height is downloaded and merged to MP4. Options:

| Value | Meaning |
|-------|---------|
| `360` | 360p |
| `480` | 480p |
| `720` | 720p |
| `1080` | 1080p (Full HD) — **default** |
| `1440` | 1440p (2K) |
| `2160` | 2160p (4K) |
| `best` | Best available |

#### `subtitles` — Subtitles language (optional)

Also fetch auto-subtitles in this language code (e.g. `en`). Leave empty to skip.

#### `dubbing` — Dubbing / audio language (optional)

Also download the dubbed audio track in this language code (e.g. `es`, `hi`) as a separate file. Leave empty to skip.

#### `searchTerms` — Search terms

Plain YouTube search queries (e.g. `best places of england`). Matching videos are processed alongside any links you provide. For Shorts, only Shorts among the results are kept.

#### `maxItems` — Max videos

Maximum number of videos to download in one run. Minimum `1`, maximum `100`, default `20`.

***

### Limiting results {#limits}

Use the **`maxItems`** field to cap how many YouTube videos a single run downloads. It accepts a value between **1 and 100**, and defaults to **20**.

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/@SomeChannel" }
  ],
  "maxItems": 25
}
```

A single run lasts at most about **10 minutes**, so keep `maxItems` reasonable for large videos or high resolutions. If you need to download hundreds of videos, split them across several runs or schedule recurring runs.

***

### Output example {#output-example}

Here is a real record returned for one downloaded 4K video:

```json
{
  "url": "https://dl.example.com/QM5kVU",
  "token": "merged:2160",
  "height": 2160,
  "sizeMB": 105.5,
  "storage": "drive",
  "filename": "Using Layout Templates in Framer (Fundamentals Lesson 22).mp4",
  "expiresAt": "2026-07-20T21:09:21.696Z",
  "sourceUrl": "https://www.youtube.com/watch?v=ew1m1OmrHM4",
  "contentType": "video/mp4",
  "deleteAfter": "24h",
  "driveFileId": "1DQlmqiMaCKtSuy5w-LWxhYrZ_ladxj-B",
  "retentionHours": 24,
  "durationSeconds": 742
}
```

Open the `url` in any browser to download the MP4, or pass it straight to another app or script.

***

### How much does it cost to download YouTube videos? {#how-much-does-it-cost-to-download-youtube-videos}

This actor uses a simple **pay-per-result** model: you are billed per video processed, plus the standard Apify platform usage for the run. There are no subscriptions to third-party services, no separate API costs, and no hidden fees — you only pay for what you download. **Get your first results free in under 2 minutes** on the Apify free tier.

Because downloading and merging is handled efficiently in the cloud, most runs are inexpensive. To control spend, use the **`maxItems`** field to cap the number of videos per run. See the [Apify pricing page](https://apify.com/pricing) for platform details, and your run log for the exact cost of each run.

***

### Integrate with n8n, Zapier, and Make {#integrations}

You can run this actor from any tool that can make an HTTP request, or through the native **Apify integrations** for **Make, Zapier, n8n, Slack, Airbyte, Gumloop, CrewAI, GitHub, Google Sheets, and Google Drive**. The actor path is `myagizm~youtube-video-downloader`.

#### Run synchronously and get results in one call

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-video-downloader/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }],
    "quality": "1080"
  }'
```

This starts the run, waits for it to finish, and returns the dataset items (the download links) directly in the response.

#### Run asynchronously and fetch results later

Start the run:

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-video-downloader/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }],
    "quality": "2160"
  }'
```

Then retrieve the dataset items once the run has succeeded:

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_APIFY_TOKEN&clean=true&format=json"
```

You can also export as CSV or Excel by changing the `format` parameter to `csv` or `xlsx`. For no-code automation, use the official [Apify integrations](https://apify.com/integrations) with **Zapier, Make, and n8n** to trigger downloads and route the links wherever you need them.

***

### Support {#support}

Questions, feature requests, or a link that isn't working as expected? Open an **issue on the actor's Issues tab** on Apify, and we'll help you out. Suggestions for new options and improvements are always welcome — this actor is actively maintained.

***

### FAQ — downloading YouTube videos {#faq}

#### What happens when a run returns no data?

If none of your inputs produce a download (a private, deleted, or unavailable video, or a query with no match), the dataset stays empty and each failed input is explained in the run log and in the `STATS` record of the run's key-value store — for example `no data available - not found or unavailable`, or `no data available - temporary issue on our side, please retry` when the problem is on our side. You are only billed for items actually delivered, so an empty run charges nothing.

#### Do I need an API key or a YouTube account to download YouTube videos?

No. There is no API key to obtain, no login, and no cookies or account required. Just paste your links and run.

#### Do I have to install any software?

No. Everything runs in the cloud. You never install anything or touch a command line — you get a direct download link when the run finishes.

#### Is it legal to download YouTube videos?

This tool only processes **publicly available** videos and is intended for content you own, content licensed for reuse, or content you are otherwise permitted to download. You are responsible for complying with YouTube's Terms of Service, applicable copyright law, and data-protection rules such as the GDPR in your jurisdiction.

#### Can I use YouTube Video Downloader with the Apify API?

Yes. Start runs and fetch results through the Apify API using the actor path `myagizm~youtube-video-downloader`. Both synchronous and asynchronous endpoints are supported (see the Integrations section above).

#### Can I download YouTube videos through an MCP server (AI agents)?

Yes. The actor works with the Apify MCP server, so Claude, ChatGPT / Codex, Cursor, and other MCP clients can call it directly and return download links.

#### Do I need proxies to download YouTube videos?

No. Proxy handling is fully managed for you — there is nothing to configure. You just provide links or search terms.

#### Can I integrate YouTube video data with other apps?

Yes. Route download links and metadata to Slack, Notion, Airtable, Google Sheets, and more via the Apify integrations for Make, Zapier, and n8n, or through webhooks.

#### What input can I provide?

Single video URLs, `youtu.be` links, Shorts links, channel/profile URLs (including the `/shorts` tab), YouTube search-result URLs, or plain search terms. Mix and match as needed.

#### What video quality can I download?

Anything from 360p up to 2160p (4K), or "best available." The default is 1080p Full HD. The actor downloads the best stream up to your chosen height and merges it to MP4.

#### In what format are videos downloaded?

As a single, ready-to-play **MP4** file with audio and video already merged. No separate files to combine yourself.

#### Can I download an entire YouTube channel at once?

Yes. Pass a channel or profile URL and every video (or every Short from the `/shorts` tab) is expanded and queued automatically, up to your `maxItems` limit.

#### Can I get subtitles?

Yes. Provide a subtitles language code (for example `en`) in the `subtitles` field and captions for that language are fetched alongside the video.

#### Can I download dubbed audio in another language?

Yes. Set the `dubbing` field to a language code (for example `es` or `hi`) and the dubbed audio track is downloaded as a separate file.

#### How long do the download links stay live?

Each result includes an `expiresAt` timestamp and a `retentionHours` value. Links stay available for that retention window (24 hours in the sample), so download or copy the file before it expires.

#### Can I scrape multiple YouTube videos at once?

Yes. Pass up to 100 videos per run via the `maxItems` field (default 20), or point the actor at a channel or search query to expand many videos automatically.

#### Can I schedule YouTube video downloads automatically?

Yes. Use Apify **Schedules** to run the actor on a recurring basis, or trigger it from Zapier, Make, or n8n whenever a new video is published.

#### Can I export the results to CSV or Excel?

Yes. Every run's dataset can be exported to JSON, CSV, Excel, XML, or RSS in one click, or via the API using the `format` parameter.

#### Can I download private videos?

No. Only **publicly available** videos can be downloaded. Private, region-locked, or removed videos are simply skipped and the run continues with the rest.

***

### Want other YouTube data? {#want-other-youtube-data}

Downloading full videos is just one part of the picture. Explore the rest of the **myagizm** YouTube toolkit to pull audio, transcripts, metadata, channel stats, and comments:

- [**YouTube Shorts Downloader**](https://apify.com/myagizm/youtube-shorts-downloader) — download YouTube Shorts as MP4 with direct links.
- [**YouTube to MP3**](https://apify.com/myagizm/youtube-mp3-downloader) — extract audio and download YouTube videos as MP3.
- [**YouTube Transcript Scraper**](https://apify.com/myagizm/youtube-transcript-scraper) — pull full transcripts and captions from any video.
- [**YouTube Video Info Scraper**](https://apify.com/myagizm/youtube-video-info) — get titles, views, likes, and metadata for any video.
- [**YouTube Channel Scraper**](https://apify.com/myagizm/youtube-channel-scraper) — scrape videos and stats from any channel.
- [**YouTube Comment Scraper**](https://apify.com/myagizm/youtube-comment-scraper) — collect comments and replies from any video.

***

### Related searches {#related-searches}

youtube video downloader · download youtube 4k · bulk youtube download · youtube downloader api · youtube playlist download · archive youtube videos · youtube mp4 download link · offline youtube backup · youtube download automation

***

### Disclaimer

This is an independent tool and is not affiliated with, endorsed by, or sponsored by YouTube or Google. All product names, logos, and brands are property of their respective owners. Use this actor only to download content you own, content licensed for reuse, or content you are otherwise permitted to download, and in compliance with YouTube's Terms of Service and applicable law.

***

### Resources {#resources}

- [Apify API documentation](https://docs.apify.com/api/v2)
- [Apify MCP server](https://mcp.apify.com) — connect this actor to Claude, ChatGPT, and Cursor
- [Exporting dataset results](https://docs.apify.com/platform/storage/dataset) — JSON, CSV, Excel, XML, RSS
- [Apify integrations](https://apify.com/integrations) — Zapier, Make, n8n, Slack, and more
- [Apify Schedules](https://docs.apify.com/platform/schedules) — run this actor automatically

***

## 中文说明 —— YouTube 视频下载工具

**免登录抓取 YouTube 公开数据** —— 按清晰度下载完整视频，支持搜索词与频道批量展开。不需要 API Key、不需要 OAuth 应用、不需要登录或 Cookie。结果可导出为 JSON、CSV、Excel、XML，也可通过 Apify API 定时运行并接入 n8n、Zapier、Make 等工具。

> **两分钟内免费拿到第一批数据** —— 填入内容、点击 Start 即可。无需配置，试用不需要信用卡。

### 能做什么

- ⬇️ **下载完整视频**，清晰度可选 360–2160 或 `best`。
- 🔎 **支持搜索词入口**批量下载命中视频。
- 📝 **可选字幕与配音轨**。
- ⏳ **返回下载链接与失效时间**。
- 📤 **导出**链接清单，交给你的下载流程。

### 谁在用

- ✂️ **剪辑与内容团队** —— 拿到源文件做二次创作。
- 🗄️ **归档** —— 在内容下架前留存。
- 🎓 **离线学习** —— 保存课程与讲座。
- 🤖 **AI 团队** —— 构建视频语料。

### 可以抓取哪些数据

| 字段 | 类型 | 说明 |
|------|------|------|
| `url` | string | 链接 |
| `token` | string | Internal identifier describing the merged output and resolution. |
| `height` | integer | Actual video resolution height in pixels (e.g. 2160 for 4K). |
| `sizeMB` | number | File size of the downloaded video in megabytes. |
| `storage` | string | Where the finished file is hosted for delivery. |
| `filename` | string | Human-readable name of the MP4 file. |
| `sourceUrl` | string | 处理的原始链接 |
| `contentType` | string | MIME type of the file (e.g. `video/mp4`). |
| `deleteAfter` | string | Retention window in human-readable form (e.g. `24h`). |
| `driveFileId` | string | Identifier for the hosted file. |
| `retentionHours` | integer | Number of hours the download link stays live. |
| `durationSeconds` | integer | Length of the video in seconds. |

> 字段取决于该条目公开了什么；不存在的值返回 `null`，数据结构保持稳定。

### 输入示例

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }
  ],
  "quality": "1080"
}
```

### 输出示例

```json
{
  "url": "https://dl.example.com/QM5kVU",
  "token": "merged:2160",
  "height": 2160,
  "sizeMB": 105.5,
  "storage": "drive",
  "filename": "Using Layout Templates in Framer (Fundamentals Lesson 22).mp4",
  "expiresAt": "2026-07-20T21:09:21.696Z",
  "sourceUrl": "https://www.youtube.com/watch?v=ew1m1OmrHM4",
  "contentType": "video/mp4",
  "deleteAfter": "24h",
  "driveFileId": "1DQlmqiMaCKtSuy5w-LWxhYrZ_ladxj-B",
  "retentionHours": 24,
  "durationSeconds": 742
}
```

### 价格

采用**按结果计费**：只为真正拿到的数据付费，不按运行时间收费。

- 💸 成本 = 结果数量 × 单价，预算可提前算清。
- 📉 Apify 的 Bronze / Silver / Gold / Platinum / Diamond 套餐享阶梯折扣。
- 🆓 新账号自带每月免费额度，第一次运行不花钱。
- 🚫 无代理附加费、无单次请求费、无最低消费。

实时价格见 [Apify 商店页面](https://apify.com/myagizm/youtube-video-downloader)。

### 使用建议

- ⏳ **链接会过期，请当场下载**。
- 🎯 清晰度越高文件越大，按用途选择。
- 🤖 把链接接到 n8n / Make / 脚本自动存入云盘。
- ⚖️ 请遵守版权与平台条款，仅下载你有权使用的内容。

### 其他YouTube数据

- 📺 **[YouTube 频道抓取](https://apify.com/myagizm/youtube-channel-scraper)** —— 频道视频目录与统计。
- 💬 **[YouTube 评论抓取](https://apify.com/myagizm/youtube-comment-scraper)** —— 评论、作者与点赞。
- 📝 **[YouTube 字幕抓取](https://apify.com/myagizm/youtube-transcript-scraper)** —— 带时间戳的逐行字幕。
- ℹ️ **[YouTube 视频信息](https://apify.com/myagizm/youtube-video-info)** —— 标题、观看数、点赞、简介等元数据。
- ⬇️ **[YouTube 视频下载](https://apify.com/myagizm/youtube-video-downloader)** —— 按清晰度下载完整视频。
- 🎬 **[YouTube Shorts 下载](https://apify.com/myagizm/youtube-shorts-downloader)** —— 批量保存 Shorts。
- 🎵 **[YouTube 转 MP3](https://apify.com/myagizm/youtube-mp3-downloader)** —— 提取音频。

其他平台同样是免登录、按结果计费：**[Instagram](https://apify.com/myagizm/instagram-profile-scraper-v2)** ·
**[TikTok](https://apify.com/myagizm/tiktok-profile-scraper-v2)** · **[X（推特）](https://apify.com/myagizm/x-tweets-scraper)** ·
**[Reddit](https://apify.com/myagizm/reddit-scraper-v2)** · **[Google 地图](https://apify.com/myagizm/google-maps-scraper)** ·
**[Google 新闻](https://apify.com/myagizm/google-news-scraper)**。完整家族见 **[myagizm 商店主页](https://apify.com/myagizm)**。

### 配合 AI 智能体使用（MCP）

本 Actor 已接入 **Apify MCP 服务器**，Claude、ChatGPT、Cursor 等助手可以把它当作工具直接调用，用自然语言提问即可拿到结构化结果，无需写胶水代码。

### 集成与 API

支持 **Make、Zapier、n8n、Slack、Airbyte、Gumloop、CrewAI、IFTTT、Lindy、GitHub、Google Sheets、Google Drive**，以及 Webhook、定时任务与 MCP 服务器。

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-video-downloader/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }
  ],
  "quality": "1080"
}'
```

把 `format` 改成 `json`、`csv`、`xlsx` 或 `xml` 即可导出不同格式。

### 常见问题

**没有数据时会怎样？**
如果所有输入都没有产出下载（视频为私密、已删除或不可用，或搜索无匹配），数据集保持为空；每个无结果输入的原因会写入运行日志以及键值存储中的 `STATS` 记录——例如 `no data available - not found or unavailable`，如果是我们一侧的临时问题则显示 `no data available - temporary issue on our side, please retry`。按实际交付的结果计费，空运行不产生结果费用。

**需要 API Key 或登录吗？**
不需要。没有 API Key、没有 OAuth 应用、不登录、不用 Cookie，也不会使用你的账号。

**抓取YouTube合法吗？**
只采集公开可见的数据，即任何未登录访客都能看到的内容，不登录、不绕过访问控制。合规责任由使用者承担：如涉及个人数据请遵守 GDPR / CCPA 与平台条款。

**能抓私密内容吗？**
不能，需要登录或已删除的内容会被跳过并记录在日志中。

**需要配置代理吗？**
不需要，已内置托管。

**支持导出 CSV / Excel / JSON 吗？**
支持 JSON、CSV、Excel、XML。

**可以通过 Apify API 调用吗？**
可以，见上方示例。

**支持 AI 智能体（MCP）吗？**
支持，Claude、ChatGPT、Cursor 均可当作工具调用。

**可以定时运行吗？**
可以，支持 Apify Schedules、API 与 Webhook。

**数据有多新？**
不缓存，每次运行都读取当前公开页面。

### 免责声明

本工具为独立第三方工具，与 YouTube / Google LLC 无任何隶属、认可或赞助关系，所有商标归各自所有者。

本 Actor 只采集**公开可见**的数据，不登录、不绕过访问控制、不获取私密内容。数据使用的合规责任由使用者承担。

### 相关搜索

youtube 视频下载 · youtube 下载 api · 批量下载 youtube · youtube 4k 下载 · youtube 视频备份 · 免 api key 下载 youtube

# Actor input Schema

## `startUrls` (type: `array`):

YouTube video URLs to download (standard, shorts, or youtu.be links). You can also pass channel/profile URLs (incl. the /shorts tab) and YouTube search-result URLs; each is expanded automatically.

## `quality` (type: `string`):

Maximum video resolution. The best available up to this height is downloaded and merged to MP4.

## `subtitles` (type: `string`):

Also fetch auto-subtitles in this language code (e.g. "en"). Leave empty to skip.

## `dubbing` (type: `string`):

Also download the dubbed audio track in this language code (e.g. "es", "hi") as a separate file. Leave empty to skip.

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

Maximum number of videos to download in one run. A run lasts at most ~10 minutes.

## `searchTerms` (type: `array`):

Plain YouTube search queries (e.g. "best places of england"). Matching videos are processed alongside any links above. For Shorts, only Shorts among the results are kept.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    }
  ],
  "quality": "1080",
  "subtitles": "en",
  "dubbing": "es",
  "maxItems": 20,
  "searchTerms": []
}
```

# Actor output Schema

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

All scraped items as structured JSON.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
        }
    ],
    "quality": "1080",
    "maxItems": 20,
    "searchTerms": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("myagizm/youtube-video-downloader-v2").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 = {
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }],
    "quality": "1080",
    "maxItems": 20,
    "searchTerms": [],
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    }
  ],
  "quality": "1080",
  "maxItems": 20,
  "searchTerms": []
}' |
apify call myagizm/youtube-video-downloader-v2 --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/y2KdmwcdReaKYqR66/builds/oDXUPeeM78vOpFact/openapi.json
