YouTube Data Scraper: Videos, Channels, Search & Comments avatar

YouTube Data Scraper: Videos, Channels, Search & Comments

Pricing

from $2.00 / 1,000 videos

Go to Apify Store
YouTube Data Scraper: Videos, Channels, Search & Comments

YouTube Data Scraper: Videos, Channels, Search & Comments

Scrape YouTube videos, channels, playlists and search results: title, description, views, likes, comment count, channel subscribers, tags, duration, publish date, Shorts and live flags. Optional comments. $2 per 1,000 videos, $1.50 per 1,000 comments; failures are free.

Pricing

from $2.00 / 1,000 videos

Rating

0.0

(0)

Developer

LogicBase Systems

LogicBase Systems

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Features

Limited permissions

Share

Turn YouTube searches, channels, playlists and video links into one clean table: title, description, views, likes, comment count, channel subscribers, tags, category, duration, publish date, and flags for Shorts and live streams. Switch on comments to get the top or newest comments of every video as extra rows. Paste six search queries and press Start: 150 videos in 66 seconds on our test run of 16 November 2026. $0.002 per video ($2 per 1,000) and $0.0015 per comment ($1.50 per 1,000). Videos that fail are never charged.

Why choose this actor?

Stitching a video list from one tool, a comment export from another, and subscriber numbers from a third? Paying for a scraper that fails on one run in seven? Fighting with a quota-limited API key?

  • Searches, channels, playlists and single videos in one input. Mix them freely; a video found twice is returned once. Search accepts YouTube's own filters (sort by relevance, date, views or rating; uploaded in the last hour, day, week, month or year; under 4, 4 to 20 or over 20 minutes; videos only, or videos plus Shorts). A channel can be read by its Videos, Shorts or past-live-streams tab.
  • The numbers people actually ask for sit on the same row. In our runs of 16 November 2026 we fetched 855 different videos (searches, three channels, MrBeast's channel, Shorts, a playlist, live streams). Title, channel, channel id, handle and link, views, duration, publish date, category and thumbnail were filled on 100% of them; description 98%, subscribers 99%, likes 99%, comment count 95%. The gaps are real: YouTube hides the subscriber count for some channels, hides likes on a few videos, shows no comment count on live streams, and some videos have no description or tags.
  • Comments are part of the same run, charged only when you switch them on. Tick Include comments, set Max comments per video and the order (top or newest). We fetched 1,000 comments of one video in 29 seconds, all 1,000 unique, and 100 top comments each for five videos at once (the sixth video had comments turned off and returned none). Comment rows carry author, text, likes, reply count, and flags for pinned and "hearted by the creator". A video with comments turned off returns no comment rows and costs nothing extra.
  • It held up at volume. On 16 November 2026: 150/150 videos from six searches (25 each), 180/180 from three channels, 300/300 from MrBeast's channel, 61/61 from a mixed run of searches, channels, a playlist and Shorts, and 15/15 Shorts from a channel's Shorts tab. In a repeat of the six-search run at 512 MB, 1 video in 150 was refused by YouTube after several tries and came back as a free error row.
  • How it compares. The most used YouTube scraper on the Store, streamers/youtube-scraper (209,803 lifetime users, 17,977 in the last 30 days and a 4.06★ rating from 198 reviews as of 16 November 2026), is listed at $4.00 per 1,000 videos on the Free plan, and falls with higher plans (its Store card says from $2.40). Its listing sends you to a separate comments Actor, streamers/youtube-comments-scraper, listed at $2.00 per 1,000 comments on the Free plan. apidojo/youtube-scraper is cheaper, at $0.50 per 1,000 videos, but its own listing shows 85.2% of runs succeeding over the last 30 days and a 3.29★ rating from 21 reviews. We are not the cheapest. We charge one flat price at every plan level and deliver videos, subscribers and comments in one run.

Try your first run

Paste this input in the JSON tab, or keep the prefilled form and press Start. It searches YouTube for "python tutorial" and returns the five top results with full details. Searches of 15 videos took 9 and 11 seconds on our runs.

{
"searchQueries": ["python tutorial"],
"maxResults": 5
}

Runs on the Apify Free plan: sign up, open the actor, press Start. Each video lands as one row, which you can open as a table, download as CSV, Excel or JSON, or read from the API. Five videos cost $0.01. Add "includeComments": true to get the comments as well.

Copy to your AI assistant

Paste this block into Claude, ChatGPT or Cursor to give it the full picture of this scraper before you ask it to write code or plan a dataset:

You have access to the YouTube data scraper on Apify: logicbase_systems/youtube-data-scraper
It reads public YouTube pages (no login, no API key). Rows: type "video" (one per video), type "comment" (one per comment, only when includeComments is true) and type "error" (free).
Input (all optional; an empty run falls back to one sample video for Apify's daily test):
- searchQueries (array of strings): YouTube searches, one per entry. Example: ["python tutorial", "best budget laptop"]
- videoUrls (array of strings): watch, youtu.be, shorts, embed, live links or 11-character IDs.
- channelUrls (array of strings): https://www.youtube.com/@3blue1brown, /channel/UC..., or just "@3blue1brown". Newest first.
- playlistUrls (array of strings): playlist links (contain list=PL...).
- maxResults (integer, default 10, max 5000): videos taken from each search, channel or playlist.
- maxVideosTotal (integer, optional): hard cap across the whole run.
- searchSort ("relevance" | "date" | "views" | "rating", default "relevance"), uploadDate ("any" | "hour" | "today" | "week" | "month" | "year"), videoDuration ("any" | "short" under 4 min | "medium" 4-20 min | "long" over 20 min), searchContentType ("video" | "any" = videos and Shorts). These apply to searches only.
- channelTab ("videos" | "shorts" | "streams", default "videos"), channelSort ("newest" | "popular" = most viewed among the 500 newest videos).
- includeComments (boolean, default false), maxComments (integer, default 20, per video), commentSort ("top" | "newest", default "top").
- maxConcurrency (integer, default 5), proxyStrategy ("auto" | "residential" | "datacenter" | "none", default "auto").
Output, type "video": id, url, title, description, channelName, channelId, channelUrl, channelHandle, channelSubscribers (rounded by YouTube), channelSubscribersText, viewCount, likeCount, commentCount, commentCountText, commentCountIsExact, commentsDisabled, durationSeconds, duration, publishDate (ISO 8601), uploadDate, tags[], category, thumbnailUrl, thumbnails[], isShort, isLive, isLiveContent, isUpcoming, isFamilySafe, isUnlisted, liveStartedAt, liveEndedAt, source {type: "search"|"video"|"channel"|"playlist", url|query, rank}.
Output, type "comment": commentId, text, author, authorChannelId, authorChannelUrl, authorThumbnail, authorIsChannelOwner, authorIsVerified, likeCount (rounded above 1,000), likeCountText, likeCountIsExact, replyCount, isPinned, isHearted, isEdited, publishedTimeText ("3 days ago"), position, sort, videoId, videoUrl, videoTitle.
Output, type "error": id, url, source, error {code, message}. Codes: VIDEO_UNAVAILABLE, PRIVATE_VIDEO, AGE_RESTRICTED, MEMBERS_ONLY, INVALID_URL, SOURCE_NOT_FOUND, BLOCKED, RATE_LIMITED, NETWORK_ERROR, YOUTUBE_ERROR. Errors are never charged.
Absent values are null. Rows are written as videos finish, so use source.rank for input order. No transcripts, no replies to comments, no dislikes.
Use apify-client for Python or JavaScript: client.actor("logicbase_systems/youtube-data-scraper").call(run_input=...)

How to scrape YouTube data

Each input below runs as it is.

Search YouTube and get stats for the top results

{
"searchQueries": ["iphone review"],
"maxResults": 15,
"searchSort": "date",
"uploadDate": "week",
"videoDuration": "medium"
}

Returns the 15 newest videos of the past week that are 4 to 20 minutes long. On our run of 16 November 2026 all 15 videos were from 9 to 15 November and between 342 and 1,169 seconds long. Add more queries to the list; each is searched separately.

Read a channel's latest videos, Shorts or streams

{
"channelUrls": ["@Fireship", "https://www.youtube.com/@3blue1brown"],
"maxResults": 20,
"channelTab": "videos"
}

@handle, /@handle links and /channel/UC... links all work. Set channelTab to "shorts" or "streams". On 16 November 2026 the Shorts tab of MrBeast returned 15 of 15 videos, all flagged isShort: true. Set "channelSort": "popular" to get the most viewed videos among the channel's 500 newest.

Get the comments of videos

{
"videoUrls": [
"https://www.youtube.com/watch?v=aircAruvnKk",
"https://youtu.be/dQw4w9WgXcQ"
],
"includeComments": true,
"maxComments": 100,
"commentSort": "top"
}

Each video row is followed by up to 100 comment rows, tagged type: "comment" and carrying videoId, so you can join them. With comments switched on, commentCount on the video row is the exact number YouTube shows (9,537 for the 3Blue1Brown video on 16 November 2026). Without comments it is the rounded number YouTube prints (for example 9.5K).

Check a list of videos

{
"videoUrls": [
"https://www.youtube.com/watch?v=aircAruvnKk",
"https://www.youtube.com/shorts/sHpEqeSByPI",
"dQw4w9WgXcQ"
]
}

Watch links, youtu.be links, Shorts, embed and live links and bare 11-character IDs all work. A made-up ID or a deleted video comes back as a free type: "error" row.

Input parameters

FieldTypeDefaultWhat it does
searchQueriesarray of stringsnoneYouTube searches, one per line.
videoUrlsarray of stringsnone (form prefills one sample video)Video links or 11-character IDs.
channelUrlsarray of stringsnoneChannel links or @handles.
playlistUrlsarray of stringsnonePlaylist links.
maxResultsinteger10Videos per search, channel or playlist (1 to 5,000).
maxVideosTotalintegernoneHard cap on videos for the whole run.
searchSortstringrelevancerelevance, date, views or rating.
uploadDatestringanyhour, today, week, month, year.
videoDurationstringanyshort (under 4 min), medium (4 to 20 min), long (over 20 min).
searchContentTypestringvideovideo or any (videos and Shorts mixed, as YouTube shows them).
channelTabstringvideosvideos, shorts or streams.
channelSortstringnewestnewest, or popular (most viewed of the 500 newest).
includeCommentsbooleanfalseAlso return comments as extra rows. Charged per comment.
maxCommentsinteger20Top-level comments per video.
commentSortstringtoptop or newest.
maxConcurrencyinteger5Videos fetched at the same time.
proxyStrategystringautoauto (recommended), residential, datacenter or none.

No field is required. If every list is left empty (for example Apify's daily automatic test), the actor runs one sample video so the run succeeds. The form's prefilled video is only a prefill; the API never adds it to your input.

Output fields

Three row types share one dataset. Filter on type: video, comment or error. The dataset has four ready-made views (videos overview, channels, comments, descriptions and tags).

Video rows

FieldDescription
id, urlThe video.
title, descriptionAs shown on YouTube.
channelName, channelId, channelUrl, channelHandleThe channel.
channelSubscribers, channelSubscribersTextSubscribers. YouTube rounds this (8.76M becomes 8760000), and some channels hide it (null).
viewCount, likeCountExact numbers at run time. likeCount is null when the video hides likes.
commentCount, commentCountText, commentCountIsExactExact when comments were fetched, otherwise YouTube's rounded figure (below 1,000 it is exact). null on live streams and when comments are off.
commentsDisabledtrue when the video has comments turned off, false when comments were fetched, null when unknown.
durationSeconds, durationLength (0 for a stream that is live now).
publishDate, uploadDateISO 8601 date and time.
tags, category, thumbnailUrl, thumbnailsTags can be empty: many videos have none.
isShorttrue when YouTube treats the video as a Short (vertical, up to 3 minutes).
isLive, isLiveContent, isUpcoming, liveStartedAt, liveEndedAtLive stream flags and times.
isFamilySafe, isUnlistedAs reported by YouTube.
source{type, url or query, rank}: which input found it and at what position.

Comment rows

FieldDescription
commentId, text, position, sortThe comment, its position in the fetch, and the order used.
author, authorChannelId, authorChannelUrl, authorThumbnail, authorIsChannelOwner, authorIsVerifiedWho wrote it.
likeCount, likeCountText, likeCountIsExactYouTube rounds likes above 1,000 (1.8K becomes 1800).
replyCountNumber of replies. The replies themselves are not returned.
isPinned, isHearted, isEditedPinned by the creator, hearted by the creator, edited.
publishedTimeTextYouTube's relative time ("3 days ago"). It gives no exact timestamp.
videoId, videoUrl, videoTitleThe video the comment belongs to.

Good to know

  • Public data only, no login. Age-restricted, private and members-only videos come back as free error rows.
  • No transcripts, no replies, no dislikes. For transcripts use YouTube Transcript Scraper. Reply counts are included, reply text is not.
  • Some numbers are rounded by YouTube itself: channel subscribers, the comment count when comments are not fetched, and comment likes above 1,000. Each has a text field and an ...IsExact flag so you can tell.
  • Results are written as videos finish, not in input order. Use source.rank to restore the order.
  • English text, US view. The actor asks YouTube for English pages as seen from the United States, so search results and relative times ("3 days ago") are in English.
  • Proxies. YouTube's bot check often blocks Apify's data-center proxy (in a 300-video run, 8.2 MB of the 9.0 MB ended up on the residential proxy), so auto retries blocked requests on a residential proxy. You never pay for proxy traffic yourself.
  • Popular channel order is the most viewed among the channel's 500 newest videos, not all-time.
  • YouTube changes its pages from time to time. If a run starts failing broadly, please report it in the Issues tab with a run link.
  • Check that your use of the data complies with YouTube's terms. This actor only reads public information.

Example output

From our run of 16 November 2026 on https://www.youtube.com/watch?v=aircAruvnKk with comments on (description shortened):

{
"type": "video",
"id": "aircAruvnKk",
"url": "https://www.youtube.com/watch?v=aircAruvnKk",
"title": "But what is a neural network? | Deep learning chapter 1",
"description": "What are the neurons, why are there layers, and what is the math underlying it?\nHelp fund future projects: https://www.patreon.com/3blue1brown\n…",
"channelName": "3Blue1Brown",
"channelId": "UCYO_jab_esuFRV4b17AJtAw",
"channelUrl": "https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw",
"channelHandle": "@3blue1brown",
"channelSubscribers": 8760000,
"channelSubscribersText": "8.76M subscribers",
"viewCount": 25280925,
"likeCount": 570634,
"commentCount": 9537,
"commentCountText": "9,537",
"commentCountIsExact": true,
"commentsDisabled": false,
"durationSeconds": 1120,
"duration": "18:40",
"publishDate": "2017-10-05T08:11:25-07:00",
"tags": [],
"category": "Education",
"thumbnailUrl": "https://i.ytimg.com/vi/aircAruvnKk/maxresdefault.jpg",
"isShort": false,
"isLive": false,
"isUpcoming": false,
"source": { "type": "video", "url": "aircAruvnKk" },
"error": null
}

And the first comment row of the same run (text shortened):

{
"type": "comment",
"commentId": "Ugwedfi--9yZVC0eefl4AaABAg",
"text": "I study mathematics, physics and architecture. By definition this man is an ORACLE in the strict meaning of the word. …",
"author": "@kummer45",
"authorChannelId": "UCqArZkt3NAOU0tcgIi6xmFQ",
"authorIsChannelOwner": false,
"likeCount": 14000,
"likeCountText": "14K",
"likeCountIsExact": false,
"replyCount": 175,
"isPinned": false,
"isHearted": false,
"isEdited": true,
"publishedTimeText": "7 years ago",
"position": 1,
"sort": "top",
"videoId": "aircAruvnKk",
"videoUrl": "https://www.youtube.com/watch?v=aircAruvnKk",
"videoTitle": "But what is a neural network? | Deep learning chapter 1"
}

Advanced usage

Track a competitor's channel every morning

{
"channelUrls": ["@Fireship"],
"maxResults": 10,
"channelTab": "videos"
}

Schedule this input daily from the actor's Schedules tab. Compare two runs on id to see new videos, and compare viewCount and likeCount over time to see which ones are taking off.

Find what is working on a topic

{
"searchQueries": ["how to learn guitar", "react tutorial"],
"maxResults": 25,
"searchSort": "views",
"uploadDate": "year"
}

Sort by views within the past year and read title, tags, channelSubscribers and viewCount side by side. Videos with many views from small channels are the ones worth studying.

Pull the data from Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("logicbase_systems/youtube-data-scraper").call(run_input={
"searchQueries": ["python tutorial"],
"maxResults": 5,
"includeComments": True,
"maxComments": 10,
})
for row in client.dataset(run.default_dataset_id).iterate_items():
if row["type"] == "video":
print(row["title"], row["viewCount"], row["likeCount"], row["commentCount"])
elif row["type"] == "comment":
print(" ", row["author"], row["text"][:60])

The same actor works from the JavaScript client, the REST API, n8n, Make, Zapier, and the Apify MCP server (for example https://mcp.apify.com?tools=logicbase_systems/youtube-data-scraper).

Pricing

Pay per event: $0.002 per video returned ($2 per 1,000) and $0.0015 per comment returned ($1.50 per 1,000). There is also Apify's standard Actor-start event of $0.00005 per run.

  • Videos that fail or do not exist, and every error row, are not charged.
  • Comments are only fetched, and only charged, when Include comments is on. A video with comments off adds nothing.
  • The price is the same on every Apify plan.
  • Proxy and compute costs are included in the price. You never pay for proxy traffic yourself.
  • To cap spending, set a maximum cost per run in the run options, or use Max videos in total. The actor stops when the limit is reached; on our test with a $0.05 cap it stopped at 1 video and 31 comments.

FAQ

Do I need a YouTube API key? No. The actor reads public YouTube pages and has no quota.

Can I scrape a whole channel? Yes. Add the channel and set Max videos per query, channel or playlist (up to 5,000). Choose Videos, Shorts or Past live streams.

Can I filter search results by date or length? Yes: sort by relevance, date, views or rating; uploaded in the last hour, day, week, month or year; under 4, 4 to 20 or over 20 minutes. Videos only, or videos plus Shorts.

How many comments can I get per video? Set Max comments per video as high as you like. We fetched 1,000 from one video in 29 seconds. Only top-level comments are returned; replies are not.

Are the comment, like and subscriber numbers exact? View counts and video likes are exact. Subscribers and comment likes above 1,000 are rounded by YouTube; the comment count is exact when comments are fetched. Every rounded number has a text field and an ...IsExact flag.

Why do some videos have a null comment count? Live streams and videos with comments turned off have none. Those rows also set commentsDisabled when we could tell.

Does it work with Shorts? Yes. Shorts links work like normal video links, a channel's Shorts tab is supported, and isShort tells them apart.

Can it return transcripts? No. Use YouTube Transcript Scraper for captions and subtitles.

Why did a video return an error row? Check error.code and error.message. Error rows are free. BLOCKED, RATE_LIMITED or NETWORK_ERROR after several retries usually means YouTube refused the request; run those videos again later or lower Parallel videos.

How do I try it for a fraction of a cent? Press Try for free on this page. New Apify accounts include free monthly platform credit; a first run on five videos costs $0.01.

Is scraping YouTube allowed? The actor only reads public information without logging in. You are responsible for using the data in line with YouTube's terms, the rights of the videos' owners and your local law.

It stopped working. What now? Open an issue on this actor's page with a run link. We monitor runs daily.

More Logicbase Systems scrapers

  • YouTube Transcript Scraper: transcripts and subtitles for videos, playlists and channels, with title, channel, date and views. Pair it with this actor: find videos here, then pull their transcripts there.
  • Google Trends Scraper: interest over time, related queries, regions, comparisons and trending now. Check whether a topic is growing before you pick which YouTube videos to study.