# YouTube 抓取參數

Web Scraper API YouTube 抓取參數\
使用 Thordata 的 Web Scraper API 配置 YouTube 抓取參數，包括產品、Token、抓取 URL、分辨率、音頻格式、字幕和字幕語言等參數。

唯一標識：

<details>

<summary><code>token</code> <strong>，存取令牌（必填）</strong></summary>

此參數用作 API 訪問令牌，以確保抓取請求的合法性。

**請求範例：**

`"Authorization: Bearer ********************************"`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer ********************" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"resolution\": \"2160p\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

**一、產品 - 視頻下載器**

1. YouTube - 透過 URL 抓取視頻文件

<details>

<summary><code>spider_id</code>  ， <strong>所属抓取工具（必填）</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_video_by-url`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"resolution\": \"2160p\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>url</code> <strong>，擷取目標鏈接（必填）</strong></summary>

此參數用於指定要抓取的 YouTube 視頻的訪問 URL。

**請求範例：**\
`"url": "https://www.youtube.com/watch?v=8RePenzQH80"`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"resolution\": \"2160p\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>resolution</code> <strong>，分辨率（可選）</strong></summary>

此參數用於指定抓取視頻的目標分辨率。如果選擇的分辨率不可用或不完全匹配，系統將自動降級為可用的較低質量選項。\
參數值：\
`360p` `480p` `720p` `1080p` `1440p` `2160p`

**請求範例：**\
`"resolution": "2160p"`&#x20;

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"resolution\": \"2160p\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>is_subtitles</code> <strong>，字幕（必填）</strong></summary>

此參數用於控制在抓取 YouTube 音頻時是否同步下載字幕文件。字幕格式為.vvt。需要注意的是，在下載過程中，音頻和字幕將作為兩個獨立的文件保存。\
參數值：\
`true`  `false`

**請求範例：**\
`"is_subtitles": "true"`&#x20;

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"resolution\": \"2160p\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>subtitles_language</code> <strong>，字幕語言（可選）</strong></summary>

此參數定義了抓取 YouTube 時要下載的字幕語言。需要注意的是，如果選擇的語言不可用，系統將默認返回英文字幕。參數值：

`阿布哈茲語 ab`、`阿法爾語 aa`、`南非荷蘭語 af`、`阿肯語 ak`、`阿爾巴尼亞語 sq`、`阿姆哈拉語 am`、`阿拉伯語 ar`、`亞美尼亞語 hy`、`阿薩姆語 as`、`艾馬拉語 ay`、`阿塞拜疆語 az`、`孟加拉語 bn`、`巴什基爾語 ba`、`巴斯克語 eu`、`白俄羅斯語 be`、`博杰普爾語 bho`、`波士尼亞語 bs`、`布列塔尼語 br`、`保加利亞語 bg`、`緬甸語 my`、`加泰羅尼亞語 ca`、`宿霧語 ceb`、`簡體中文 zh-Hans`、`繁體中文 zh-Hant`、`科西嘉語 co`、`克羅埃西亞語 hr`、`捷克語 cs`、`丹麥語 da`、`迪維希語 dv`、`荷蘭語 nl`、`宗喀語（不丹語）dz`、`英語（原始）en-orig`、`英語 en`、`世界語 eo`、`愛沙尼亞語 et`、`埃維語 ee`、`法羅語 fo`、`斐濟語 fj`、`菲律賓語 fil`、`芬蘭語 fi`、`法語 fr`、`加語 gaa`、`加利西亞語 gl`、`干達語 lg`、`喬治亞語 ka`、`德語 de`、`希臘語 el`、`瓜拉尼語 gn`、`古吉拉特語 gu`、`海地克里奧爾語 ht`、`豪薩語 ha`、`夏威夷語 haw`、`希伯來語 iw`、`印地語 hi`、`苗語 hmn`、`匈牙利語 hu`、`冰島語 is`、`伊博語 ig`、`印尼語 id`、`因紐特語 iu`、`愛爾蘭語 ga`、`義大利語 it`、`日語 ja`、`爪哇語 jv`、`格陵蘭語 kl`、`卡納達語 kn`、`哈薩克語 kk`、`卡西語 kha`、`高棉語 km`、`盧旺達語 rw`、`韓語 ko`、`克里奧爾語 kri`、`庫爾德語 ku`、`吉爾吉斯語 ky`、`老撾語 lo`、`拉丁語 la`、`拉脫維亞語 lv`、`林加拉語 ln`、`立陶宛語 lt`、`盧巴-盧盧阿語 lua`、`盧奧語 luo`、`盧森堡語 lb`、`馬其頓語 mk`、`馬爾加什語 mg`、`馬來語 ms`、`馬拉雅拉姆語 ml`、`馬耳他語 mt`、`曼克斯語 gv`、`毛利語 mi`、`馬拉地語 mr`、`蒙古語 mn`、`毛里求斯克里奧爾語 mfe`、`尼泊爾語 ne`、`尼瓦爾語 new`、`北索托語 nso`、`挪威語 no`、`齊切瓦語（尼揚賈語）ny`、`奧克語 oc`、`奧里亞語 or`、`奧羅莫語 om`、`奧塞梯語 os`、`邦板牙語 pam`、`普什圖語 ps`、`波斯語 fa`、`波蘭語 pl`、`葡萄牙語（巴西）pt`、`葡萄牙語（葡萄牙）pt-PT`、`旁遮普語 pa`、`克丘亞語 qu`、`羅馬尼亞語 ro`、`基隆迪語 rn`、`俄語 ru`、`薩摩亞語 sm`、`桑戈語 sg`、`梵語 sa`、`蘇格蘭蓋爾語 gd`、`塞爾維亞語 sr`、`塞舌爾克里奧爾法語 crs`、`紹納語 sn`、`信德語 sd`、`僧伽羅語 si`、`斯洛伐克語 sk`、`斯洛文尼亞語 sl`、`索馬里語 so`、`南索托語 st`、`西班牙語 es`、`巽他語 su`、`斯瓦希里語 sw`&#x20;

**請求範例：**\
`"subtitles_language": "en"`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"resolution\": \"2160p\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>audio_format</code> <strong>，音頻格式（必填）</strong></summary>

此參數用於指定要抓取的音頻文件的輸出格式。默認格式為.opus，可以切換為.mp3 格式。\
參數值：\
`opus` `mp3`

**請求範例：**\
`\"audio_format\": \"mp3\"`&#x20;

```sh
curl -X POST "http://scraperapi.thordata.com/video_builder?spider_id=youtube_audio_by-url" \
  -H "Authorization: Bearer Token-ID" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "url=[{\"url\": \"https://www.youtube.com/watch?v=_SdpvpvVrLY\"}]" \
  -d "common_settings={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" \
  -d "file_name={{TasksID}}"
```

</details>

**二、產品 - 音訊下載器**

1\. YouTube - 透過 URL 抓取音訊與字幕文件

<details>

<summary><code>spider_id</code>  ， <strong>所属抓取工具（必填）</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_audio_by-url`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_audio_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>url</code> <strong>，擷取目標鏈接（必填）</strong></summary>

此參數用於指定要抓取的 YouTube 視頻的訪問 URL。

**請求範例：**\
`"url": "https://www.youtube.com/watch?v=8RePenzQH80"`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_audio_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>bitrate</code>，<strong>比特率（可選）</strong></summary>

該參數用於設定音訊檔案的比特率（碼率），影響音質與檔案大小。推薦的比特率值包括：48Kbps、64Kbps、128Kbps、160Kbps、256Kbps、320Kbps。請注意，所抓取的音訊檔案可能不支援所選比特率，系統將預設向下相容。如果所選比特率均不可用，系統將自動下載可支援的比特率版本。\
參數值：\
`48`, `64K`, `128`, `160`, `256`, `320`

**請求範例：**\
`"bitrate": "320"`&#x20;

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_audio_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>audio_format</code> <strong>，音頻格式（可選）</strong></summary>

此參數用於指定要抓取的音頻文件的輸出格式。默認格式為.opus，可以切換為.mp3 格式。\
參數值：\
`opus` `mp3`

**請求範例：**\
`"audio_format": "mp3"`&#x20;

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_audio_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>is_subtitles</code> <strong>，字幕（必填）</strong></summary>

此參數用於控制在抓取 YouTube 音頻時是否同步下載字幕文件。字幕格式為.vvt。需要注意的是，在下載過程中，音頻和字幕將作為兩個獨立的文件保存。\
參數值：\
`true`  `false`

**請求範例：**\
`"is_subtitles": "true"`&#x20;

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_audio_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>subtitles_language</code> <strong>，字幕語言（可選）</strong></summary>

此參數定義了抓取 YouTube 時要下載的字幕語言。需要注意的是，如果選擇的語言不可用，系統將默認返回英文字幕。參數值：

`阿布哈茲語 ab`、`阿法爾語 aa`、`南非荷蘭語 af`、`阿肯語 ak`、`阿爾巴尼亞語 sq`、`阿姆哈拉語 am`、`阿拉伯語 ar`、`亞美尼亞語 hy`、`阿薩姆語 as`、`艾馬拉語 ay`、`阿塞拜疆語 az`、`孟加拉語 bn`、`巴什基爾語 ba`、`巴斯克語 eu`、`白俄羅斯語 be`、`博杰普爾語 bho`、`波士尼亞語 bs`、`布列塔尼語 br`、`保加利亞語 bg`、`緬甸語 my`、`加泰羅尼亞語 ca`、`宿霧語 ceb`、`簡體中文 zh-Hans`、`繁體中文 zh-Hant`、`科西嘉語 co`、`克羅埃西亞語 hr`、`捷克語 cs`、`丹麥語 da`、`迪維希語 dv`、`荷蘭語 nl`、`宗喀語（不丹語）dz`、`英語（原始）en-orig`、`英語 en`、`世界語 eo`、`愛沙尼亞語 et`、`埃維語 ee`、`法羅語 fo`、`斐濟語 fj`、`菲律賓語 fil`、`芬蘭語 fi`、`法語 fr`、`加語 gaa`、`加利西亞語 gl`、`干達語 lg`、`喬治亞語 ka`、`德語 de`、`希臘語 el`、`瓜拉尼語 gn`、`古吉拉特語 gu`、`海地克里奧爾語 ht`、`豪薩語 ha`、`夏威夷語 haw`、`希伯來語 iw`、`印地語 hi`、`苗語 hmn`、`匈牙利語 hu`、`冰島語 is`、`伊博語 ig`、`印尼語 id`、`因紐特語 iu`、`愛爾蘭語 ga`、`義大利語 it`、`日語 ja`、`爪哇語 jv`、`格陵蘭語 kl`、`卡納達語 kn`、`哈薩克語 kk`、`卡西語 kha`、`高棉語 km`、`盧旺達語 rw`、`韓語 ko`、`克里奧爾語 kri`、`庫爾德語 ku`、`吉爾吉斯語 ky`、`老撾語 lo`、`拉丁語 la`、`拉脫維亞語 lv`、`林加拉語 ln`、`立陶宛語 lt`、`盧巴-盧盧阿語 lua`、`盧奧語 luo`、`盧森堡語 lb`、`馬其頓語 mk`、`馬爾加什語 mg`、`馬來語 ms`、`馬拉雅拉姆語 ml`、`馬耳他語 mt`、`曼克斯語 gv`、`毛利語 mi`、`馬拉地語 mr`、`蒙古語 mn`、`毛里求斯克里奧爾語 mfe`、`尼泊爾語 ne`、`尼瓦爾語 new`、`北索托語 nso`、`挪威語 no`、`齊切瓦語（尼揚賈語）ny`、`奧克語 oc`、`奧里亞語 or`、`奧羅莫語 om`、`奧塞梯語 os`、`邦板牙語 pam`、`普什圖語 ps`、`波斯語 fa`、`波蘭語 pl`、`葡萄牙語（巴西）pt`、`葡萄牙語（葡萄牙）pt-PT`、`旁遮普語 pa`、`克丘亞語 qu`、`羅馬尼亞語 ro`、`基隆迪語 rn`、`俄語 ru`、`薩摩亞語 sm`、`桑戈語 sg`、`梵語 sa`、`蘇格蘭蓋爾語 gd`、`塞爾維亞語 sr`、`塞舌爾克里奧爾法語 crs`、`紹納語 sn`、`信德語 sd`、`僧伽羅語 si`、`斯洛伐克語 sk`、`斯洛文尼亞語 sl`、`索馬里語 so`、`南索托語 st`、`西班牙語 es`、`巽他語 su`、`斯瓦希里語 sw`&#x20;

**請求範例：**\
`"subtitles_language": "en"`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_audio_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/watch?v=8RePenzQH80\"}]" ^
  -d "spider_universal={\"audio_format\": \"mp3\",\"bitrate\": \"320\",\"is_subtitles\": \"true\",\"subtitles_language\": \"en\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**三、產品 - 基本信息下載器**

1.YouTube - 透過唯一 ID 抓取視頻基本信息

<details>

<summary><code>spider_id</code>  ， <strong>所属抓取工具（必填）</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_product_by-id`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_product_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>video_id</code> ，<strong>視頻唯一ID（必選）</strong></summary>

該參數用於指定待抓取的 YouTube 視頻的唯一 ID。

**請求範例：**\
`"video_id": "8RePenzQH80"`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_product_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**四、產品 - 字幕下載器**

1.YouTube - 透過唯一 ID 抓取視頻字幕檔案

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具（必填）</strong></summary>

他定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_transcript_by-id`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_transcript_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\"}]" ^
  -d "spider_universal={\"subtitles_language\": \"en\",\"subtitles_type\": \"auto_generated\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>video_id</code> ，<strong>視頻唯一ID（必填）</strong></summary>

該參數用於指定待抓取的 YouTube 視頻的唯一 ID。

**請求範例：**\
`"video_id": "8RePenzQH80"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_transcript_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\"}]" ^
  -d "spider_universal={\"subtitles_language\": \"en\",\"subtitles_type\": \"auto_generated\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>subtitles_language</code> ，<strong>字幕語言（必填）</strong></summary>

此參數定義了抓取 YouTube 時下載字幕的語言。需要注意的是，當所選語言沒有時，系統預設會返回英文字幕。

**請求範例：**\
`"subtitles_language": "en"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_transcript_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\"}]" ^
  -d "spider_universal={\"subtitles_language\": \"en\",\"subtitles_type\": \"auto_generated\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>subtitles_type</code> ，<strong>字幕類型（必填）</strong> </summary>

此參數用於指定抓取的字幕是自動產生還是使用者上傳的。&#x20;

參數值：`auto_generated` `uploader_provided`

**請求範例：**\
`"subtitles_type": "auto_generated"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_transcript_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\"}]" ^
  -d "spider_universal={\"subtitles_language\": \"en\",\"subtitles_type\": \"auto_generated\"}" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**五、產品 - 評論下載器**

1.YouTube - 透過唯一 ID 抓取視頻評論

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具（必填）</strong></summary>

他定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_comment_by-id`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID " ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_comment_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\",\"load_replies\": \"10\",\"num_of_comments\": \"10\",\"sort_by\": \"Top comments\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>video_id</code> ，<strong>視頻唯一ID（必填）</strong></summary>

該參數用於指定待抓取的 YouTube 視頻的唯一 ID。

**請求範例：**\
`"video_id": "8RePenzQH80"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID " ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_comment_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\",\"load_replies\": \"10\",\"num_of_comments\": \"10\",\"sort_by\": \"Top comments\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>load_replies</code> ，<strong>加載回复（必填）</strong></summary>

此參數用於指定頁面載入回覆時所用到的時間。

**請求範例：**\
`"load_replies": "10"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID " ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_comment_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\",\"load_replies\": \"10\",\"num_of_comments\": \"10\",\"sort_by\": \"Top comments\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>num_of_comments</code> ，<strong>評論數量（必填）</strong></summary>

此參數用於指定抓取評論的數量。

**請求範例：**\
`"num_of_comments": "10"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID " ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_comment_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\",\"load_replies\": \"10\",\"num_of_comments\": \"10\",\"sort_by\": \"Top comments\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>sort_by</code> ，<strong>排序方式（必填）</strong></summary>

此參數用於指定抓取評論時，評論的排序方式。\
參數值：`Top comments` `Newest first`

**請求範例：**\
`"sort_by": "Top comments"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID " ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_comment_by-id" ^
  -d "spider_parameters=[{\"video_id\": \"8RePenzQH80\",\"load_replies\": \"10\",\"num_of_comments\": \"10\",\"sort_by\": \"Top comments\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**六、產品 - 個人資料下載器**

1.YouTube - 透過 URL 抓取頻道信息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具（必填）</strong></summary>

他定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_profiles_by-url`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/@mrbeast\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>url</code> <strong>，頻道URL（必填）</strong></summary>

此參數用於指定待抓取的 YouTube 頻道的存取 URL 位址。

**請求範例：**\
`"url": "https://www.youtube.com/@mrbeast"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/@mrbeast\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

2.YouTube - 透過關鍵字抓取頻道信息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具（必填）</strong></summary>

他定義了要使用的抓取工具。

**請求範例：**\
`spider_id=youtube_profiles_by-keyword`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_profiles_by-keyword" ^
  -d "spider_parameters=[{\"keyword\": \"MrBeast\",\"page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>keyword</code> ，<strong>關鍵字（必填）</strong></summary>

此參數用於指定 YouTube 頻道進行搜尋的關鍵字。

**請求範例：**\
`"keyword": "MrBeast"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_profiles_by-keyword" ^
  -d "spider_parameters=[{\"keyword\": \"MrBeast\",\"page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>page_turning</code>  ，<strong>抓取頁數（必填）</strong></summary>

此參數用於設定抓取搜尋結果的頁數。輸入數字 n 表示抓取從第一頁到第 n 頁的所有產品資料。\
參數值：`1-100000`

**請求範例：**\
`"page_turning": "1"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=www.youtube.com" ^
  -d "spider_id=youtube_profiles_by-keyword" ^
  -d "spider_parameters=[{\"keyword\": \"MrBeast\",\"page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**七、產品 - 影片貼文抓取器**

1\.  YouTube -  透過 URL 抓取影片貼文訊息

<details>

<summary><code>spider_id</code> ，<strong>抓取工具（必填）</strong></summary>

指定要使用的爬蟲工具。

**請求範例：**

`spider_id=youtube_video-post_by-url`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/@stephcurry/videos\",\"order_by\": \"Latest\",\"num_of_posts\": \"2\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"

```

</details>

<details>

<summary><code>url</code> ，<strong>頻道視訊網址（必填）</strong></summary>

此參數指定要取得影片的頻道影片 URL。

**請求範例：**

`"url": "https://www.youtube.com/@stephcurry/videos"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/@stephcurry/videos\",\"order_by\": \"Latest\",\"num_of_posts\": \"2\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary><code>order_by</code> ，<strong>排序方式（可選）</strong></summary>

此參數指定帖子的排序方式。

**請求範例：**

`"order_by": "Latest"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/@stephcurry/videos\",\"order_by\": \"Latest\",\"num_of_posts\": \"2\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary><code>num_of_posts</code> ，<strong>貼文數（可選）</strong></summary>

此參數用於指定要抓取的貼文數量。

**請求範例：**

`"num_of_posts": "2"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/@stephcurry/videos\",\"order_by\": \"Latest\",\"num_of_posts\": \"2\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

2\.  YouTube -  透過搜尋篩選器抓取影片貼文訊息

<details>

<summary><code>spider_id</code> ，<strong>抓取工具（必填）</strong></summary>

他定義了要使用的抓取工具。

**請求範例：**

`spider_id=youtube_video-post_by-search-filters`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-search-filters" ^
  -d "spider_parameters=[{\"keyword_search\": \"dog\",\"features\": \"Live\",\"type\": \"Video\",\"duration\": \"\",\"upload_date\": \"\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"

```

</details>

<details>

<summary><code>keyword_search</code> ，<strong>搜尋關鍵字（必填）</strong></summary>

此參數指定要搜尋的關鍵字。

**請求範例：**

`"keyword_search": "dog"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-search-filters" ^
  -d "spider_parameters=[{\"keyword_search\": \"dog\",\"features\": \"Live\",\"type\": \"Video\",\"duration\": \"Under 4 minutes\",\"upload_date\": \"Today\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary> <code>features</code>，<strong>特徵（可選）</strong></summary>

此參數指定視訊特徵，例如直播、4K、高清、字幕等。

**請求範例：**

`"features": "Live"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-search-filters" ^
  -d "spider_parameters=[{\"keyword_search\": \"dog\",\"features\": \"Live\",\"type\": \"Video\",\"duration\": \"Under 4 minutes\",\"upload_date\": \"Today\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary> <code>type</code>，<strong>類型（可選）</strong></summary>

此參數指定視訊類型。

**請求範例：**

`"type": "Video"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-search-filters" ^
  -d "spider_parameters=[{\"keyword_search\": \"dog\",\"features\": \"Live\",\"type\": \"Video\",\"duration\": \"Under 4 minutes\",\"upload_date\": \"Today\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary> <code>duration</code>，<strong>持續時間（可選）</strong></summary>

此參數指定視訊持續時間。

**請求範例：**

`"duration": "Under 4 minutes"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-search-filters" ^
  -d "spider_parameters=[{\"keyword_search\": \"dog\",\"features\": \"Live\",\"type\": \"Video\",\"duration\": \"Under 4 minutes\",\"upload_date\": \"Today\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary> <code>upload_date</code>，<strong>上傳日期（可選）</strong></summary>

此參數指定影片上傳日期。

**請求範例：**

`"upload_date": "Today"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-search-filters" ^
  -d "spider_parameters=[{\"keyword_search\": \"dog\",\"features\": \"Live\",\"type\": \"Video\",\"duration\": \"Under 4 minutes\",\"upload_date\": \"Today\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

3\.  YouTube -  透過話題標籤抓取影片貼文訊息

<details>

<summary><code>spider_id</code> ，<strong>抓取工具（必填）</strong></summary>

確定要使用的抓取工具。

**請求範例：**

`spider_id=youtube_video-post_by-search-filters`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-hashtag" ^
  -d "spider_parameters=[{\"hashtag\": \"shopping\",\"num_of_posts\": \"5\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"

```

</details>

<details>

<summary> <code>hashtag</code>，<strong>標籤（必填）</strong></summary>

此參數用於指定篩選影片的標籤。

**請求範例：**

`"hashtag": "shopping"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-hashtag" ^
  -d "spider_parameters=[{\"hashtag\": \"shopping\",\"num_of_posts\": \"5\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

4\.  YouTube -  透過播客網址抓取影片貼文訊息

<details>

<summary><code>spider_id</code> ，<strong>抓取工具（必填）</strong></summary>

確定要使用的抓取工具。

**請求範例：**

`spider_id=youtube_video-post_by-podcast-url`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-podcast-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/playlist?list=RDCLAK5uy_lS3E3PgpboCkZ_PfLPCkLLNPI1uH6kfc0\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"

```

</details>

<details>

<summary> <code>url</code>，<strong>播客網址（必填）</strong></summary>

此參數指定要抓取的播客 URL。

**請求範例：**

`"url": "https://www.youtube.com/playlist?list=RDCLAK5uy_lS3E3PgpboCkZ_PfLPCkLLNPI1uH6kfc0"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-podcast-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/playlist?list=RDCLAK5uy_lS3E3PgpboCkZ_PfLPCkLLNPI1uH6kfc0\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

5\.  YouTube - 透過關鍵字抓取影片貼文訊息

<details>

<summary><code>spider_id</code> ，<strong>抓取工具（必填）</strong></summary>

確定要使用的抓取工具。

**請求範例：**

`spider_id=youtube_video-post_by-keyword`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-keyword" ^
  -d "spider_parameters=[{\"keyword\": \"top videos\",\"num_of_posts\": \"5\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"

```

</details>

<details>

<summary><code>keyword</code> ，<strong>關鍵字（必填）</strong></summary>

此參數指定要搜尋的關鍵字。

**請求範例：**

`"keyword": "top videos"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-keyword" ^
  -d "spider_parameters=[{\"keyword\": \"top videos\",\"num_of_posts\": \"5\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

6\.  YouTube -  透過探索功能抓取影片貼文訊息

<details>

<summary><code>spider_id</code> ，<strong>抓取工具（必填）</strong></summary>

確定要使用的抓取工具。

**請求範例：**

`spider_id=youtube_video-post_by-explore`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-explore" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/feed/storefront?bp=ogUCKAU%3D\",\"all_tabs\": \"true\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"

```

</details>

<details>

<summary><code>url</code> ，<strong>Explore URL（必填）</strong></summary>

此參數指定要抓取的 Explore URL。

**請求範例：**

`"url": "https://www.youtube.com/feed/storefront?bp=ogUCKAU%3D"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-explore" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/feed/storefront?bp=ogUCKAU%3D\",\"all_tabs\": \"true\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

<details>

<summary><code>all_tabs</code> ，<strong>所有標籤頁（可選）</strong></summary>

此參數指定是否收集所有標籤頁。

**請求範例：**

`"all_tabs": "true"`

```sh
curl -X POST "https://scraperapi.thordata.com/builde" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=youtube.com" ^
  -d "spider_id=youtube_video-post_by-explore" ^
  -d "spider_parameters=[{\"url\": \"https://www.youtube.com/feed/storefront?bp=ogUCKAU%3D\",\"all_tabs\": \"true\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{VideoID}}"
```

</details>

如果您需要更多幫助，請通過郵箱 <support@thordata.com> 聯絡我們。
