YouTube Scraper avatar

YouTube Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
YouTube Scraper

YouTube Scraper

Scrape videos, channels, playlists, and search results from YouTube. Extract metadata, subtitles, and channel info.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Beautiful Scrape

Beautiful Scrape

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Scrape public data from YouTube — videos, channels, playlists, and search results — beyond what the YouTube Data API allows.

What does YouTube Scraper do?

YouTube Scraper extracts public data from YouTube pages. It can scrape video metadata, channel information, playlist contents, and search results in bulk.

  • Extract video titles, descriptions, view counts, likes, comments count, duration, and more
  • Scrape channel info: subscriber count, total videos, total views, description, location, join date
  • Break down playlists and enumerate all videos
  • Search YouTube by keywords with filtering and sorting
  • Download subtitles and transcripts (auto-generated or user-uploaded)
  • Export data in JSON, CSV, Excel, or HTML via the Apify platform

What data can you scrape from YouTube?

FieldDescription
📺 Channel nameName of the video's channel
👍 LikesNumber of likes on the video
📝 Video titleTitle of the video
💬 Comments countTotal number of comments
🔗 Video URLDirect link to the video
📍 Channel locationGeographic location of the channel
🖍 SubtitlesAuto-generated and user-uploaded transcripts
🌐 Channel URLLink to the channel page
📼 Total videosNumber of videos on the channel
👁️ View countNumber of views on the video
👀 Total viewsTotal views across all channel videos
📈 SubscribersNumber of channel subscribers
⏱️ DurationLength of the video
📅 Publish dateWhen the video was uploaded
#️⃣ HashtagsHashtags associated with the video
📽️ ThumbnailsVideo thumbnail URLs

How to scrape YouTube data

  1. Create a free Apify account using your email.
  2. Open YouTube Scraper.
  3. Add one or more YouTube URLs or search terms.
  4. Click the Start button and wait for the data to be extracted.
  5. Download your data in JSON, CSV, Excel, or HTML.

Input

You can configure the scraper through the Apify Console UI or by providing a JSON input.

Start URLs

Paste YouTube URLs to scrape. Supports:

  • Video URLs: https://www.youtube.com/watch?v=...
  • Channel URLs: https://www.youtube.com/@ChannelName
  • Playlist URLs: https://www.youtube.com/playlist?list=...
  • Search result URLs: https://www.youtube.com/results?search_query=...
  • Shorts: https://www.youtube.com/shorts/...
  • Live streams: https://www.youtube.com/live/...

Search keywords

Search YouTube by typing keywords just like you would in the YouTube search bar. Each keyword produces a separate set of results.

Result limits

ParameterDefaultDescription
maxResults10Max regular videos per URL/search
maxResultsShorts0Max Shorts (search only)
maxResultStreams0Max live streams (search only)

Filtering by date

When scraping by search term: Use searchDateFilter to filter by hour, day, week, month, or year.

When scraping by channel URL: Use oldestPostDate with relative values like 3 days, 1 week, 2 months, or absolute dates like 2024-01-15.

Sorting

Channel videos: Use channelSortBynewest (default), popular, or oldest.

Search results: Use searchSortByrelevance, date, viewCount, or rating.

Subtitles

Enable subtitle extraction with downloadSubtitles: true. Configure:

ParameterDefaultDescription
subtitlesLanguage"en"Preferred language code
subtitlesFormat"plaintext"Format: plaintext, srt, or vtt
preferAutoGeneratedSubtitlesfalsePrefer auto-generated over user-uploaded
saveSubsToKVSfalseSave to Apify key-value store with URL reference

Input example

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxResults": 10,
"downloadSubtitles": true,
"subtitlesFormat": "plaintext"
}

Search example:

{
"searchKeywords": ["web scraping tutorial"],
"maxResults": 20,
"maxResultsShorts": 5,
"searchSortBy": "date",
"searchDateFilter": "month"
}

Output

Results are pushed to the Apify dataset. You can download them in JSON, CSV, Excel, or HTML.

Single video

{
"title": "Stromae - Santé (Live)",
"id": "CW7gfrTlr0Y",
"url": "https://www.youtube.com/watch?v=CW7gfrTlr0Y",
"thumbnailUrl": "https://i.ytimg.com/vi/CW7gfrTlr0Y/maxresdefault.jpg",
"viewCount": 35582192,
"date": "2021-12-21T00:00:00.000Z",
"likes": 512238,
"duration": "00:03:17",
"type": "video",
"channelName": "StromaeVEVO",
"channelUrl": "https://www.youtube.com/@StromaeVEVO",
"numberOfSubscribers": 6930000,
"commentsCount": 14,
"text": "Stromae - Santé (Live From The Tonight Show...)",
"descriptionLinks": [
{ "url": "https://stromae.lnk.to/la-solassitude", "text": "https://stromae.lnk.to/la-solassitude" }
],
"isMonetized": null,
"commentsTurnedOff": false,
"hashtags": ["#Stromae", "#Santé"],
"isAgeRestricted": false
}

Channel scrape

When scraping a channel, results include channel-level metadata:

{
"id": "HV6OlMPn5sI",
"title": "Raimu - The Spirit Within",
"duration": "29:54",
"channelName": "Lofi Girl",
"channelUrl": "https://www.youtube.com/@LofiGirl",
"date": "2024-01-15T00:00:00.000Z",
"viewCount": 410458,
"fromYTUrl": "https://www.youtube.com/@LofiGirl/videos",
"numberOfSubscribers": 13100000,
"channelDescription": "That girl studying by the window non-stop...",
"channelJoinedDate": "Mar 18, 2015",
"channelLocation": "France",
"channelTotalVideos": 409,
"channelTotalViews": 1710167563,
"isChannelVerified": true
}

Playlist scrape

{
"id": "CdgDLaxe2Q4",
"title": "Lecture 4 | String Theory and M-Theory",
"duration": "1:23:37",
"channelName": "Stanford",
"channelUrl": "https://www.youtube.com/@stanford",
"url": "https://www.youtube.com/watch?v=CdgDLaxe2Q4&list=PL6i60qoDQhQG...&index=4",
"viewCount": 106000,
"fromYTUrl": "https://www.youtube.com/playlist?list=PL6i60qoDQhQG...",
"order": 4
}

Search results

{
"id": "CwRMBKk8St0",
"title": "LET'S ARGUE: Beyoncé Fails the Bechdel Test!",
"duration": "13:48",
"channelName": "fantano",
"channelUrl": "https://www.youtube.com/@fantano",
"viewCount": 635379,
"fromYTUrl": "https://www.youtube.com/results?search_query=bechdel+test",
"type": "video",
"order": 1
}

Subtitles

When downloadSubtitles is enabled, the subtitles field contains:

{
"subtitles": [
{
"srtUrl": "https://api.apify.com/v2/key-value-stores/.../records/subtitles_abc_en_auto_generated",
"type": "auto_generated",
"language": "en",
"srt": "1\n00:00:0,320 --> 00:00:4,960\nEver feel like you've been chasing the wrong path?..."
}
]
}

Error items

When the scraper cannot retrieve data for a given input, it pushes an error item to the dataset instead of silently skipping it. You can identify errors by the presence of an error field.

{
"url": "https://www.youtube.com/@somechannel",
"input": "somechannel",
"error": "CHANNEL_DOES_NOT_EXIST",
"note": "Channel does not exist"
}

Error codes

Error codeMeaning
CHANNEL_DOES_NOT_EXISTChannel URL points to a channel that does not exist
NOT_FOUNDPage was not found
VIDEO_UNAVAILABLEVideo is not available (deleted, region-blocked, etc.)
AGE_RESTRICTEDVideo is age-restricted and cannot be accessed without login
CHANNEL_HAS_NO_VIDEOSChannel exists but has no uploaded videos
CHANNEL_HAS_NO_LIVE_VIDEOSChannel exists but has no live videos
CHANNEL_HAS_NO_SHORTSChannel exists but has no Shorts
DATE_FILTER_TOO_STRICTVideos exist but none match the active date filter
NO_VIDEOSNo videos found on the page
NO_RESULTSNo results collected — check that video-type limits are set above 0
NO_VALID_START_URLSAll provided start URLs were invalid or malformed
INVALID_INPUTActor failed due to bad configuration

FAQ

Can I scrape dislikes from YouTube videos? No. Dislikes are not public information and cannot be scraped.

Can I scrape subtitles from YouTube videos? Yes. Enable downloadSubtitles in the input to extract both auto-generated and user-uploaded subtitles in SRT, WebVTT, or plain text format.

Can I scrape YouTube Shorts and live streams? Yes. When scraping by search term, set maxResultsShorts and/or maxResultStreams above 0. When scraping by direct URL, Shorts and live stream URLs are automatically detected.

How to filter videos by date? When scraping by search term, use searchDateFilter. When scraping by channel URL, use oldestPostDate.

Can I integrate this scraper with other apps? Yes. The Apify platform supports integrations with Make, Zapier, Slack, Google Drive, and many more. You can also use webhooks or the Apify API.