~ / endpoints / Search API

YouTube Search Scraper API

Our YouTube search API takes a search query and returns the ranked organic results as clean JSON: video IDs, titles, channel names, view counts, and thumbnails, with paid placements split out into a separate <code>ads</code> array so you never mistake an ad for a real ranking. No Google Cloud project and no daily quota to ration. A second endpoint goes one step earlier: pass a seed query to <code>/youtube/suggest</code> and it returns YouTube's own related and autocomplete searches, so you can scrape YouTube related searches for keyword research before you ever pull a results page.

Get a free API keyAll endpoints
1,000
free requests
2.6s
median response
JSON
structured output
REST
one endpoint
the problem

Why YouTube Search data is hard to get

The official YouTube Data API v3 charges 100 quota units per search.list call against a default 10,000 units a day, which caps you at roughly 100 searches before it returns quota errors. Scraping the results page yourself means fighting client fingerprinting and a consent wall, so a hosted YouTube search API that returns a flat result list is the simpler path.

quickstart

The YouTube Search Scraper API in one request

cURL
curl "https://api.youtubescraperapi.com/api/v1/youtube/search?search_query=lofi+beats&api_key=$API_KEY"
Python
import requests

resp = requests.get(
    "https://api.youtubescraperapi.com/api/v1/youtube/search",
    params={
        "search_query": "lofi beats",
        "api_key": "YOUR_API_KEY",
    },
    timeout=60,
)
data = resp.json()

print(data["results_count"], "organic results,", data["ads_count"], "ads, for", data["query"])
for video in data["organic_results"]:
    print(video["position"], video["title"], "-", video["channel"]["name"], "-", video["views"])
parameters

Parameters

ParameterRequiredDefaultNotes
search_queryrequired-The search terms to look up on YouTube, exactly as you would type them into the search bar.
api_keyrequired-Your API key, passed as a query parameter. Create one on the free plan.
response

What the YouTube Search Scraper API returns

200 OK
{
  "query": "lofi beats",
  "results_count": 20,
  "organic_results": [
    {
      "position": 1,
      "title": "lofi hip hop radio - beats to relax/study to",
      "link": "https://www.youtube.com/watch?v=jfKfPfyJRdk",
      "video_id": "jfKfPfyJRdk",
      "channel": {
        "name": "Lofi Girl",
        "link": "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow",
        "thumbnail": "https://yt3.ggpht.com/lofi-girl-avatar=s68-c-k-c0x00ffffff-no-rj",
        "verified": true
      },
      "views": "92,431,008 views",
      "published": "Streamed 2 years ago",
      "length": "LIVE",
      "description": null,
      "thumbnail": {
        "static": "https://i.ytimg.com/vi/jfKfPfyJRdk/hq720.jpg",
        "rich": "https://i.ytimg.com/an_webp/jfKfPfyJRdk/mqdefault_6s.webp"
      }
    }
  ],
  "ads": [],
  "ads_count": 0
}
FieldTypeDescription
querystringThe search query that was run, echoed back from your request.
results_countintegerNumber of organic video results returned in this response.
organic_resultsarrayList of ranked organic video result objects, in the order YouTube returned them, with paid placements excluded and surfaced separately under ads.
organic_results[].positioninteger1-based rank of the video within the organic results.
organic_results[].titlestringVideo title as shown on the results page.
organic_results[].linkstringFull watch URL for the video.
organic_results[].video_idstringThe 11-character YouTube video ID.
organic_results[].channelobjectThe uploading channel: name, link, thumbnail, and a verified boolean.
organic_results[].channel.namestringDisplay name of the channel that uploaded the video.
organic_results[].channel.linkstringCanonical URL of the uploading channel.
organic_results[].channel.verifiedbooleanWhether YouTube marks the channel as verified.
organic_results[].viewsstringView count text as displayed by YouTube, for example "1.2M views".
organic_results[].publishedstringRelative upload time, for example "3 weeks ago".
organic_results[].lengthstringRuntime string such as "10:42", or "LIVE" for active streams.
organic_results[].descriptionstringDescription snippet when YouTube shows one for the result, otherwise null.
organic_results[].thumbnailobjectThumbnail URLs for the video: a static image and a rich animated preview.
adsarrayPaid/ad placements returned for the query, kept separate from the organic results so you never mistake an ad for a real ranking.
ads_countintegerNumber of ad placements in the ads array, often 0.
use cases

What you can build using the API

>

Scrape YouTube related searches for keyword research

Send a seed query to the <code>/youtube/suggest</code> endpoint and get back YouTube's related and autocomplete searches as a flat <code>related_searches</code> array. Expand one keyword into the dozens of phrases viewers actually type, then feed them straight into content planning, tag research, or the search endpoint for ranking data.
>

Keyword and topic monitoring

Track which videos rank for your target keywords over time and watch new uploads surface for a search term you care about.
>

Competitor and niche research

Pull the top results for a niche query, then read channel names and view counts to see who owns the topic.
>

Content discovery feeds

Feed a query into the YouTube search API and populate an app, newsletter, or dashboard with fresh ranked videos.
>

Dataset building for analysis

Collect titles, view counts, and durations across many queries to build a dataset for trend or sentiment work.
>

Influencer and channel sourcing

Search by topic and harvest the channel.link of every result to build a shortlist of creators in a space.
>

Trend and demand tracking

Run the same searches on a schedule and chart how view counts and the ranking order shift week over week.
why youtubescraperapi.com

Why teams choose our YouTube Search Scraper API

Each call returns the ranked organic_results parsed into flat JSON, with paid placements split into a separate ads array and an ads_count, so you read the real ranking without an ad slipping into it. No nested resource tree to walk and no units to count. We rotate proxies, clear the consent wall, and retry across pools at a 2.6s median, and the free plan covers 1,000 requests so you can confirm the fields before you pay.

*

Related and autocomplete searches

A companion <code>/youtube/suggest</code> endpoint takes a seed query and returns YouTube's related and autocomplete searches as a flat list with a related_count, so keyword expansion and the ranked results come from the same API and key.
*

Quota-free searching

No Google Cloud project, no 100-unit-per-search budget, no daily cap to plan around. You pay per successful request, with no quota to ration.
*

Anti-bot and proxy rotation

Rotating proxies plus a multi-tier retry chain handle blocks, the consent wall, and YouTube's client fingerprinting for you.
*

Organic results split from ads

The ranked videos come back in organic_results, while paid placements are separated into their own ads array with an ads_count. You read the real ranking directly, with no ad rows to filter out first.
*

Parsed JSON output

We parse the live results page into a flat organic_results array, so every field is ready to read with no HTML or nested deserialization.
*

Live parity

Results come from the rendered results page, so the ranking and view counts match what a real viewer sees right now.
comparison

YouTube Search Scraper API vs the official YouTube API

Our YouTube Search APIDIY (requests + headless)YouTube Data API v3
Search volumePay per successful request, no daily capLimited by your IP pool before blocks hitsearch.list costs 100 units against a 10,000-unit default daily quota, about 100 searches per day
SetupOne REST call with an API keyBuild and maintain a headless scraperCloud project, enable API, generate key, then raise quota
OutputFlat parsed JSON, organic_results split from adsRaw HTML you parse yourselfNested resource JSON you deserialize
Anti-bot handlingProxies, retries, consent wall handledYou build and maintain itNot applicable, but quota limits apply
Blocks and maintenanceHandled on our sideBreaks when YouTube changes layoutStable, but capped and key-gated
pricing

Start free, scale when ready

PlanPriceBest for
Free1,000 requestsTesting and small jobs
Pro$0.60 / 1kProduction workloads
Pay-as-you-go$0.90 / 1kSpiky or one-off volume

Median response 2.6s. You only pay for successful requests.

FAQ

Does YouTube have a search API?

Yes. The official option is the YouTube Data API v3 search.list method, which returns video, channel, and playlist results that match a query. Its catch is cost: each search.list call uses 100 quota units and a project gets 10,000 units per day by default, so you get about 100 searches per day. Our YouTube search API skips that model and returns parsed search results per request with no quota counter.

Is the YouTube search API free?

The official YouTube Data API is free to use but limited by the daily quota, which works out to roughly 100 search.list calls per day before you must request more from Google. Our API includes 1,000 free requests on the starter plan so you can test real searches, then continues on usage-based pricing with no daily search cap.

What does a search request return?

A request returns the query you sent, a results_count, an organic_results array, and an ads array with its ads_count. Each organic video object includes the position, title, link, video_id, a channel object (name, link, thumbnail, verified), views, published time, length, an optional description, and a thumbnail object. Keeping the organic results separate from ads means you read the real ranking without filtering ad rows out first.

How do I search YouTube programmatically?

Send a GET request to https://api.youtubescraperapi.com/api/v1/youtube/search with two query parameters: search_query for your terms and api_key for your key. The response is JSON, so you read data["organic_results"] directly in any language that can make an HTTP request, with paid placements available separately under data["ads"].

Can I scrape YouTube related searches and autocomplete suggestions?

Yes. Send a GET request to https://api.youtubescraperapi.com/api/v1/youtube/suggest?query=YOUR_SEED&api_key=YOUR_API_KEY and the response returns the seed query you sent, a related_searches array of the related and autocomplete phrases YouTube surfaces for it, and a related_count. It is the keyword-research companion to the search endpoint: expand one seed into the phrases viewers actually type, then run the promising ones through the search endpoint for ranking and view-count data. Both endpoints share the same key and the same 1,000-request free tier.

Can I scrape YouTube search results legally?

Most YouTube search results are public data, and courts have generally treated scraping public pages as permissible, though you still must respect copyright and personal-data rules such as GDPR. We handle the request layer; you stay responsible for how you store and use the data. For a deeper look, see our guide on whether scraping YouTube is legal.

How many results does one call return?

One call returns a page of ranked video results, typically a few dozen, in the same order YouTube ranks them. The exact count is reported in results_count, so your code can read that value directly on each response.

Get search api as JSON
Free plan, 1,000 requests. No credit card required.
Get a free API key All endpoints