YouTube Search Scraper avatar

YouTube Search Scraper

Pricing

$2.30 / 1,000 results

Go to Apify Store
YouTube Search Scraper

YouTube Search Scraper

YouTube search API–style keyword scraper on Apify: run queries with optional country/lang, get first-page video hits (IDs, titles, channels, views) without burning official Data API quota.

Pricing

$2.30 / 1,000 results

Rating

0.0

(0)

Developer

Scrape Mamba

Scrape Mamba

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 hours ago

Last modified

Categories

Share

YouTube Search Scraper is an Apify Actor for YouTube search API–style keyword discovery: pass one or many queries and get structured first-page video rows (IDs, titles, channels, views, thumbnails) you can schedule, export, and join. Built by ScrapeMamba, this apify youtube scraper wraps ScrapeMamba’s POST /youtube/search endpoint so teams that want to scrape YouTube search listings — or run a youtube keyword scraper — do not maintain HTML parsers or a browser farm. Use it as a suite youtube scraper when workflows start from phrases instead of hand-picked IDs.

Actor URL: https://apify.com/scrapemamba/youtube-search-scraper

Pricing on Apify: $2.30 per 1,000 results (billed for successful Dataset rows).

This Actor is the discovery step of the ScrapeMamba YouTube suite. Seed catalogs with keywords, then enrich with YouTube Video Scraper, expand graphs with YouTube Related Videos Scraper, or snapshot charts with YouTube Trending Scraper.


Overview

Search powers topic monitoring, competitive coverage, content ideation, creator lead lists, and warehouse seed tables. Many teams looking for a YouTube search API want keywords → video IDs without building scrapers. Google’s official YouTube Data API search.list can do that — with Cloud project setup, API keys or OAuth, daily quotas, and a Google-shaped JSON contract.

This Actor is a different path: an Apify-native youtube scraper that calls ScrapeMamba’s search surface, maps public SERP-style listings into a stable schema, and parallelizes queries for research and monitoring pipelines. It is not a drop-in clone of Google’s Search API; it is practical when you need first-page public hits in JSON/CSV on a schedule.

Behavioral fact: the endpoint is /youtube/search, and this Actor fetches the first search page only. There is no continuation / infinite-scroll path. If a next-page token would be required, the Actor short-circuits. Cap volume with maxResults (default "50", range 1–500); you will not get an unbounded SERP crawl from one query.

Under the hood:

  1. queries is validated as a non-empty string list.
  2. Optional country is normalized (default US); optional lang is passed when set.
  3. Up to 8 workers process queries concurrently.
  4. Each query calls POST /youtube/search with { query, country, lang }.
  5. Items without a mappable videoId are filtered out.
  6. Success rows are type: "video" with query, page, mapped fields, and raw.
  7. Per-query failures are type: "error" with query and error so one bad term does not kill the run.

YouTube Data API search vs this Actor

DimensionOfficial YouTube Data API search.listThis Actor (ScrapeMamba on Apify)
QuotasDaily unit quotas; search is relatively expensiveApify result pricing + ScrapeMamba usage
OrchestrationYour code, jobs, and storageApify Input, Dataset, schedules, webhooks
PaginationpageToken / multi-page when quota allowsFirst page only (by design)
OutputGoogle JSON as returnedMapped Apify Dataset rows + raw
LocaleregionCode / relevanceLanguageInput country / lang (default US)
Best whenContractual Search API semantics matterKeyword → ID lists inside Apify pipelines

Choose the official API for Google SLAs and multi-page pageToken crawls. Choose this Actor for a youtube scraper api workflow on Apify: keywords in, Dataset out, no browser ops.


Who this is for

  • Teams building a youtube keyword scraper for monitoring, ideation, or CRM seeding
  • Analysts who need first-page public search snapshots by country
  • Pipelines that already use Apify and need discovery upstream of Video / Related / Subtitles

Who this is not for

  • Anyone seeking a YouTube video downloader — this Actor extracts metadata and listing text, not media files
  • Products that require page 2+ of YouTube search from a single query
  • Workflows that need official Google Search API contractual semantics and multi-page pagination

What it does

  • Runs one or many search keywords in a single Actor run
  • Optional country (ISO, default US) and language targeting
  • Caps results per query with maxResults (1–500, default 50)
  • Emits structured listing fields plus the originating query
  • Keeps the original API item under raw
  • Records per-query errors as Dataset rows
  • Parallelizes across up to 8 workers

Use cases

Topic and brand monitoring — Schedule product names, brand aliases, and competitor keywords. Diff exports for new videoIds; enrich hits with Video Scraper.

Catalog and CRM seeding — Produce keyword → ID lists, then hydrate with Video Scraper and optional Subtitles. Keep maxResults modest until you know keyword noise.

Competitive locale coverage — Same queries with different country values (US, GB, IN). Do not assume one market’s first page matches another.

Agent and automation pipelines — Call via the Apify API with a dynamic queries array, then chain Video / Related / Subtitles. Per-query type: "error" rows keep partial success easy.

Editorial sampling — Snapshot what currently ranks for a phrase. This is a first-page snapshot, not a historical search archive.


What data can it extract?

FieldDescription
type"video" on success; "error" on failure
querySearch term that produced the row
pagePage index (first page in practice)
videoIdCanonical 11-character video ID
titleVideo title
authorChannel / uploader display name
channelIdChannel ID when present
viewsView count or view text when available
lengthDuration string when available
publishedTimePublish label when present
description / textShort snippet (often truncated)
thumbnailPreview image URL
urlWatch URL
isShortHint when the listing is a Short
rawOriginal item payload
errorPresent on type: "error" rows

Null fields are normal when listings omit stats. Join on videoId.


Input

FieldTypeRequiredDefaultDescription
queriesstring[]YesSearch keywords
countrystringNo"US"ISO country code
langstringNoOptional UI language (e.g. en)
maxResultsstring / numberNo"50"Max results per query, clamped 1–500

Console prefill: queries = nodejs, machine learning; country / maxResults = US / 50; optional lang = en.

{
"queries": ["nodejs", "machine learning"],
"country": "US",
"lang": "en",
"maxResults": "50"
}

Tips: Prefer focused phrases. Dedupe duplicate queries. maxResults is per query (ten × 50 ≈ 500 video rows). country alone is often enough for locale ranking.


Output

Success rows use type: "video" with query, page, mapped fields, and raw. Failures:

{
"type": "error",
"query": "some keyword",
"error": "HTTP 500: Upstream request failed after retries"
}

Success example

{
"type": "video",
"query": "nodejs",
"page": 1,
"videoId": "abc123xyz12",
"title": "Node.js Crash Course",
"author": "Dev Channel",
"channelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
"views": 89000,
"length": "12:34",
"publishedTime": "2 years ago",
"thumbnail": "https://i.ytimg.com/vi/abc123xyz12/hqdefault.jpg",
"url": "https://www.youtube.com/watch?v=abc123xyz12",
"raw": { }
}

Treat videoId as the join key; views / publishedTime formats vary by listing.


How to run on Apify Console

  1. Open YouTube Search Scraper.
  2. Edit Input queries, country (default US), optional lang, and maxResults (default 50).
  3. Smoke-test with 1–2 queries and maxResults of 1020.
  4. Start the run; open the Dataset; export JSON / CSV / Excel.
  5. Filter type: "error" before joining on videoId.
  6. Save as a task + schedule, or call via the Apify API.

Checklist: one known keyword → confirm videoId / title / query → scale and schedule.


Apify API example

curl "https://api.apify.com/v2/acts/scrapemamba~youtube-search-scraper/runs" \
-H "Content-Type: application/json" \
-d '{
"queries": ["nodejs", "machine learning"],
"country": "US",
"lang": "en",
"maxResults": "50"
}'
$curl "https://api.apify.com/v2/actor-runs/RUN_ID/dataset/items"

Apify Client SDKs (JS/Python) accept the same Input. Webhooks can trigger enrichment when a run succeeds.


Pricing

  • $2.30 / 1,000 results on this Apify listing
  • ScrapeMamba usage is separate from Apify compute

Rough estimate: (video rows) / 1000 × $2.30. maxResults is per query; errors and thin pages change row counts.


Errors and status handling

Retries on 429 / 500 / 502 / 503 / 504 (up to 3 attempts, delays 2s / 5s / 10s); 60s timeout.

SituationBehavior
Empty / invalid queriesExit code 1
HTTP failures after retriesPer-query type: "error" row
Items without videoIdSkipped
Partial query failuresOther queries continue

Inspect logs and Dataset type: "error" rows when some keywords are missing.


Best practices

  1. Validate with 1–2 queries before large batches.
  2. Do not design products that need page 2+ from this Actor — refine queries or use other Actors.
  3. Set country intentionally when comparing markets.
  4. Cap maxResults realistically; 500 does not invent a second page.
  5. Dedupe videoId across related keywords.
  6. Chain Search → Video / Related / Trending as needed.
  7. Daily snapshots usually beat constant live crawling for monitoring.
  8. Public data only.
  9. Prefer mapped fields in warehouses; use raw for schema debugging.

Limitations

  • First search page only — no infinite scroll / continuation
  • Result count bounded by first-page yield and maxResults
  • Ranking and fields vary by country / lang and YouTube UI changes
  • Not a substitute for official Data API contractual Search semantics
  • Public listings only; not a media downloader

Troubleshooting

SymptomWhat to try
Immediate failure, no rowsEnsure queries is a non-empty string list
Fewer rows than maxResultsExpected for first-page search / filtered items
Wrong language or creatorsSet country / lang explicitly
Need deeper paginationNot supported — split queries or change strategy
Duplicates across queriesDedupe on videoId in ETL
Intermittent 5xxClient retries; inspect that query’s error row

FAQ

Is this a YouTube search API for keywords?

Functionally for many pipelines, yes: pass keywords (queries) and receive structured hits. Technically it is ScrapeMamba’s /youtube/search on Apify — not Google’s official search.list.

YouTube API search by keyword vs this Actor — which should I use?

Use Google’s YouTube Data API for official quotas, multi-page pageToken search, and Google’s contractual response. Use this Actor for Apify Datasets, schedules, and first-page public keyword discovery without managing Google Cloud quotas yourself.

Yes. Intentional limitation — no infinite-scroll or continuation. maxResults only caps first-page items (1–500). Design around refined queries and schedules, not deep SERP crawls.

How do I scrape YouTube search results on Apify?

Pass queries, optionally set country / lang / maxResults, start the run, export the Dataset or pull via Apify API / Client.

Can I use this as a youtube keyword scraper for monitoring?

Yes. Save a keyword list as a task, schedule it, and diff videoId sets over time. Keep maxResults modest and dedupe across queries.

Is this a YouTube video downloader?

No. Listing metadata only (IDs, titles, channels, stats text, thumbnails) — not video or audio files.

Defaults and parallelism?

maxResults defaults to "50" (1–500 per query). country defaults to US. Up to 8 workers. queries is required.

Can I pass channel URLs as queries?

No — use search keywords. Channel uploads → Channel Videos Scraper; single-video metadata → Video Scraper.

Enrich distinct videoIds with YouTube Video Scraper. Search is keyword-driven; Trending Scraper snapshots charts without search terms.

Can I call this from Python?

Yes — Apify Client for Python with the same Input. The Actor runtime is JS on Apify; your client can be Python, Node, or curl.

Is private or age-gated content supported?

No. Public data only.


Pipeline patterns

Keyword → enrich: Search → dedupe videoId → Video Scraper → optional Subtitles / Related.

Locale comparison: Same queries, different country tasks; compare which IDs appear per market.

Monitoring: Schedule a fixed keyword set; store Datasets by date; alert on new videoIds.


Export and automation

Dataset download (JSON / CSV / Excel), Apify Dataset API, tasks + schedules, webhooks for enrichment, and integrations that consume Dataset URLs.


ActorBest for
YouTube Video ScraperEnrich search hit IDs
YouTube Trending ScraperCharts instead of keywords
YouTube Related Videos ScraperRecommendation neighbors from a hero video

Also in the suite: Channel, Channel Videos, Channel Shorts, Subtitles.


Compliance note

Use only on public YouTube search listings, in line with YouTube’s terms, applicable law, and your policies. Do not scrape private or login-walled content. You remain responsible for lawful use of collected data.