YouTube Search Scraper - Videos, Shorts & Channels
Eimantas V · @amethyst
Scrape YouTube search results: videos, Shorts, channels and playlists with exact views, likes, dates and tags. Every filter, date ranges, deep search. No login.

About
YouTube Search Scraper turns YouTube search results into data: videos, Shorts, channels, playlists and movies for any keyword, with exact views, likes, publish dates, tags, chapters and channel subscribers. Enter search terms, or paste YouTube search links, hashtags, playlists or a search inside a channel. No login, no API key, no browser.
{
"type": "video",
"id": "YrVRx2c72ig",
"url": "https://www.youtube.com/watch?v=YrVRx2c72ig",
"title": "Python Web Scraping Tutorial: Complete Guide 2026",
"channelName": "Oxylabs",
"channelHandle": "@oxylabs",
"channelSubscriberCount": 14800,
"viewCount": 8247,
"likeCount": 555,
"commentCount": 3,
"publishedAt": "2026-02-20T17:01:02.000Z",
"durationSeconds": 481,
"position": 7,
"input": "web scraping tutorial",
"keywords": ["web scraping in python", "python web scraping", "web scraping python", "oxylabs"],
"category": "Science & Technology",
"hashtags": ["#WebScraping", "#Python", "#BeautifulSoup"],
"chapters": [{ "title": "Intro", "startSeconds": 0 }, { "title": "Environment & tools setup", "startSeconds": 35 }],
"viewsPerDay": 37,
"likesPerThousandViews": 67.3
}
Measured: 100 videos with full details in 10 seconds; 150 results for three search terms in 24 seconds.
What does YouTube Search Scraper do?
It runs YouTube's own search, the way the search bar and its Filters menu do, and turns every result into a row, in YouTube's order. Then it checks YouTube's work: results that slip through a filter, repeats across pages and anything outside your own filters are dropped before they reach your dataset.
- Every YouTube filter. Type (videos, Shorts, channels, playlists, movies), upload date, length, live, 4K, HD, subtitles, Creative Commons, 360°, VR180, 3D, HDR and location, plus YouTube's "last hour" and older length options that still work. Hashtag, channel-search and playlist feeds take no YouTube filters; upload date and length are applied to their rows by the Actor.
- Filters YouTube does not have. Exact date ranges, view and length ranges, excluded words (YouTube ignores "-word"), excluded channels, minimum subscribers and a cap per channel.
- Sorts that work. YouTube removed sorting by upload date. This Actor sorts newest first and by exact views itself.
- More than YouTube shows. YouTube ends every search after roughly 200-500 results. Deep search repeats a search in date windows to go further: 3,000 unique videos for one keyword in our test.
- Complete rows. Exact views, likes, publish date, tags, category, full description with links, hashtags, chapters and the channel's subscribers, on every video and Short. Optional exact comment counts and channel details (country, total views, joined date, links, business-email flag).
- More ways in. Hashtag feeds, playlists, a search inside one channel, and single video links, in the same run.
- Clean results. Repeats within a search and filtered-out results are dropped, and a search with no results returns an error row instead of failing the run. Turn on Remove duplicates across searches to get each result once across search terms.
- Built for automation. Run it on a schedule, call it from the API, or connect an AI agent through the Bytewells MCP server.
Why it is fast and cheap
The Actor calls the same internal JSON endpoints youtube.com's own pages use. One request returns a page of about 20 results (25-50 KB); the details for a video are two small requests (its player data and its watch-page data). There is no browser and no HTML to render, so a run needs little memory and no proxy, which keeps its compute cost low.
What data can you extract from YouTube?
| Field | Example | What it is |
|---|---|---|
type | video | video, short, channel, playlist (also mixes, courses, albums), movie or post |
title, url, id | Python Full Course for Beginners | The result itself, with a clean link |
viewCount, likeCount, commentCount | 49216902, 1293847, 41862 | Exact views and likes; comments rounded by YouTube unless you ask for exact |
publishedAt | 2019-02-18T15:00:08.000Z | Exact publish time (see publishedAtPrecision) |
durationSeconds | 22447 | Length, also for Shorts |
channelName, channelHandle, channelId | Programming with Mosh, @programmingwithmosh | Who uploaded it |
channelSubscriberCount | 4200000 | The channel's subscribers, as YouTube rounds them |
keywords, category, hashtags | ["python", "tutorial"], Education | Tags the uploader set, YouTube category, hashtags |
description, descriptionLinks | Learn Python…, ["https://…"] | Full description and every link in it |
chapters | [{ "title": "Introduction", "startSeconds": 0 }] | Chapters and their start times |
position | 3 | Rank in YouTube's results for your search |
viewsPerDay, likesPerThousandViews | 1203, 26.3 | Ratios that compare videos of different ages and sizes |
badges, isLive, liveViewerCount | ["4K", "CC"], true, 6924 | Badges, live streams and their concurrent viewers |
videoCount, playlistType | 124, course | Playlists and courses: exact number of videos |
aiSummary | Nick demonstrates… | YouTube's own AI summary, when the results page shows one |
correctedQuery | python tutorial | What YouTube searched instead, when it corrected your spelling |
The dataset has 67 fields in all; the Overview, Video details, Channels and Playlists views show the useful columns for each kind of result.
How to scrape YouTube search results
- Click Try for free and type your search terms into Search terms, one per line (or paste YouTube links into YouTube URLs).
- Pick Result types and any filters. All are optional.
- Set Max results per search, which also caps how long the run takes.
- Click Start. A search of 100 videos with full details takes about 10 seconds. The results go to the run's dataset, which you can read as JSON.
How much does it cost to scrape YouTube?
One flat monthly rental, shown on this page, with a free trial. There is no per-result fee: scrape as many results as you need.
Runs use your credits for compute, as every Actor does. YouTube's search answers without a proxy, so compute is the whole cost. Measured on Bytewells: 100 videos for one search term, with exact views, likes, publish dates and categories, in 20 seconds at 512 MB for $0.0004 of credits: well under $0.01 per 1,000 results.
Input
{
"searchQueries": ["web scraping tutorial", "best budget smartphone 2026"],
"resultTypes": ["video", "short"],
"maxResults": 100,
"dateFilter": "month",
"sortBy": "newest",
"minViews": 1000,
"excludeKeywords": ["sponsored"]
}
| Field | Default | Notes |
|---|---|---|
Search terms (searchQueries) | What you would type into YouTube's search bar. Quoted phrases work | |
YouTube URLs (startUrls) | Search results pages (keeping their filters), hashtag pages, /@channel/search?query=…, playlists, videos | |
Hashtags (hashtags) | Hashtag feeds: cooking, #travel | |
Search inside channels (searchInChannels) | Handles or channel URLs: each search term is searched inside each channel | |
Result types (resultTypes) | Videos | Videos, Shorts, Channels, Playlists, Movies, or Everything as YouTube mixes it |
Max results per search (maxResults) | 100 | Per search term and result type |
Max results in total (maxItems) | 10,000 | Stops the whole run |
Sort by (sortBy) | Relevance | Relevance, Popularity, Newest first, Most viewed |
| Upload date, Length, Features | any | YouTube's own filters (dateFilter, lengthFilter, isLive, is4K, isHD, hasSubtitles, hasCC, is360, isVR180, is3D, isHDR, hasLocation) |
Exact search (exactQuery) | off | Stops YouTube from correcting your spelling |
Language, Location (language, country) | English, United States | YouTube's interface language and location: they change the ranking |
Restricted Mode (restrictedMode) | off | YouTube's safe search |
| Uploaded after / before | Exact date range: a date (2024-01-31) or a period (30 days) | |
| Min / Max views, Min / Max length, Min channel subscribers | Ranges YouTube cannot filter by | |
| Exclude words, Exclude channels, Max results per channel | Clean up the list | |
Video details (includeVideoDetails) | on | Exact date, likes, tags, category, description, subscribers |
| Comment count, Channel details | off | Exact comment count; the channel's About data on every row |
Deep search (deepSearch) | off | Beyond YouTube's ~500 results per search |
| Shelf results, Remove duplicates across searches | off | YouTube's extra shelves; one row per result across search terms |
| Proxy | none | Not needed. If YouTube refuses the run's address, the platform's datacenter proxy is used automatically |
Output
Each result is one row in the dataset. A search that finds nothing, or a link this Actor does not read, becomes a row with "recordType": "error" and an errorCode instead of failing the whole run:
errorCode | Meaning |
|---|---|
NO_RESULTS | YouTube found nothing for this search, hashtag or channel search |
NOT_FOUND / CHANNEL_NOT_FOUND | The playlist, video or channel does not exist or is private |
UNSUPPORTED_URL | A YouTube page this Actor does not read (for example a channel page) |
INVALID_INPUT | Something the input cannot do, e.g. Search inside channels without search terms |
BLOCKED / RATE_LIMITED / NETWORK_ERROR | YouTube refused or did not answer the request; run again or enable a proxy |
PARSE_FAILED | YouTube changed its page layout; please report it |
The Run summary record lists every search with YouTube's result estimate, pages read, results filtered out per reason and why each search stopped.
YouTube's search filters in 2026
YouTube changed its Filters menu in 2026, and many scrapers still send the old values:
- Sorting by upload date and rating is gone. YouTube accepts the old values and silently returns relevance order. This Actor's Newest first collects what YouTube returns and sorts it by date itself (and its Most viewed sorts by exact view count).
- Length buckets changed to under 3 minutes, 3-20 minutes and over 20 minutes. The old under 4 and 4-20 still work and are offered.
- "Last hour" left the menu but still works.
- YouTube's filters leak. Under "Today", videos 5 days and 4 years old came back in our tests. Every result is checked against the filter you chose, and the ones that slip through are not delivered.
- The minus operator is ignored ("iphone -case" still returns cases). Use Exclude words; "-word" in a search term is applied automatically.
Coming from another YouTube scraper?
Paste your saved input. The field names of the most popular YouTube scraper (searchQueries, maxResults, maxResultsShorts, sortingOrder, dateFilter, videoType, lengthFilter, isHD, oldestPostDate and the rest) and of other search Actors (query, keywords, uploadDate, duration, features, gl, hl and more) are understood, and the run log says how each one was read.
Tips and limits
- About 200-500 results per search. That is where YouTube stops. Use Deep search, or several related search terms, for more.
- Results change between runs and by location. YouTube's ranking is not fixed: two identical searches minutes apart share only part of their first page. Location and language change it too.
- Language. With English, YouTube translates foreign titles on its results page. Video details restore the original title and keep YouTube's version in
translatedTitle. - Rounded numbers. Channel subscribers are rounded by YouTube everywhere. Comment counts are rounded unless you turn on Comment count. Shorts' views are exact with video details on.
- Tags and category come from YouTube Music's player data, which YouTube does not give for every video. When it is missing, the row has likes, exact views and the publish day from the watch page instead (
publishedAtPrecisionis thenday). - Not available without a login: the Purchased filter, members-only and paid-promotion flags, channel email addresses (only whether a business email exists), and subtitles.
FAQ
Is it legal to scrape YouTube?
This Actor collects only data YouTube shows publicly, without logging in. Results can still contain personal data, which laws such as the GDPR protect. Scrape personal data only for a legitimate purpose, and ask a lawyer if you are unsure. YouTube is a trademark of Google; this Actor is not affiliated with or endorsed by YouTube or Google.
Can I use it through the API?
Yes. Every run can be started through the API, and its dataset read as JSON. Runs can also be scheduled, and webhooks are available.
Can AI agents use it?
Yes. Agents connected to the Bytewells MCP server can find and run this Actor as a tool. An empty call runs an example search instead of failing.
Why did I get fewer results than I asked for?
YouTube ended the search (it stops after roughly 200-500 results), your filters removed some results, or the run reached its timeout. The run summary says which, per search, and nothing collected before that is lost.
Can I get more than 500 videos for one keyword?
Yes: turn on Deep search and raise Max results per search. It searches again in date windows, newest first, and removes repeats; it also works inside an Upload date or date range. One test search returned 3,000 unique videos.
Does it need a proxy?
No. YouTube's search answers the platform's servers directly. If YouTube ever refuses a run's address, the Actor switches to the platform's datacenter proxy by itself.
Related scrapers
- YouTube Channel Scraper: every video of a channel, with subscriber counts and upload rhythm.
Support
Missing a field, or found a search that does not work? Report it with the input you used, and it will be looked at quickly.
FAQ
- What can I search for on YouTube?
- Keywords, hashtags, a channel's videos or a pasted YouTube search URL. Results can be videos, Shorts, channels, playlists and movies, with every YouTube filter (upload date, type, duration, features, sort) and exact date ranges.
- Do I need a YouTube API key or login?
- No. It reads YouTube's public search without logging in, so there is no API key, no quota and no account to ban.
- How much does it cost?
- One flat monthly rental, shown on this page, with a free trial and no per-result fee. YouTube's search answers without a proxy, so compute is the whole cost. Measured on Bytewells: 100 videos with exact views, likes, publish dates and categories in 20 seconds for $0.0004 of credits.
- Can I get more than 500 videos for one keyword?
- Yes. YouTube stops a search after roughly 200-500 results; turn on Deep search and raise Max results per search. It searches again in date windows, newest first, and removes repeats. One test search returned 3,000 unique videos.
- Are the view and subscriber counts exact?
- View counts are exact with video details on, Shorts included. Subscriber counts are rounded by YouTube everywhere, and comment counts are rounded unless you turn on Comment count.
- Does it need a proxy?
- No. YouTube's search answers the platform's servers directly. If YouTube ever refuses a run's address, the Actor switches to the platform's datacenter proxy by itself.
- Can I use it through the API or from AI agents?
- Yes. Start runs through the Bytewells API (bytewells.com/docs/api), schedule them and read the dataset as JSON; webhooks work too. The API is Apify-compatible, so apify-client works with the Bytewells base URL. AI agents can run it as a tool through the Bytewells MCP server (bytewells.com/docs/mcp).
Input
Preview of the input form. Rent the Actor to fill it in and start runs from the console.
searchQueriesWhat you would type into YouTube's search bar, one per line. Quoted phrases work ("iphone 17"); YouTube ignores -word, so this Actor removes those results for you. Each term runs once per result type. YouTube links pasted here are read like the URLs below.
startUrlsSearch results pages (youtube.com/results?search_query=…, keeping their filters), hashtag pages (/hashtag/…), searches inside a channel (/@handle/search?query=…), playlists (playlist?list=…) and single videos. Channel pages are listed by YouTube Channel Scraper instead.
hashtagsHashtag feeds, with or without #: cooking, #travel. Returns the videos and Shorts YouTube shows on /hashtag/ (only Shorts when Result types is Shorts alone).
searchInChannelsChannel handles, URLs or IDs (@mkbhd, youtube.com/@mkbhd, UC…). When set, every search term is searched inside each of these channels instead of all of YouTube.
resultTypesWhat to search for. Each search term runs once per type, with its own limit. Videos leaves out Shorts; Everything is the mixed page YouTube shows (videos, Shorts, playlists, channels, movies).
maxResultsPer search term and result type. YouTube itself ends a search after roughly 200-500 results; turn on Deep search to go further. You pay per result, so this also caps the cost.
maxItemsStops the whole run after this many results, across all searches.
Applied by YouTube to keyword searches, as in its Filters menu, then checked again on every result: rows that slip through are dropped and never charged. Hashtag feeds, channel searches and playlists take no YouTube filters; Upload date and Length are applied to their rows here.
sortByRelevance and Popularity are YouTube's own rankings. YouTube removed its upload-date sort, so Newest first and Most viewed are sorted by this Actor, over every result YouTube returns for the search.
dateFilterOnly results uploaded in this period. Last hour is gone from YouTube's menu but still works.
lengthFilterYouTube's length buckets. The two older ones (under 4 minutes, 4-20 minutes) still work. For exact bounds use Min and Max length below.
isLiveOnly streams that are live right now.
is4KOnly videos available in 4K.
isHDOnly HD videos.
hasSubtitlesOnly videos with creator-provided subtitles.
hasCCOnly videos under a Creative Commons licence (reuse allowed).
is360Only 360° videos.
isVR180Only VR180 videos.
is3DOnly 3D videos.
isHDROnly HDR videos.
hasLocationOnly videos with a location set. YouTube rarely returns results for this filter.
exactQuerySearch exactly what you typed. Without it YouTube silently searches a corrected spelling, and returns unrelated videos for terms it does not know; the correctedQuery field shows when that happened.
languageYouTube's interface language: which languages rank higher and the language of the text YouTube adds. With English, YouTube translates foreign titles; video details restore the original (translatedTitle keeps YouTube's translation).
countryRanks results for this country, like YouTube's location setting.
restrictedModeYouTube's Restricted Mode (safe search): leaves out potentially mature videos.
Applied by this Actor to every result. Results they remove are never charged.
publishedAfterA date (2024-01-31) or a period back from now (30 days). Also sent to YouTube as a date operator, so the search itself is narrowed, not just its first pages.
publishedBeforeA date (2024-12-31, inclusive) or a period back from now (7 days).
minViewsOnly videos and Shorts with at least this many views.
maxViewsOnly videos and Shorts with at most this many views, e.g. to find small creators.
minDurationSecondsOnly videos at least this long, in seconds (600 = 10 minutes).
maxDurationSecondsOnly videos at most this long, in seconds.
minSubscribersOnly results from channels with at least this many subscribers (YouTube rounds the counts). For video rows this switches on Channel details.
excludeKeywordsDrop results whose title or description contains any of these. Whole words: "case" does not drop "showcase". Phrases work too.
excludeChannelsDrop results from these channels: handles (@mkbhd), channel IDs, channel URLs or names.
maxResultsPerChannelAt most this many results from any one channel across the run (0 = no limit), for a list of distinct creators.
Each adds requests and time per result. All are included in the price per result.
includeVideoDetailsExact publish time, likes, tags, category, full description with links and hashtags, chapters, the channel's subscribers and a comment count. Completes Shorts (channel, date, length, exact views). Two small requests per video (player data and the watch page), included in the price.
includeCommentCountThe exact number of comments and whether comments are turned off. One extra request per video (about 30 KB).
includeChannelDetailsThe channel's subscribers, total views, video count, country, joined date, links, business-email flag and description, on every row. One request per channel.
deepSearchYouTube ends each search after roughly 200-500 results. Deep search repeats a video search in date windows, newest first, to reach results the plain search never shows. Slower. Works for Videos, Movies and Everything (not Shorts), also inside an Upload date or date range.
includeShelvesAlso return items from YouTube's extra shelves: "Latest from ", "Channels new to you", "Popular in ", "From health sources", artist cards and community posts. Off: only the search results themselves.
deduplicateResultsA result found by several search terms or types is returned, and charged, once. Off: each search returns its own full list (repeats within one search are always removed).
The defaults are tuned for speed and cost. Change them only if runs are blocked or rate-limited.
proxyConfigurationNot needed: YouTube's own API answers without one. If YouTube refuses the run's address, the Actor switches to Apify datacenter proxy by itself. Residential proxy is never used.
maxConcurrencyHow many searches run at the same time.
requestTimeoutSecsHow long to wait for one response before giving up on it.
maxRetriesRetries for blocked, rate-limited or failed connections. Timeouts are not retried.
API
Bytewells speaks the Apify API. Existing integrations keep working: point apify-client at https://bytewells.com/api and use your Bytewells API token (Console → Settings → API access). The Actor ID is amethyst/youtube-search-scraper (or amethyst~youtube-search-scraper in URLs).
JavaScript · apify-client
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: process.env.BYTEWELLS_TOKEN,
baseUrl: 'https://bytewells.com/api',
});
const input = {
"searchQueries": [
"web scraping tutorial"
],
"resultTypes": [
"video"
],
"maxResults": 100,
"maxItems": 10000,
"sortBy": "relevance",
"exactQuery": false,
"language": "en",
"country": "US",
"restrictedMode": false,
"maxResultsPerChannel": 0,
"includeVideoDetails": true,
"includeCommentCount": false,
"includeChannelDetails": false,
"deepSearch": false,
"includeShelves": false,
"deduplicateResults": false,
"proxyConfiguration": {
"useApifyProxy": false
},
"maxConcurrency": 5,
"requestTimeoutSecs": 30,
"maxRetries": 2
};
const run = await client.actor('amethyst/youtube-search-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);Python · apify-client
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["BYTEWELLS_TOKEN"], api_url="https://bytewells.com/api")
run_input = {
"searchQueries": [
"web scraping tutorial"
],
"resultTypes": [
"video"
],
"maxResults": 100,
"maxItems": 10000,
"sortBy": "relevance",
"exactQuery": False,
"language": "en",
"country": "US",
"restrictedMode": False,
"maxResultsPerChannel": 0,
"includeVideoDetails": True,
"includeCommentCount": False,
"includeChannelDetails": False,
"deepSearch": False,
"includeShelves": False,
"deduplicateResults": False,
"proxyConfiguration": {
"useApifyProxy": False
},
"maxConcurrency": 5,
"requestTimeoutSecs": 30,
"maxRetries": 2
}
run = client.actor("amethyst/youtube-search-scraper").call(run_input=run_input)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)HTTP · curl
curl -X POST "https://bytewells.com/api/v2/acts/amethyst~youtube-search-scraper/runs" \
-H "Authorization: Bearer $BYTEWELLS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchQueries":["web scraping tutorial"],"resultTypes":["video"],"maxResults":100,"maxItems":10000,"sortBy":"relevance","exactQuery":false,"language":"en","country":"US","restrictedMode":false,"maxResultsPerChannel":0,"includeVideoDetails":true,"includeCommentCount":false,"includeChannelDetails":false,"deepSearch":false,"includeShelves":false,"deduplicateResults":false,"proxyConfiguration":{"useApifyProxy":false},"maxConcurrency":5,"requestTimeoutSecs":30,"maxRetries":2}'Runs are billed as compute from your credit balance. Paid Actors need an active rental or trial; otherwise the API answers 402 rental-required.
Related
More Actors from the same publisher.

TikTok Comments Scraper - Replies, Likes & Commenters
Eimantas V · @amethyst
Scrape TikTok comments and replies from video links or profiles: text, likes, reply counts, dates and commenter IDs. No login, no browser, flat monthly price.
Social mediaVideosMarketing$19/mo7-day free trial
TikTok Video Scraper - Views, Likes & Hashtags
Eimantas V · @amethyst
Scrape TikTok video stats from a list of URLs: views, likes, comments, shares, saves, hashtags, sound, post date and creator followers. No login or API key.
Social mediaVideosMarketing$19/mo7-day free trial
Facebook Ads Library Scraper - Meta Ads, All Countries
Eimantas V · @amethyst
Scrape the Facebook Ads Library in any country: ad copy, images, videos, landing pages, CTAs, run dates and advertiser Pages. No login, no token needed.
MarketingSocial mediaBusiness$29/mo7-day free trial
Facebook Pages Scraper - Emails, Phones & Followers
Eimantas V · @amethyst
Scrape Facebook Pages by link, username or ID: email, phone, website, address, exact followers, category, rating and social links. No login or cookies.
Lead generationSocial mediaMarketing$19/mo7-day free trial
Facebook Posts Scraper - Pages, Profiles & Reactions
Eimantas V · @amethyst
Scrape posts from public Facebook Pages and profiles: text, date, reactions by type, comments, shares, video views and media. Date filters and new-post alerts.
Social mediaMarketingLead generation$19/mo7-day free trial
Instagram Profile Scraper - Followers, Posts & Emails
Eimantas V · @amethyst
Scrape Instagram profiles by username or URL: exact followers, following and posts, bio, links, emails and phones from bios, engagement rate, latest posts.
Social mediaLead generationMarketing$19/mo7-day free trial