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.

No credit card required

Author's avatarBernard O.
  • Modified
  • Users4,607
  • Runs69,466

Search term

searchKeywords

Optional

string

Enter a search term just like you would enter it in YouTube's search bar.

Maximum search results

maxResults

Optional

integer

Limit the number of videos you want to crawl. Leave the field empty for unlimited results.

Direct URLs

startUrls

Optional

array

Enter a link to a YouTube video, channel, or search results page. You can also import a CSV file or Google Sheet with a list of URLs. Note: Input from Search term will be ignored when using this option.

Only scrape basic information from a channel

simplifiedInformation

Optional

boolean

If set to true, the scraper will only extract information available on the channel page itself - information on individual videos will therefore be limited to their preview. Note: Only relevant when providing a channel URL in the Direct URL field.

Save Shorts

saveShorts

Optional

boolean

If true, actor will save short ('Shorts' tab) videos from the channel.

Maximum shorts

maxResultsShorts

Optional

integer

Limit the number of Shorts videos you want to crawl from the channel. Leave the field empty for unlimited results.

Maximum comments

maxComments

Optional

integer

Limit the number of comments you want to scrape per video. Input 0 or leave the field empty to not scrape any comments.

Download subtitles

downloadSubtitles

Optional

boolean

If set to true, the scraper will download subtitles for the video and convert them to .srt format.

Save subtitles to key-value store

saveSubsToKVS

Optional

boolean

If set to true, the scraper will save the downloaded subtitles to the key-value store. Note: Download subtitles must be turned on for this option to work.

Subtitle language

subtitlesLanguage

Optional

string

Language to download subtitles in. Note: Download subtitles must be turned on for this option to work.

Options:

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

Prefer automatically generated subtitles.

preferAutoGeneratedSubtitles

Optional

boolean

If set to true, automatically generated subtitles are preferred to user subtitles.Note: A subtitle language must be selected for this option to work.

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

Use Apify Proxy or your custom Proxy.

Verbose log

verboseLog

Optional

boolean

Shows additional logging information.