YouTube Scraper - Search, Videos, Channels & Comments avatar

YouTube Scraper - Search, Videos, Channels & Comments

Pricing

$0.25 / 1,000 results

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

YouTube Scraper - Search, Videos, Channels & Comments

Search, videos, channels & comments in one Actor. No Google API key, no daily quota - just $0.25 per 1,000 results.

Pricing

$0.25 / 1,000 results

Rating

5.0

(1)

Developer

Smart API

Smart API

Maintained by Community

Actor stats

1

Bookmarked

49

Total users

49

Monthly active users

5 days ago

Last modified

Share

YouTube Scraper — Search, Videos, Channels & Comments

Search, videos, channels & comments in one Actor. No Google API key, no daily quota — just $0.25 per 1,000 results.

Scrape YouTube search results, video details, channel stats and comments as clean, structured data. Paste YouTube links or keywords — no Google API key, no daily quota. One Actor covers seven common tasks: pick a task, fill one box, hit Start.

  • $0.25 per 1,000 results — pay only for rows you actually get
  • No Google API key, no daily quota — nothing to set up
  • Paste links, not IDs — full watch?v=, youtu.be/, /shorts/, @handle and /channel/UC… URLs all work
  • Pagination handled for you — just say how many results you want
  • Flat rows that export straight to CSV, Excel, Google Sheets or JSON
  • Works from the UI and from the API — same input either way

What can it do?

TaskWhat you give itWhat you get back
🔍 Search videosKeywordsMatching videos with title, channel, publish date, thumbnail
🔍 Search channelsKeywordsMatching channels with title, description, thumbnail
🎬 Video detailsVideo URLs or IDsViews, likes, comment count, duration, tags, category, captions
📺 Channel detailsChannel URLs, @handles or IDsSubscribers, total views, video count, country, handle
📺 Channel videosChannel URLs, @handles or IDsThe channel's uploads, newest first
💬 Video commentsVideo URLs or IDsTop-level comments + author, likes, date (replies optional)
💬 Comment repliesComment IDsAll replies to those comments

Quick start (UI)

  1. Choose a task in “What do you want to get?”.
  2. Fill in only the box that belongs to it — each box says which task it is for:
    • Search keywords → for the two search tasks
    • Videos (URLs or IDs) → for video details and video comments
    • Channels (URLs, handles or IDs) → for channel details and channel videos
    • Comment IDs → for comment replies
  3. Optionally set Max results per input, a country, a date range or a sort order.
  4. Click Start. Results appear on the Storage → Dataset tab, ready to export.

Every box comes pre-filled with a working example, so you can switch the task dropdown and hit Start straight away to see what each one returns.


Examples

Search for videos

{
"operation": "search_videos",
"queries": ["coke studio", "lofi hip hop"],
"order": "viewCount",
"regionCode": "IN",
"maxItems": 100
}

Get details for a few videos

{
"operation": "video_details",
"videos": [
"https://www.youtube.com/watch?v=4zTFzMPWGLs",
"https://youtu.be/dQw4w9WgXcQ",
"https://www.youtube.com/shorts/-2Wqk2ncV7c"
]
}

Get channel stats from a handle

{
"operation": "channel_details",
"channels": ["https://www.youtube.com/@MrBeast", "@mkbhd"]
}

List a channel's newest uploads

{
"operation": "channel_videos",
"channels": ["UCu59yAFE8fM0sVNTipR4edw"],
"order": "date",
"publishedAfter": "2025-01-01",
"maxItems": 200
}

Scrape comments (with replies)

{
"operation": "comment_threads",
"videos": ["https://www.youtube.com/watch?v=32mJgqhnbGY"],
"commentOrder": "relevance",
"includeReplies": true,
"maxRepliesPerComment": 50,
"maxItems": 500
}

Output

Rows are flat and consistent, so CSV and Sheets exports just work.

Videos (search / channel videos)

{
"videoId": "5Eqb_-j3FDA",
"title": "Pasoori | Coke Studio Season 14",
"url": "https://www.youtube.com/watch?v=5Eqb_-j3FDA",
"publishedAt": "2022-02-07T13:30:11Z",
"channelTitle": "Coke Studio Pakistan",
"channelId": "UCM1VesJtJ9vTXcMLLr_FfdQ",
"channelUrl": "https://www.youtube.com/channel/UCM1VesJtJ9vTXcMLLr_FfdQ",
"description": "Let's transcend boundaries…",
"thumbnailUrl": "https://i.ytimg.com/vi/5Eqb_-j3FDA/hqdefault.jpg",
"liveBroadcastContent": "none",
"searchQuery": "coke studio"
}

Video details adds viewCount, likeCount, commentCount, duration, durationSeconds, tags, categoryId, topicCategories, definition, hasCaptions, privacyStatus, madeForKids, defaultAudioLanguage.

Channel details

{
"channelId": "UCFFbwnve3yF62-tVXkTyHqg",
"title": "Zee Music Company",
"handle": "@zeemusiccompany",
"url": "https://www.youtube.com/@zeemusiccompany",
"subscriberCount": 122000000,
"viewCount": 89211450788,
"videoCount": 16576,
"publishedAt": "2014-03-12T11:59:25Z",
"country": "IN",
"uploadsPlaylistId": "UUFFbwnve3yF62-tVXkTyHqg"
}

Comments

{
"commentId": "UgwOSGaPuVONHxyrtxV4AaABAg",
"text": "does he speak Kannada ?",
"authorDisplayName": "@prashanthalex7702",
"likeCount": 12,
"publishedAt": "2025-03-18T23:26:33Z",
"isReply": false,
"parentId": null,
"totalReplyCount": 1,
"videoId": "32mJgqhnbGY",
"videoUrl": "https://www.youtube.com/watch?v=32mJgqhnbGY",
"authorChannelId": "UCWS904BG8MIrnbCMj8qiNfQ"
}

Replies come as extra rows with isReply: true and parentId set to the comment they belong to.

Counts are real numbers (not strings), so you can sort and total them right away. Need the untouched nested objects instead? Turn on Raw output (advanced).


Using it from the API

Run the Actor and get results in one call:

curl -X POST "https://api.apify.com/v2/acts/trysmartapi~youtube-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"operation": "search_videos",
"queries": ["coke studio"],
"maxItems": 50
}'

Same thing in JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('trysmartapi/youtube-scraper').call({
operation: 'comment_threads',
videos: ['https://www.youtube.com/watch?v=32mJgqhnbGY'],
maxItems: 200,
includeReplies: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

And in Python:

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("trysmartapi/youtube-scraper").call(run_input={
"operation": "channel_details",
"channels": ["@MrBeast", "@mkbhd"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

Input reference

FieldTypeUsed byNotes
operationstringallsearch_videos, search_channels, video_details, channel_details, channel_videos, comment_threads, comment_replies
queriesstring[]search tasksOne keyword per entry; each is searched separately
videosstring[]video_details, comment_threadsVideo URLs or 11-char IDs
channelsstring[]channel_details, channel_videosChannel URLs, @handles or UC… IDs
commentIdsstring[]comment_repliesComment IDs from a comments run
maxItemsintegerlisting tasksCap per keyword / video / channel. Default 100
includeRepliesbooleancomment_threadsAdds reply rows. Default false
maxRepliesPerCommentintegercomment_threadsDefault 50
commentOrderstringcomment_threadstime (newest) or relevance
orderstringsearch / channel videosrelevance, date, viewCount, rating, title. Use date on channels for full history
videoDurationstringvideo listingsany, short (<4 m), medium (4–20 m), long (>20 m)
regionCodestringlistingsISO country code, e.g. US, IN, GB
videoCategoryIdstringvideo listingse.g. 10 Music, 20 Gaming, 24 Entertainment
publishedAfter / publishedBeforestringlistingsYYYY-MM-DD or full ISO date-time
eventTypestringsearch_videosany, live, upcoming, completed
rawOutputbooleanallReturn nested API objects instead of flat rows
startTokenstringlistingsResume a previous run (single input item only)

Notes & tips

  • maxItems is per input. Three keywords with maxItems: 100 returns up to 300 rows.
  • Resuming a run: each run stores a nextToken per input in its key-value store under OUTPUT. Paste one into startToken to continue from the next page.
  • Video and channel details are batched — asking for 200 videos costs a handful of requests, not 200.
  • Channel videos walks the full upload history. YouTube's channel listing only exposes the newest ~15 uploads, so the Actor slices the request into one-year windows and pages through each, newest year first. Set maxItems as high as you need. Sorting by anything other than "Newest first" uses the plain listing instead and returns far fewer videos — use "Newest first" when you want depth.
  • Private, deleted or region-blocked items are skipped and reported as run-log warnings.
  • @handles are resolved automatically to channel IDs, which costs one extra lookup. Pass UC… IDs directly if you already have them.
  • Comment counts on a video can be larger than what is fetchable — YouTube hides some comments and disables them entirely on some videos.

Pricing

$0.25 per 1,000 results — charged per row written to the dataset, nothing else. No monthly fee, no minimum, no charge for rows you don't receive.

You scrapeYou pay
100 results$0.03
1,000 results$0.25
10,000 results$2.50
100,000 results$25.00

Both a comment and a video row count as one result. Use Max results per input to keep any run inside a budget you choose.


This Actor retrieves publicly available YouTube data only. It does not access private data or bypass any login. You are responsible for using the collected data in line with YouTube's terms and applicable law (including GDPR when handling personal data such as comment author names).