YouTube Search Scraper — Videos, Channels & Playlists avatar

YouTube Search Scraper — Videos, Channels & Playlists

Pricing

from $3.00 / 1,000 search results

Go to Apify Store
YouTube Search Scraper — Videos, Channels & Playlists

YouTube Search Scraper — Videos, Channels & Playlists

Scrape YouTube search results (videos, channels, playlists, movies) without cookies or the API. Title, channel, views, duration, publish date, thumbnails. Full filter support. HTTP + residential proxy primary, SerpApi last-resort fallback. MCP-ready.

Pricing

from $3.00 / 1,000 search results

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Share

YouTube Search Scraper — Videos, Channels, Playlists & Filters

Scrape YouTube search results at scale without cookies, login, or the rate-limited official Data API. Type one or more search queries, get back clean, structured JSON for every video, channel, playlist, and movie — with title, channel, view count, duration, publish date, thumbnails, and description.

This actor runs a direct HTTP scrape over residential proxies as its primary engine (fast and cheap), and automatically falls back to SerpApi only when YouTube blocks every retry — so a single hard block never turns into an empty run. The result is near-100% uptime without paying SerpApi prices on every request.

When to use it

  • Content & SEO research — find what ranks for a topic, the channels behind it, and how old the top results are.
  • Competitive monitoring — track which videos surface for your brand or product keywords.
  • Market & trend analysis — pull view counts and upload recency across hundreds of queries.
  • Lead and creator discovery — surface channels and their metadata for outreach.
  • AI agents (MCP) — narrow query in, structured JSON out, predictable per-result price.

Not the right tool for: a single video's comments (use youtube-comments-scraper), transcripts (youtube-transcript-extractor), Shorts feeds (youtube-shorts-scraper), or channel email extraction (youtube-channel-email-extractor).

Output

One flat record per result. Example (video):

{
"type": "video",
"query": "how to bake sourdough",
"source": "youtube",
"position": 1,
"videoId": "dQw4w9WgXcQ",
"title": "Beginner Sourdough Bread Recipe",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"channelName": "The Bread Code",
"channelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
"channelUrl": "https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx",
"viewCount": 1200000,
"viewCountText": "1.2M views",
"publishedTimeText": "2 years ago",
"durationText": "12:34",
"durationSeconds": 754,
"thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hq720.jpg",
"description": "The simplest no-knead sourdough loaf...",
"isLive": false,
"isVerified": true,
"badges": ["CC"],
"subscriberCountText": null,
"videoCountText": null,
"playlistVideoCount": null,
"scrapedAt": "2026-05-30T12:00:00.000Z"
}

Channel and playlist records use the same shape, filling subscriberCountText / videoCountText / playlistVideoCount and leaving video-only fields null. The source field tells you whether a record came from the direct scrape (youtube) or the fallback (serpapi).

FieldTypeNotes
typestringvideo, channel, playlist, or movie
querystringThe search query that produced this result
sourcestringyoutube (direct) or serpapi (fallback)
positioninteger1-based rank within the query
videoId / playlistId / channelIdstring|nullYouTube IDs
title, urlstring|nullResult title and canonical URL
channelName, channelUrlstring|nullOwning channel
viewCount, viewCountTextinteger / string|nullParsed and raw views
publishedTimeTextstring|nulle.g. "2 years ago"
durationText, durationSecondsstring / integer|nullLength
thumbnailUrl, descriptionstring|nullHighest-res thumbnail, snippet
isLive, isVerifiedbooleanLive broadcast / verified channel
subscriberCountText, videoCountText, playlistVideoCountChannel/playlist fields
scrapedAtstringISO 8601 timestamp

Pricing

Pay-per-event, no monthly fee:

  • $0.003 per result returned to the dataset.
  • $0.00005 actor start (per run, scaled by RAM).
  • $0.01 per SerpApi fallback query — charged only when a query falls back to the managed SerpApi engine. If you bring your own SerpApi key, this fee is never charged.

A typical run of 50 results costs about $0.15. The actor prints the maximum possible cost in the log and status message before charging anything, and a hard guard prevents it from ever billing past your maxResultsPerQuery.

Input

FieldTypeDefaultDescription
searchQueriesstring[]— (required)One or more search terms
maxResultsPerQueryinteger50Cap per query (1–2000)
resultTypeenumallall / video / channel / playlist / movie
sortByenumrelevancerelevance / uploadDate / viewCount / rating
uploadDateenumanylastHour / today / thisWeek / thisMonth / thisYear
durationenumanyshort (<4m) / medium (4–20m) / long (>20m)
featuresstring[][]live, fourK, hd, subtitles, creativeCommons, threeSixty, vr180, threeD, hdr, location, purchased
countrystringUSgl geo + proxy country
languagestringenhl interface/content language
rawSpTokenstring""Advanced: paste a raw sp filter token to override the structured filters
serpApiKeystring (secret)""Your SerpApi key — makes fallback free of the managed fee
fallbackModeenumautoauto (direct first, SerpApi last resort) / never / always
proxyConfigurationobjectresidentialResidential proxies recommended

Example input

{
"searchQueries": ["lofi hip hop", "react tutorial 2025"],
"maxResultsPerQuery": 100,
"resultType": "video",
"sortBy": "viewCount",
"uploadDate": "thisYear",
"duration": "medium",
"country": "US",
"language": "en"
}

How the dual engine works

  1. Direct HTTP (primary). The actor requests YouTube's results page over a residential proxy, parses the embedded ytInitialData, and paginates using YouTube's internal continuation API. Full filter support is rebuilt locally into YouTube's own sp token, so any combination of sort, type, upload-date, duration, and feature filters works — exactly as if you set them in the YouTube UI.
  2. Session escalation. If a request hits a consent wall, a 429, or a 403, the actor retires that proxy session and retries with a fresh one (several attempts).
  3. SerpApi fallback (last resort). Only after direct attempts are exhausted, and only when fallbackMode allows it, the query is re-run through SerpApi's YouTube engine. Set fallbackMode: "always" to skip direct scraping entirely, or "never" to fail honestly instead of falling back.

If every query is blocked and nothing is collected, the run fails honestly with a clear message rather than reporting a misleading success with an empty dataset.

Use via the API / MCP

The actor is MCP-ready: a narrow query input, a flat structured output under ~500 tokens per item, and a predictable per-result price. Point any MCP client at https://mcp.apify.com?tools=khadinakbar/youtube-search-scraper and the agent can search YouTube directly.

FAQ

Do I need a SerpApi key? No. It is only used as a last-resort fallback. Without one, the actor still scrapes directly; if YouTube blocks every retry, the run fails honestly instead of falling back.

Why residential proxies? YouTube reliably blocks datacenter IPs. Residential proxies are enabled by default and strongly recommended.

Can I sort by date or views? Yes, via sortBy. Note YouTube only applies sort reliably on the first page; deep pagination drifts back toward relevance — a YouTube behavior, not an actor limitation.

How many results per query? Up to 2000. YouTube itself stops returning more after a few hundred for most queries.


This actor extracts publicly available data from YouTube search result pages. You are responsible for using the data in compliance with YouTube's Terms of Service, applicable laws (including copyright and data-protection regulations such as GDPR/CCPA), and for not collecting personal data without a lawful basis. This actor is not affiliated with, endorsed by, or sponsored by YouTube or Google.