# 下载器

该 `youtube_download` source 提供您所选 YouTube 视频的音频/视频内容。请注意，由于数据量可能较大，此 source 仅可通过异步方式使用 [**Push-Pull 集成**](/products/cn/web-scraper-api/integration-methods/push-pull.md) 以及 [**云存储**](/products/cn/web-scraper-api/features/result-processing-and-storage/cloud-storage.md) 功能使用。

## YouTube Downloader 的工作原理

1. 通过 API 提交：
   * 一个或多个 YouTube 视频 ID；
   * 云存储详细信息。
2. 获取 API 响应，其中确认您下载视频的请求已成功被接受。
3. 在系统处理完成后，尽快将视频获取到指定的云存储位置。

{% hint style="success" %}
**注意**:

* 下载器默认的视频分辨率为 720p。如果 720p 不可用，下载器将选择低于 720p 的最佳可用质量。您可以通过使用以下参数来覆盖此行为： `context: video_quality`参数一起使用时才有用。
* 您最多可以下载时长为 12 小时的视频。
* 下载时间限制为 1 小时。
  {% endhint %}

## 输入参数值

| 参数                                                          | 描述                                                                                             | 默认值                |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------ |
| `source`                                                    | 设置爬虫。                                                                                          | `youtube_download` |
| `query`                                                     | YouTube 视频 ID。                                                                                 | -                  |
| `storage_type`                                              | 云服务的存储类型（`gcs`, `s3` 或 `s3_compatible`)                                                        | -                  |
| `storage_url`                                               | 您希望结果上传到的云存储位置的存储桶名称（适用于 AWS S3）或 URL（适用于其他兼容 S3 的存储）。                                         | -                  |
| `callback_url`                                              | 您的回调端点 URL。 [**更多信息**](/products/cn/web-scraper-api/integration-methods/push-pull.md#callback) | -                  |
| <p><code>context:</code><br><code>download\_type</code></p> | 指定要下载 `音频`, `video`，或两者都下载 - `audio_video`.                                                    | `audio_video`      |
| <p><code>context:</code><br><code>video\_quality</code></p> | 设置视频质量： `best`, `worst`，或者分辨率 -  `480`, `720`, `1080`, `1440`, `2160(4K)`.                     | `720`              |

## 提交单个任务

#### 端点

```
POST https://data.oxylabs.io/v1/queries
```

#### 输入

请按照下方示例，以 JSON 负载形式提供任务参数：

{% tabs %}
{% tab title="cURL" %}

```sh
curl --user "user:pass1" \\
'https://data.oxylabs.io/v1/queries' \\
-H "Content-Type: application/json" \
-d '{
    "source": "youtube_download",
    "query": "9cQBNYsCqQs",
    "storage_type": "s3",
    "storage_url": "s3://your-s3-bucket/your-folder/"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

payload = {
    "source": "youtube_download",
    "query": "9cQBNYsCqQs",
    "context": [
        {
            "key": "download_type",
            "value": "video"
        },
        {
            "key": "video_quality",
            "value": "1080"
        }
    ],
    "storage_type": "s3",
    "storage_url": "s3://your-s3-bucket/your-folder/"
}

response = requests.request(
    'POST',
    'https://data.oxylabs.io/v1/queries',
    auth=('user', 'pass1'),
    json=payload,
)

pprint(response.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'youtube_download',
    'query' => '9cQBNYsCqQs',
    "context" => [
        [
            "key" => "download_type",
            "value" => "video",
        ],
        [
            "key" => "video_quality",
            "value" => "1080",
        ]
    ],
    'storage_type' => 's3',
    'storage_url' => 's3://your-s3-bucket/your-folder/'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://data.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "YOUR_USERNAME" . ":" . "YOUR_PASSWORD");

$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo '错误:' . curl_error($ch);
}
curl_close ($ch);
?>
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "YOUR_USERNAME";
            const string Password = "YOUR_PASSWORD";
            var payload = new Dictionary<string, object>()
            {
                { "source", "youtube_download" },
                { "query", "9cQBNYsCqQs" },
                { "context", new[] {
                    new { key = "download_type", value = "video" },
                    new { key = "video_quality", value = "1080" }
                }},
                { "storage_type", "s3" },
                { "storage_url", "your-s3-bucket/your-folder/" }
            };
            
            var client = new HttpClient();
            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "https://data.oxylabs.io/v1/queries/batch");
            requestMessage.Content = JsonContent.Create(payload);
            
            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);
            
            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();
            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	const Username = "YOUR_USERNAME"
	const Password = "YOUR_PASSWORD"

	// 定义 context 结构
	type ContextItem struct {
		Key   string `json:"key"`
		Value string `json:"value"`
	}

	// 创建与 C# 示例相同结构的 payload
	payload := map[string]interface{} {
		"source": "youtube_download",
		"query":  []string{"9cQBNYsCqQs", "KGOsWPF4Wfs"},
		"context": []ContextItem{
			{Key: "download_type", Value: "video"},
			{Key: "video_quality", Value: "1080"},
		},
		"storage_type": "s3",
		"storage_url":  "your-s3-bucket/your-folder/",
	}

	jsonValue, _ := json.Marshal(payload)
	client := &http.Client{}
	request, _ := http.NewRequest("POST",
		"https://data.oxylabs.io/v1/queries/batch",
		bytes.NewBuffer(jsonValue),
	)
	request.Header.Add("Content-type", "application/json")
	request.SetBasicAuth(Username, Password)
	response, _ := client.Do(request)
	responseText, _ := ioutil.ReadAll(response.Body)
	fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;
import okhttp3.*;
import org.json.JSONArray;
import org.json.JSONObject;
public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "YOUR_USERNAME";
    public static final String PASSWORD = "YOUR_PASSWORD";
    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "youtube_download");
        jsonObject.put("query", "9cQBNYsCqQs");
        
        // 添加 context 结构
        JSONArray contextArray = new JSONArray();
        
        JSONObject downloadTypeContext = new JSONObject();
        downloadTypeContext.put("key", "download_type");
        downloadTypeContext.put("value", "video");
        contextArray.put(downloadTypeContext);
        
        JSONObject videoQualityContext = new JSONObject();
        videoQualityContext.put("key", "video_quality");
        videoQualityContext.put("value", "1080");
        contextArray.put(videoQualityContext);
        
        jsonObject.put("context", contextArray);
        
        jsonObject.put("storage_type", "s3");
        jsonObject.put("storage_url", "your-s3-bucket/your-folder/");
        
        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };
        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .build();
        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://data.oxylabs.io/v1/queries/batch")
                .post(body)
                .build();
        try (var response = client.newCall(request).execute()) {
            assert response.body() != null;
            System.out.println(response.body().string());
        } catch (Exception exception) {
            System.out.println("错误： " + exception.getMessage());
        }
        System.exit(0);
    }
    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="Node.js" %}

```sh
import fetch from 'node-fetch';

const username = 'YOUR_USERNAME';
const password = 'YOUR_PASSWORD';
const body = {
  source: 'youtube_download',
  query: '9cQBNYsCqQs',
  context: [
    { key: "download_type", value: "video" },
    { key: "video_quality", value: "1080"},
  ],
  storage_type: 's3',
  storage_url: 's3://your-s3-bucket/your-folder/'
};
const response = await fetch('https://data.oxylabs.io/v1/queries', {
  method: 'post',
  body: JSON.stringify(body),
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64'),
  }
});

console.log(await response.json());
```

{% endtab %}
{% endtabs %}

## 批量任务

单个批量请求中最多可提交 5,000 个视频 ID。

#### 端点

```
POST https://data.oxylabs.io/v1/queries/batch
```

{% hint style="warning" %}
**重要：** 使用 `/batch` 端点中，您只能提交 `query`参数值列表。所有其他参数应使用单个值。
{% endhint %}

#### 输入

{% tabs %}
{% tab title="cURL" %}

```sh
curl --user "user:pass1" \\
'https://data.oxylabs.io/v1/queries/batch' \\
-H 'Content-Type: application/json' \\
-d '{
    "source": "youtube_download",
    "query": ["9cQBNYsCqQs", "KGOsWPF4Wfs"],
        "context": [
        {
            "key": "download_type",
            "value": "video"
        },
        {
            "key": "video_quality",
            "value": "1080"
        }
    ],
    "storage_type": "s3",
    "storage_url": "your-s3-bucket/your-folder/"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json
from pprint import pprint

payload = {
    "source": "youtube_download",
    "query": ["9cQBNYsCqQs", "KGOsWPF4Wfs"],
    "context": [
        {
            "key": "download_type",
            "value": "video"
        },
        {
            "key": "video_quality",
            "value": "1080"
        }
    ],
    "storage_type": "s3",
    "storage_url": "your-s3-bucket/your-folder/"
}

response = requests.request(
    'POST',
    'https://data.oxylabs.io/v1/queries/batch',
    auth=('user', 'pass1'),
    json=payload,
)

# 打印格式化后的响应。
pprint(response.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$payload = array(
    "source" => "youtube_download",
    "query" => array("9cQBNYsCqQs", "KGOsWPF4Wfs"),
    "context" => [
        [
            "key" => "download_type",
            "value" => "video",
        ],
        [
            "key" => "video_quality",
            "value" => "1080",
        ]
    ],
    "storage_type" => "s3",
    "storage_url" => "your-s3-bucket/your-folder/"
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://data.oxylabs.io/v1/queries/batch");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "user" . ":" . "pass1");

$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo '错误:' . curl_error($ch);
}
curl_close ($ch);
?>
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "YOUR_USERNAME";
            const string Password = "YOUR_PASSWORD";
            var payload = new Dictionary<string, object>()
            {
                { "source", "youtube_download" },
                { "query", new[] { "9cQBNYsCqQs", "KGOsWPF4Wfs" } },
                { "context", new[] {
                    new { key = "download_type", value = "video" },
                    new { key = "video_quality", value = "1080" }
                }},
                { "storage_type", "s3" },
                { "storage_url", "your-s3-bucket/your-folder/" }
            };
            
            var client = new HttpClient();
            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "https://data.oxylabs.io/v1/queries/batch");
            requestMessage.Content = JsonContent.Create(payload);
            
            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);
            
            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();
            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	const Username = "YOUR_USERNAME"
	const Password = "YOUR_PASSWORD"

	// 定义 context 结构
	type ContextItem struct {
		Key   string `json:"key"`
		Value string `json:"value"`
	}

	// 创建与 C# 示例相同结构的 payload
	payload := map[string]interface{} {
		"source": "youtube_download",
		"query":  "9cQBNYsCqQs",
		"context": []ContextItem{
			{Key: "download_type", Value: "video"},
			{Key: "video_quality", Value: "1080"},
		},
		"storage_type": "s3",
		"storage_url":  "your-s3-bucket/your-folder/",
	}

	jsonValue, _ := json.Marshal(payload)
	client := &http.Client{}
	request, _ := http.NewRequest("POST",
		"https://data.oxylabs.io/v1/queries/batch",
		bytes.NewBuffer(jsonValue),
	)
	request.Header.Add("Content-type", "application/json")
	request.SetBasicAuth(Username, Password)
	response, _ := client.Do(request)
	responseText, _ := ioutil.ReadAll(response.Body)
	fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;
import okhttp3.*;
import org.json.JSONArray;
import org.json.JSONObject;
public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "YOUR_USERNAME";
    public static final String PASSWORD = "YOUR_PASSWORD";
    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "youtube_download");
        
        // 将 query 改为数组格式，如 C# 示例所示
        JSONArray queryArray = new JSONArray();
        queryArray.put("9cQBNYsCqQs");
        queryArray.put("KGOsWPF4Wfs");
        jsonObject.put("query", queryArray);
        
        // 添加 context 结构
        JSONArray contextArray = new JSONArray();
        
        JSONObject downloadTypeContext = new JSONObject();
        downloadTypeContext.put("key", "download_type");
        downloadTypeContext.put("value", "video");
        contextArray.put(downloadTypeContext);
        
        JSONObject videoQualityContext = new JSONObject();
        videoQualityContext.put("key", "video_quality");
        videoQualityContext.put("value", "1080");
        contextArray.put(videoQualityContext);
        
        jsonObject.put("context", contextArray);
        
        jsonObject.put("storage_type", "s3");
        jsonObject.put("storage_url", "your-s3-bucket/your-folder/");
        
        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };
        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .build();
        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://data.oxylabs.io/v1/queries/batch")
                .post(body)
                .build();
        try (var response = client.newCall(request).execute()) {
            assert response.body() != null;
            System.out.println(response.body().string());
        } catch (Exception exception) {
            System.out.println("错误： " + exception.getMessage());
        }
        System.exit(0);
    }
    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
import fetch from 'node-fetch';

const username = 'YOUR_USERNAME';
const password = 'YOUR_PASSWORD';

const payload = {
    source: 'youtube_download',
    query: ['9cQBNYsCqQs', 'KGOsWPF4Wfs'],
      context: [
        { key: "download_type", value: "video" },
        { key: "video_quality", value: "1080"},
      ]
    storage_type: 's3',
    storage_url: 'your-s3-bucket/your-folder/'
};

const response = await fetch('https://data.oxylabs.io/v1/queries/batch', {
    method: 'post',
    body: JSON.stringify(payload),
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64'),
    }
});

console.log(await response.json());
```

{% endtab %}
{% endtabs %}

API 将返回一个 JSON 对象，其中包含每个已创建任务的任务信息。任务状态将是 **`pending`** 直到下载完成。

## 检查任务状态

如果您在提交任务时提供了有效的 [**callback URL**](/products/cn/web-scraper-api/integration-methods/push-pull.md#callback) ，我们将在完成后通过向指定的 `JSON` payload to the specified callback URL.&#x20;

但是，如果您提交任务时未使用 [**callback service**](/products/cn/web-scraper-api/integration-methods/push-pull.md#callback)，您可以手动检查任务状态。请从提交任务后收到的响应消息中的 `href` 字段以及 `rel:self` 部分中获取 URL。用于检查任务状态的 URL 将类似于以下内容： `http://data.oxylabs.io/v1/queries/12345678900987654321`。查询此 URL 将返回任务信息，包括其当前 `状态`.

### 端点 <a href="#endpoint-1" id="endpoint-1"></a>

```
GET https://data.oxylabs.io/v1/queries/{id}
```

## 云存储

您可以将 YouTube 视频交付到 [**Google Cloud Storage**](#google-cloud-storage-setup), [**Amazon S3**](#amazon-s3-setup), [**Alibaba Cloud OSS**](#alibaba-cloud-oss-setup), 或 [**其他兼容 S3 的云存储**](#s3-compatible-storage-setup).

内容文件将出现在您的云存储位置，并会按照以下命名格式之一命名：

* `{video_id}_{job_id}.mp4` – 视频
* `{video_id}_{job_id}.m4a` – 音频

### 存储参数

<table><thead><tr><th width="170.03125">参数</th><th width="263.372304199773">描述</th><th>有效值</th></tr></thead><tbody><tr><td><code>storage_type</code></td><td>您的云存储类型。</td><td><p><code>gcs</code> （Google Cloud Storage）；</p><p><code>s3</code> （AWS S3）；<br><code>s3_compatible</code> （其他兼容 S3 的存储解决方案）。</p></td></tr><tr><td><code>storage_url</code></td><td>您的云存储 URL</td><td><p>任意 <code>s3</code> 或 <code>gcs</code> 存储桶名称；</p><p>任意 <code>兼容 S3 的</code> 存储 URL。</p></td></tr></tbody></table>

### **Google Cloud Storage 设置** <a href="#google-cloud-storage-setup" id="google-cloud-storage-setup"></a>

要将任务结果上传到您的 Google Cloud Storage 存储桶，请 **为我们的服务设置特殊权限** ，具体请参见我们的 [Google Cloud Storage 文档](/products/cn/web-scraper-api/features/result-processing-and-storage/cloud-storage.md#google-cloud-storage).

```json
{
    "source": "youtube_download",
    "query": "9cQBNYsCqQs",
    "storage_type": "gcs",
    "storage_url": "bucket_name/path"
}
```

### Amazon S3 设置

要将任务结果上传到您的 Amazon S3 存储桶，请为我们的服务设置访问权限。为此，请前往 [**https://s3.console.aws.amazon.com/**](https://s3.console.aws.amazon.com/) → **`S3`** → **`存储`** → **`存储桶名称`**` ``（如果您还没有，请创建一个新的）` → **`权限`** → **`存储桶策略`**。您可以在我们的 [Amazon S3 云文档](/products/cn/web-scraper-api/features/result-processing-and-storage/cloud-storage.md#amazon-s3).

中找到所有必需步骤。请使用下方的存储桶策略（别忘了更改以下位置的存储桶名称 `YOUR_BUCKET_NAME`):

```json
{
    "Version": "2012-10-17",
    "Id": "Policy1577442634787",
    "Statement": [
        {
            "Sid": "Stmt1577442633719",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action": "s3:GetBucketLocation",
            "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME"
        },
        {
            "Sid": "Stmt1577442633719",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action": [
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
        }
    ]
}
```

此策略允许我们向您的存储桶写入、为您提供对已上传文件的访问权限，并了解存储桶的位置。

### Alibaba Cloud OSS 设置

为了将结果保存到您的 Alibaba Cloud Object Storage Service (OSS)，您必须创建 `ACCESS_KEY_ID` 和 `ACCESS_KEY_SECRET` 并使用它们来构建存储 URL。请按照我们 [Alibaba Cloud OSS 文档 ](/products/cn/web-scraper-api/features/result-processing-and-storage/cloud-storage.md#alibaba-cloud-object-storage-service-oss).

```json
{
    "source": "youtube_download",
    "query": "9cQBNYsCqQs",
    中的说明进行操作
    "storage_type": "s3_compatible",
}
```

### "storage\_url": "<https://ACCESS\\_KEY\\_ID:ACCESS\\_KEY\\_SECRET@BUCKET\\_NAME.oss-REGION.aliyuncs.com/FOLDER\\_NAME>"

兼容 S3 的存储设置 [如果您希望将结果交付到](/products/cn/web-scraper-api/features/result-processing-and-storage/cloud-storage.md#other-s3-compatible-storage) 其他兼容 S3 的存储 `位置，您需要在负载中的` ACCESS\_KEY:SECRET `storage_url` 认证字符串包含在

```json
{
    "source": "youtube_download",
    "query": "9cQBNYsCqQs",
    中的说明进行操作
    值中：
"storage_url": "https://ACCESS_KEY:SECRET@s3.oxylabs.io/my-videos"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.oxylabs.io/api-targets/cn/shi-pin-yu-she-jiao-mei-ti/youtube/youtube-downloader.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
