Actor picture

YouTube Scraper

bernardo/youtube-scraper

YouTube crawler and video scraper. Alternative YouTube API with no limits or quotas. Extract and download channel name, likes, number of views, and number of subscribers. Scrape by keyword or URL. Customize your searches with human-friendly date formats. Download your data as HTML table, JSON, CSV,

No credit card required

Author's avatarBernard O.
  • Modified
  • Users1,699
  • Runs20,592

Search keywords

searchKeywords

Optional

string

What to search Youtube for

Maximum search results

maxResults

Optional

integer

Limit number of videos to crawl; for 'No limits' empty the field

Direct URLs

startUrls

Optional

array

Provide some direct Youtube urls, like channel urls or search urls. When provided, it disables search.

Videos to

postsToDate

Optional

string

Scrape the videos until the date e.g 30 minutes 1 week 5 months 4 years, etc. for 'Today' empty the field

Videos from

postsFromDate

Optional

string

How far back in history to go e.g 30 minutes 1 week 5 months 4 years, etc. for 'No limits' empty the field

Download subtitles

downloadSubtitles

Optional

boolean

If set to true, we will also download subtitles for given video and convert it to SRT format

Save downloaded subtitles to Key Value Store

saveSubsToKVS

Optional

boolean

If set to true, we will save downloaded (and converted to .srt format) subtitles to Key Value Store in format { subtitles: srt_text }. 'downloadSubtitles' must be set to true for this take an effect

Download subtitles in selected language

subtitlesLanguage

Optional

string

Language to download subtitles in. 'downloadSubtitles' must be set to true for this take an effect

Options:

"en", "de", "es", "fr", "it", "ja", "ko", "nl", "pt", "ru"

Extend Output Function

extendOutputFunction

Optional

string

Add or remove properties on the output object or omit the output returning null

Extend Scraper Function

extendScraperFunction

Optional

string

Advanced function that allows you to extend the default scraper functionality, allowing you to manually perform actions on the page

Custom data

customData

Optional

object

Any data that you want to have available inside the Extend Output/Scraper Function

Handle page timeout

handlePageTimeoutSecs

Optional

integer

Set the handlePageTimeout seconds

Proxy configuration

proxyConfiguration

Required

object

The best option is usually Automatic proxy. But you can also use your own proxies or no proxy

Verbose log

verboseLog

Optional

boolean

If set to true, we will save downloaded (and converted to .srt format) subtitles to Key Value Store in format { subtitles: srt_text, language: languageCode, type:autoOrUserGenerated }. 'downloadSubtitles' must be set to true for this take an effect

Prefer automatically generated subtitles before the user generated ones.

preferAutoGeneratedSubtitles

Optional

boolean

If set to `true` and language is provided, we download automatically generated subtitles rather then user ones. If no language is provided, this settings takes no effect

Max comments

maxComments

Optional

integer

Limit the number of comments that will get scraped. Scraping comments requires scrolling and takes time. 0 or empty means we will not scrape any comments at all.