YouTube Scraping Parameters

Web Scraper API YouTube scraping parameters

Configure YouTube scraping parameters using Thordata's Web Scraper API, including parameters such as products, Token, scraping URLs, resolution, audio format, subtitles, and subtitle language.

Unique identifiers:

chevron-righttoken ,Access Token (Required)hashtag

This parameter is used as an API access token to ensure the legitimacy of crawling requests.

Request Example: "Authorization: Bearer ********************************"

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}}"

I. Product - Video Downloader

  1. YouTube - Grab video files via URL

chevron-rightspider_id ,Associated Scraping Tool (Required)hashtag

It defines the crawler to use.

Request Example: spider_id=youtube_video_by-url

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}}"
chevron-rightresolution ,Resolution (Optional)hashtag

This parameter is used to specify the target resolution for crawling the video. If the selected resolution is unavailable or not precisely matched, the system will automatically downgrade to the available option with lower quality. Parameter Values: 360p 480p 720p 1080p 1440p 2160p

Request Example: "resolution": "2160p"

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}}"
chevron-rightis_subtitles ,Subtitles (Required)hashtag

This parameter controls whether to download subtitle files simultaneously with YouTube audio. Subtitles are in .vvt format. Note that during the download process, the audio and subtitles will be saved as two separate files. Parameter value:true false

Request Example: "is_subtitles":"true"

chevron-rightsubtitles_language ,Subtitles Language (Optional)hashtag

This parameter defines the language of the subtitles to be downloaded when crawling YouTube. It should be noted that if the selected language is unavailable, the system will return English subtitles by default.

Abkhazian ab, Afar aa, Afrikaans af, Akan ak, Albanian sq, Amharic am, Arabic ar, Armenian hy, Assamese as, Aymara ay, Azerbaijani az, Bengali bn, Bashkir ba, Basque eu, Belarusian be, Bhojpuri bho, Bosnian bs, Breton br, Bulgarian bg, Burmese my, Catalan ca, Cebuano ceb, Simplified Chinese zh-Hans, Traditional Chinese zh-Hant, Corsican co, Croatian hr, Czech cs, Danish da, Divehi dv, Dutch nl, Dzongkha (Bhutan) dz, English (original) en-orig, English en, Esperanto eo, Estonian et, Ewe ee, Faroese fo, Fijian fj, Filipino fil, Finnish fi, French fr, Ga gaa, Galician gl, Ganda lg, Georgian ka, German de, Greek el, Guarani gn, Gujarati gu, Haitian Creole ht, Hausa ha, Hawaiian haw, Hebrew iw, Hindi hi, Hmong hmn, Hungarian hu, Icelandic is, Igbo ig, Indonesian id, Inuktitut iu, Irish ga, Italian it, Japanese ja, Javanese jv, Greenlandic kl, Kannada kn, Kazakh kk, Khasi kha, Khmer km, Kinyarwanda rw, Korean ko, Krio kri, Kurdish ku, Kyrgyz ky, Lao lo, Latin la, Latvian lv, Lingala ln, Lithuanian lt, Luba-Katanga lua, Luo luo, Luxembourgish lb, Macedonian mk, Malagasy mg, Malay ms, Malayalam ml, Maltese mt, Manx gv, Maori mi, Marathi mr, Mongolian mn, Mauritian Creole mfe, Nepali ne, Newari new, Northern Sotho nso, Norwegian no, Nyanja ny, Occitan oc, Oriya or, Oromo om, Ossetic os, Pampanga pam, Pashto ps, Persian fa, Polish pl, Portuguese (Brazil) pt, Portuguese (Portugal) pt-PT, Punjabi pa, Quechua qu, Romanian ro, Rundi rn, Russian ru, Samoan sm, Sango sg, Sanskrit sa, Scottish Gaelic gd, Serbian sr, Seychelles Creole French crs, Shona sn, Sindhi sd, Sinhala si, Slovak sk, Slovenian sl, Somali so, Southern Sotho st, Spanish es, Sundanese su, Swahili sw

Request Example: "subtitles_language":"en"

II. Product - Audio Downloader

  1. YouTube - Grab audio and subtitle files via URL

chevron-rightspider_id ,Associated Scraping Tool (Required)hashtag

It defines the crawler to use.

Request Example: spider_id=youtube_audio_by-url

chevron-rightaudio_format ,Audio Format (Required)hashtag

This parameter is used to specify the output format of the audio file to be crawled. The default format is .opus, and it can be switched to .mp3 format. Parameter Values:opus mp3

Request Example: "audio_format":"mp3"

chevron-rightbitrateBit rate (optional)hashtag

This parameter sets the bitrate (bitrate) of the audio file, affecting both sound quality and file size. Recommended bitrate values ​​include: 48 Kbps, 64 Kbps, 128 Kbps, 160 Kbps, 256 Kbps, and 320 Kbps. Please note that the captured audio file may not support the selected bitrate, and the system will default to backward compatibility. If none of the selected bitrates are available, the system will automatically download a supported bitrate. Parameter Value: 48Kbps 64Kbps 128Kbps 160Kbps 256Kbps 320Kbps

Request Example:

"bitrate": "320"

chevron-rightis_subtitles ,Subtitles (Required)hashtag

This parameter is used to control whether to synchronously download subtitle files when crawling YouTube audio. The subtitle format is .srt. It should be noted that during the download, the audio and subtitles will be saved as two separate files. Parameter Values:true false

Request Example: "is_subtitles":"true"

chevron-rightsubtitles_language ,Subtitles Language (Optional)hashtag

This parameter defines the language of the subtitles to be downloaded when crawling YouTube. It should be noted that if the selected language is unavailable, the system will return English subtitles by default.

Abkhazian ab, Afar aa, Afrikaans af, Akan ak, Albanian sq, Amharic am, Arabic ar, Armenian hy, Assamese as, Aymara ay, Azerbaijani az, Bengali bn, Bashkir ba, Basque eu, Belarusian be, Bhojpuri bho, Bosnian bs, Breton br, Bulgarian bg, Burmese my, Catalan ca, Cebuano ceb, Simplified Chinese zh-Hans, Traditional Chinese zh-Hant, Corsican co, Croatian hr, Czech cs, Danish da, Divehi dv, Dutch nl, Dzongkha (Bhutan) dz, English (original) en-orig, English en, Esperanto eo, Estonian et, Ewe ee, Faroese fo, Fijian fj, Filipino fil, Finnish fi, French fr, Ga gaa, Galician gl, Ganda lg, Georgian ka, German de, Greek el, Guarani gn, Gujarati gu, Haitian Creole ht, Hausa ha, Hawaiian haw, Hebrew iw, Hindi hi, Hmong hmn, Hungarian hu, Icelandic is, Igbo ig, Indonesian id, Inuktitut iu, Irish ga, Italian it, Japanese ja, Javanese jv, Greenlandic kl, Kannada kn, Kazakh kk, Khasi kha, Khmer km, Kinyarwanda rw, Korean ko, Krio kri, Kurdish ku, Kyrgyz ky, Lao lo, Latin la, Latvian lv, Lingala ln, Lithuanian lt, Luba-Katanga lua, Luo luo, Luxembourgish lb, Macedonian mk, Malagasy mg, Malay ms, Malayalam ml, Maltese mt, Manx gv, Maori mi, Marathi mr, Mongolian mn, Mauritian Creole mfe, Nepali ne, Newari new, Northern Sotho nso, Norwegian no, Nyanja ny, Occitan oc, Oriya or, Oromo om, Ossetic os, Pampanga pam, Pashto ps, Persian fa, Polish pl, Portuguese (Brazil) pt, Portuguese (Portugal) pt-PT, Punjabi pa, Quechua qu, Romanian ro, Rundi rn, Russian ru, Samoan sm, Sango sg, Sanskrit sa, Scottish Gaelic gd, Serbian sr, Seychelles Creole French crs, Shona sn, Sindhi sd, Sinhala si, Slovak sk, Slovenian sl, Somali so, Southern Sotho st, Spanish es, Sundanese su, Swahili sw

Request Example: "subtitles_language":"en"

III. Product - Basic Information Downloader

  1. YouTube - Capture basic video information using a unique ID

chevron-rightspider_id ,Associated Scraping Tool (Required)hashtag

It defines the crawler to use.

Request Example:

spider_id=youtube_product_by-id

chevron-rightvideo_idVideo unique ID (Required)hashtag

This parameter specifies the unique ID of the YouTube video to be crawled.

Request Example:

"video_id": "8RePenzQH80"

IV. Product - Subtitle Downloader

  1. YouTube - Extract subtitle files from videos using unique IDs

chevron-rightspider_id ,Associated Scraping Tool (Required)hashtag

It defines the crawler to use.

Request Example:

spider_id=youtube_transcript_by-id

chevron-rightvideo_idVideo unique ID (Required)hashtag

This parameter specifies the unique ID of the YouTube video to be crawled.

Request Example:

"video_id": "8RePenzQH80"

chevron-rightsubtitles_language ,Subtitles Language(Required)hashtag

This parameter defines the language of the subtitles to be downloaded when crawling YouTube. It should be noted that if the selected language is unavailable, the system will return English subtitles by default.

Abkhazian ab, Afar aa, Afrikaans af, Akan ak, Albanian sq, Amharic am, Arabic ar, Armenian hy, Assamese as, Aymara ay, Azerbaijani az, Bengali bn, Bashkir ba, Basque eu, Belarusian be, Bhojpuri bho, Bosnian bs, Breton br, Bulgarian bg, Burmese my, Catalan ca, Cebuano ceb, Simplified Chinese zh-Hans, Traditional Chinese zh-Hant, Corsican co, Croatian hr, Czech cs, Danish da, Divehi dv, Dutch nl, Dzongkha (Bhutan) dz, English (original) en-orig, English en, Esperanto eo, Estonian et, Ewe ee, Faroese fo, Fijian fj, Filipino fil, Finnish fi, French fr, Ga gaa, Galician gl, Ganda lg, Georgian ka, German de, Greek el, Guarani gn, Gujarati gu, Haitian Creole ht, Hausa ha, Hawaiian haw, Hebrew iw, Hindi hi, Hmong hmn, Hungarian hu, Icelandic is, Igbo ig, Indonesian id, Inuktitut iu, Irish ga, Italian it, Japanese ja, Javanese jv, Greenlandic kl, Kannada kn, Kazakh kk, Khasi kha, Khmer km, Kinyarwanda rw, Korean ko, Krio kri, Kurdish ku, Kyrgyz ky, Lao lo, Latin la, Latvian lv, Lingala ln, Lithuanian lt, Luba-Katanga lua, Luo luo, Luxembourgish lb, Macedonian mk, Malagasy mg, Malay ms, Malayalam ml, Maltese mt, Manx gv, Maori mi, Marathi mr, Mongolian mn, Mauritian Creole mfe, Nepali ne, Newari new, Northern Sotho nso, Norwegian no, Nyanja ny, Occitan oc, Oriya or, Oromo om, Ossetic os, Pampanga pam, Pashto ps, Persian fa, Polish pl, Portuguese (Brazil) pt, Portuguese (Portugal) pt-PT, Punjabi pa, Quechua qu, Romanian ro, Rundi rn, Russian ru, Samoan sm, Sango sg, Sanskrit sa, Scottish Gaelic gd, Serbian sr, Seychelles Creole French crs, Shona sn, Sindhi sd, Sinhala si, Slovak sk, Slovenian sl, Somali so, Southern Sotho st, Spanish es, Sundanese su, Swahili sw

Request Example: "subtitles_language":"en"

chevron-rightsubtitles_typeSubtitle type(Required)hashtag

This parameter specifies whether the captured subtitles are automatically generated or user-uploaded. Parameter value:auto_generated uploader_provided

Request Example:

"subtitles_type": "auto_generated"

V. Product - Review Downloader

  1. YouTube - Capture video comment information using unique ID

chevron-rightspider_id ,Associated Scraping Tool (Required)hashtag

It defines the crawler to use.

Request Example:

spider_id=youtube_profiles_by-url

chevron-righturl ,Channel URL (Required)hashtag

This parameter is used to specify the access URL address of the YouTube channel to be crawled.

Request Example:

"url": "https://www.youtube.com/@mrbeast"

2. YouTube - Fetch profile information via unique ID

chevron-rightspider_id ,Associated Scraping Tool (Required)hashtag

It defines the crawler to use.

Request Example:

spider_id=youtube_profiles_by-keyword

chevron-rightkeywordKeywords (Required)hashtag

This parameter specifies the keyword to search YouTube channels for.

Request Example:

"keyword": "MrBeast"

chevron-rightpage_turningNumber of crawled pages (Required)hashtag

This parameter sets the number of pages of search results to crawl. Entering a number "n" will crawl all product data from page 1 to page n. Parameter value:1-100000

Request Example:

"page_turning": "1"

VI. Product - Profile Scraper

1. YouTube - Scrape profile information by keyword

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_profiles_by-keyword

chevron-rightkeywordKeywords (Required)hashtag

This parameter specifies the keyword to search.

Request Example:

"keyword": "scrape"

chevron-rightpage_turningPages to Search back (Required)hashtag

This parameter sets the number of pages of search results to crawl. For example, if you enter 2, the tool will scrape all products from both page 1 and page 2 of the search results.

Request Example:

"page_turning": "2"

2. YouTube - Scrape profile information by URL

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_profiles_by-url

chevron-righturlChannel URL (Required)hashtag

This parameter specifies the Channel URL to search.

Request Example:

"url": "https://www.youtube.com/@mrbeast"

VII. Product - Video Post Scraper

1. YouTube - Scrape video post information by URL

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_video-post_by-url

chevron-righturlChannel Video URL (Required)hashtag

This parameter specifies channel video URL to get videos.

Request Example:

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

chevron-rightorder_byOrder by (Optional)hashtag

This parameter specifies how to sort the posts.

Request Example:

"order_by": "Latest"

chevron-rightnum_of_postsNumber of posts (Optional)hashtag

This parameter is used to specify the number of posts to crawl.

Request Example:

"num_of_posts": "2"

2. YouTube - Scrape video post information by Search Filters

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_video-post_by-search-filters

chevron-rightkeyword_searchSearch Keyword (Required)hashtag

This parameter specifies the keyword to search.

Request Example:

"keyword_search": "dog"

chevron-right featuresFeatures (Optional)hashtag

This parameter specifies video features, such as live, 4K, HD, subtitles, etc.

Request Example:

"features": "Live"

chevron-right typeType (Optional)hashtag

This parameter specifies video types.

Request Example:

"type": "Video"

chevron-right durationDuration (Optional)hashtag

This parameter specifies video duration.

Request Example:

"duration": "Under 4 minutes"

chevron-right upload_dateUpload date (Optional)hashtag

This parameter specifies the upload date of videos.

Request Example:

"upload_date": "Today"

3. YouTube - Scrape video post information by Hashtag

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_video-post_by-search-filters

chevron-right hashtagHashtag (Required)hashtag

This parameter specifies hashtags to filter videos.

Request Example:

"hashtag": "shopping"

4. YouTube - Scrape video post information by podcast URL

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_video-post_by-podcast-url

chevron-right urlPodcast URL (Required)hashtag

This parameter specifies the podcast URL to crawl.

Request Example:

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

5. YouTube - Scrape video post information by keyword

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_video-post_by-keyword

chevron-rightkeywordKeyword (Required)hashtag

This parameter specifies the keyword to search.

Request Example:

"keyword": "top videos"

6. YouTube - Scrape video post information by Explore

chevron-rightspider_idScraper tool (Required)hashtag

Defines which scraper tool to use.

Request examples:

spider_id=youtube_video-post_by-explore

chevron-righturlURL (Required)hashtag

This parameter specifies the Explore URL to crawl.

Request Example:

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

chevron-rightall_tabsAll Tabs (Optional)hashtag

This parameter specifies whether to collect all tabs.

Request Example:

"all_tabs": "true"

If you need further help, please contact us at [email protected].

Last updated

Was this helpful?