YouTube Search Scraper — Videos, Channels & Playlists
Pricing
from $3.00 / 1,000 search results
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
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).
| Field | Type | Notes |
|---|---|---|
type | string | video, channel, playlist, or movie |
query | string | The search query that produced this result |
source | string | youtube (direct) or serpapi (fallback) |
position | integer | 1-based rank within the query |
videoId / playlistId / channelId | string|null | YouTube IDs |
title, url | string|null | Result title and canonical URL |
channelName, channelUrl | string|null | Owning channel |
viewCount, viewCountText | integer / string|null | Parsed and raw views |
publishedTimeText | string|null | e.g. "2 years ago" |
durationText, durationSeconds | string / integer|null | Length |
thumbnailUrl, description | string|null | Highest-res thumbnail, snippet |
isLive, isVerified | boolean | Live broadcast / verified channel |
subscriberCountText, videoCountText, playlistVideoCount | — | Channel/playlist fields |
scrapedAt | string | ISO 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
| Field | Type | Default | Description |
|---|---|---|---|
searchQueries | string[] | — (required) | One or more search terms |
maxResultsPerQuery | integer | 50 | Cap per query (1–2000) |
resultType | enum | all | all / video / channel / playlist / movie |
sortBy | enum | relevance | relevance / uploadDate / viewCount / rating |
uploadDate | enum | any | lastHour / today / thisWeek / thisMonth / thisYear |
duration | enum | any | short (<4m) / medium (4–20m) / long (>20m) |
features | string[] | [] | live, fourK, hd, subtitles, creativeCommons, threeSixty, vr180, threeD, hdr, location, purchased |
country | string | US | gl geo + proxy country |
language | string | en | hl interface/content language |
rawSpToken | string | "" | Advanced: paste a raw sp filter token to override the structured filters |
serpApiKey | string (secret) | "" | Your SerpApi key — makes fallback free of the managed fee |
fallbackMode | enum | auto | auto (direct first, SerpApi last resort) / never / always |
proxyConfiguration | object | residential | Residential 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
- 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 ownsptoken, so any combination of sort, type, upload-date, duration, and feature filters works — exactly as if you set them in the YouTube UI. - 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).
- SerpApi fallback (last resort). Only after direct attempts are exhausted, and only when
fallbackModeallows it, the query is re-run through SerpApi's YouTube engine. SetfallbackMode: "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.
Related actors
- YouTube Comments Scraper — Pull comments from videos surfaced by this search
- YouTube Shorts Scraper — Views, Likes & Viral Score — Drill into short-form metrics
- YouTube Transcript Scraper — Bulk, Channel & Search — Bulk transcripts from search results
- YouTube Channel Email Extractor — Outreach to channels you discover
- Google Trends Scraper — Pair search results with trend data
Legal
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.