# YouTube Search Scraper | Filters, Shorts, Channels | $0.40 / 1K (`hridayrungta/youtube-search-scraper`) Actor

YouTube search results API alternative: export videos, Shorts, channels and playlists for any keyword with YouTube's own filters (upload date, duration, type, live, 4K, CC, popularity). Rank, views, dates, channels. Only-new monitoring mode. No API key.

- **URL**: https://apify.com/hridayrungta/youtube-search-scraper.md
- **Developed by:** [Hriday Rungta](https://apify.com/hridayrungta) (community)
- **Categories:** Videos, Social media, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.28 / 1,000 search results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

**YouTube Search Scraper** is a **YouTube search API alternative**: type in one or more keywords and get YouTube's search results back as clean **YouTube data** (rank, title, channel, views, publish date, duration, badges) in JSON, CSV or Excel. Try it in one click with the prefilled keywords. It is built for **YouTube keyword research**, competitor and trend monitoring, influencer discovery and building datasets, without an API key, quota units or a login.

- **YouTube's own search filters:** result type (videos, Shorts, channels, playlists, movies), upload date (last hour, today, this week, this month, this year), duration (under 3, 3 to 20, over 20 minutes), features (Live, 4K, HD, Subtitles/CC, Creative Commons, 360°, VR180, 3D, HDR, Location, Purchased) and Prioritize (relevance or popularity).
- **Many keywords per run**, each searched separately, with automatic pagination up to 1,000 results per keyword.
- **Rank tracking:** every row carries its position in YouTube's results for that keyword.
- **Only-new monitoring mode:** run it on a schedule and get only results you have not received before.
- **Region and language:** set the country (`gl`) and interface language (`hl`) YouTube localises results for.
- **Apify platform advantages:** REST API, scheduling, webhooks, integrations (Make, n8n, Zapier, Google Sheets), run monitoring and automatic proxy fallback.
- **$0.40 per 1,000 results** on the Free plan, down to $0.28 per 1,000 on Gold and above, plus a $0.001 start fee per run.

### What data can you extract from YouTube search?

One flat row per search result. Videos and Shorts, channels, playlists and movies share the same columns, so a mixed result list still fits in one spreadsheet.

| Field | Videos / Shorts | Channels | Playlists |
|---|---|---|---|
| `keyword`, `rank`, `page` | yes | yes | yes |
| `type`, `id`, `url`, `title` | yes | yes | yes |
| `channelName`, `channelId`, `channelUrl`, `channelHandle`, `channelVerified` | yes | yes | owner when shown |
| `viewCount`, `viewCountText`, `liveViewers` | yes | - | - |
| `publishedText` ("3 days ago"), `publishedAt` (approximate ISO date), `publishedAtPrecision` | yes | - | - |
| `durationSeconds`, `durationText` | yes | - | - |
| `isLive`, `isUpcoming`, `scheduledStartAt`, `isShort` | yes | - | - |
| `badges` (LIVE, 4K, CC, New, ...) | yes | - | yes |
| `descriptionSnippet` | yes | yes | - |
| `thumbnailUrl` | yes | yes | yes |
| `subscriberCount`, `subscriberCountText` | - | yes | - |
| `videoCount`, `videoCountText` | - | when YouTube shows it | yes |
| `filters`, `country`, `language`, `searchUrl`, `scrapedAt` | yes | yes | yes |

Keywords that fail, return nothing or are skipped get one free status row (`status` = `failed`, `no-results` or `skipped`, with a `message`), so you always see what happened to every keyword.

### How to use YouTube Search Scraper

1. Open the Actor and click **Try for free** (or **Start**).
2. Enter your **Search keywords**, one per line.
3. Set **Max results per keyword** (YouTube shows about 20 results per page; the Actor pages on automatically).
4. Optionally pick **YouTube search filters**: result type, upload date, duration, features, Prioritize.
5. Optionally set **Country** and **Interface language**, or turn on **Only new results since the last run** for monitoring.
6. Click **Start** and download the results as JSON, CSV, Excel or HTML, or fetch them through the API.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `keywords` | list of text | (required) | One search per line, as typed into YouTube's search bar. |
| `maxResultsPerKeyword` | number | 50 | Results saved per keyword (1 to 1,000). In only-new mode: how deep to look. |
| `resultType` | select | `all` | `all`, `video`, `short`, `channel`, `playlist`, `movie`. |
| `uploadDate` | select | `any` | `lastHour`, `today`, `thisWeek`, `thisMonth`, `thisYear`. |
| `duration` | select | `any` | `under3`, `from3to20`, `over20` (minutes). |
| `features` | multi-select | none | `live`, `4k`, `hd`, `subtitles`, `creativeCommons`, `360`, `vr180`, `3d`, `hdr`, `location`, `purchased`. |
| `sortBy` | select | `relevance` | `relevance` or `popularity` (YouTube's "Prioritize" option). |
| `country` | text | `US` | Two-letter country code (`gl`). |
| `language` | text | `en` | Interface language (`hl`). Keep `en` for the most complete `publishedAt`. |
| `includeShortsShelves` | yes/no | no | Also save Shorts from the "Shorts" shelves mixed into normal results (fewer fields). |
| `onlyNewResults` | yes/no | no | Save only results not delivered in earlier runs for the same keyword + filters. |
| `monitorStoreName` | text | `youtube-search-monitor` | Key-value store (in your account) that remembers delivered results. |

#### Input example

```json
{
  "keywords": ["ai news", "minecraft update"],
  "resultType": "video",
  "uploadDate": "thisWeek",
  "sortBy": "popularity",
  "maxResultsPerKeyword": 20,
  "country": "US",
  "language": "en"
}
```

### Output example

A real row from a run on 2026-11-02 (keyword "lofi music", no filters):

```json
{
  "status": "ok",
  "keyword": "lofi music",
  "rank": 1,
  "page": 1,
  "type": "video",
  "id": "_jH2oTNRe7g",
  "url": "https://www.youtube.com/watch?v=_jH2oTNRe7g",
  "title": "cozy autumn music 🍂 lofi beats to study / relax to",
  "channelName": "Lofi Girl",
  "channelId": "UCSJ4gkVC6NrvII8umztf0Ow",
  "channelUrl": "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow",
  "channelHandle": null,
  "channelVerified": true,
  "viewCount": 1592222,
  "viewCountText": "1,592,222 views",
  "liveViewers": null,
  "publishedText": "3w ago",
  "publishedAt": "2026-10-12T11:22:14.310Z",
  "publishedAtPrecision": "week",
  "scheduledStartAt": null,
  "durationSeconds": 3882,
  "durationText": "1:04:42",
  "isLive": false,
  "isUpcoming": false,
  "isShort": false,
  "badges": [],
  "descriptionSnippet": "Crisp air, warm drinks, and gentle beats. Wrap yourself in the soft warmth of autumn lofi. | Listen on Spotify, Apple music and ...",
  "thumbnailUrl": "https://i.ytimg.com/vi/_jH2oTNRe7g/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDgBCjNCUbZYMoNRSMDoOB_IXGGTg",
  "subscriberCount": null,
  "subscriberCountText": null,
  "videoCount": null,
  "videoCountText": null,
  "isNew": null,
  "filters": "none",
  "country": "US",
  "language": "en",
  "searchUrl": "https://www.youtube.com/results?search_query=lofi+music&hl=en&gl=US",
  "scrapedAt": "2026-11-02T11:22:14.327Z"
}
```

A channel result (Result type = Channels, keyword "mrbeast") looks like this (shortened):

```json
{
  "status": "ok",
  "keyword": "mrbeast",
  "rank": 1,
  "type": "channel",
  "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "url": "https://www.youtube.com/@MrBeast",
  "title": "MrBeast",
  "channelHandle": "@MrBeast",
  "channelVerified": true,
  "subscriberCount": 525000000,
  "subscriberCountText": "525M subscribers",
  "descriptionSnippet": "SUBSCRIBE FOR A COOKIE! New MrBeast or MrBeast Gaming video every single Saturday at noon eastern time!"
}
```

The dataset has ready-made views: **Results (table)**, **All columns (flat, for CSV / Excel)**, **Videos and Shorts**, **Channels** and **Keyword problems**.

### How much does it cost to scrape YouTube search results?

Pay per event: you pay only for results that are saved, plus a small start fee per run.

| Apify plan | Per 1,000 results | Start fee per run |
|---|---|---|
| Free | $0.40 | $0.001 |
| Bronze | $0.36 | $0.001 |
| Silver | $0.32 | $0.001 |
| Gold, Platinum, Diamond | $0.28 | $0.001 |

Worked examples on the Free plan:

- **2 keywords x 20 results** (the prefilled run): $0.001 + 40 x $0.0004 = **$0.017**.
- **100 keywords x 50 results** for keyword research: $0.001 + 5,000 x $0.0004 = **about $2.00**.
- **Daily monitoring of 10 keywords**, top 20 each, only new results: at most 200 results a day = **at most $0.08 a day**, usually far less because only new videos are saved.

Apify's Free plan includes $5 of monthly credit, which covers roughly **12,000 YouTube search results** a month with this Actor. Failed keywords, keywords with no results and skipped keywords are never charged. Set a maximum charge per run in the run options if you want a hard cap; the Actor stops cleanly when it is reached.

### Integrations, scheduling and API

- **Apify API:** start runs and read results over REST, or with the JavaScript and Python clients. Every run's results are at `/datasets/{id}/items` in JSON, CSV, Excel, XML or RSS.
- **Schedules:** run it hourly, daily or weekly in Apify Schedules. Pair a schedule with **Only new results** and **Upload date = Today** to get a daily feed of new videos for your keywords.
- **Make, n8n and Zapier:** use the Apify modules/nodes to send new results to Slack, email, Notion, Airtable or a CRM.
- **Google Sheets:** export a dataset straight to a sheet, or append new rows on every scheduled run.
- **Webhooks:** call your own endpoint when a run finishes.
- **MCP for AI agents:** AI agents (Claude, ChatGPT, Cursor and others) can call this Actor through Apify's MCP server to search YouTube on demand.

### FAQ

#### Why not use the official YouTube Data API?

The YouTube Data API needs a Google Cloud project and an API key, and every `search.list` call costs 100 quota units out of a default 10,000 units per day, which is about 100 searches a day before you have to request more quota. This Actor reads the same public search results page anyone sees on youtube.com, so there is no key, no quota and no daily cap; you pay only per saved result.

#### Is this a YouTube search API?

It works like one: send keywords and filters to the Apify API, get structured JSON back. It is not an official Google product.

#### What are the alternatives?

Other YouTube search Actors on the Apify Store, the official YouTube Data API (quota-limited), or broader YouTube scrapers such as [streamers/youtube-scraper](https://apify.com/streamers/youtube-scraper). This Actor is focused on search: all of YouTube's search filters, rank, monitoring mode and a low per-result price.

#### How do I monitor new YouTube videos for a keyword?

Turn on **Only new results since the last run**, set **Upload date** to Today or This week, and add an Apify Schedule. Each run looks at the top results (up to Max results per keyword) and saves only the ones it has not delivered before for that keyword and filter combination.

#### Can I do YouTube keyword research and rank tracking with it?

Yes. Every row has `rank` (position in YouTube's results), `viewCount`, `publishedAt` and the channel, so you can see which videos and channels own a keyword, how fresh the top results are and how your own videos rank over time.

#### Can I get only Shorts, only channels or only playlists?

Yes, set **Result type**. Shorts always come back with title, view count, link and thumbnail; YouTube mostly serves them in a compact Shorts layout, so channel, duration and publish time are filled only for the Shorts YouTube shows in the full layout (in our tests about 1 in 25). Channels come with subscriber counts and handles, playlists with their video count.

#### Is it legal to scrape YouTube search results?

The Actor collects only publicly visible search result data, without logging in. Whether and how you may use that data depends on your jurisdiction and purpose (for example personal data rules such as GDPR and YouTube's Terms of Service). If unsure, ask a lawyer.

#### Why did a keyword return fewer results than I asked for?

YouTube stops showing results for narrow searches (for example "Last hour" plus a rare keyword). The Actor saves everything YouTube shows and does not charge for what is not there. A keyword with nothing at all gets a free `no-results` row.

#### Why is `publishedAt` approximate?

YouTube search shows only relative times such as "3 weeks ago". The Actor converts that to an ISO date at scrape time and tells you how precise it is in `publishedAtPrecision` (minute, hour, day, week, month or year).

#### Something went wrong. What should I check?

Look at the rows with `status` other than `ok` and at the run log. If YouTube refuses the run's connection, the Actor retries on a fresh proxy session and stops early after several keywords in a row fail, so a blocked run cannot burn your credit.

### Limits

- **Upload date and Popularity are YouTube's own filters, applied loosely by YouTube:** a few older but very relevant results can still appear with "Last hour" or "Today", and "Popularity" puts high-view results first but is not a strict view-count sort. YouTube's old "Upload date" and "Rating" sort orders no longer work on youtube.com, so they are not offered.
- **Channel video counts:** YouTube's search page no longer shows a channel's video count, so `videoCount` is usually empty for channels. Use [YouTube Channel Scraper](https://apify.com/hridayrungta/youtube-channel-scraper) for full channel stats.
- **No like counts, comments or full descriptions:** search pages do not show them. Use [YouTube Scraper](https://apify.com/hridayrungta/youtube-scraper) for video details or [YouTube Comments Scraper](https://apify.com/hridayrungta/youtube-comments-scraper) for comments.
- **Shorts usually have fewer fields:** YouTube serves most Shorts results in a compact layout with only title, views, link and thumbnail. Use [YouTube Shorts Scraper](https://apify.com/hridayrungta/youtube-shorts-scraper) for full Shorts data from a channel.
- **Non-English interface languages:** counts are still read, but `publishedAt` may be empty.
- Results reflect what YouTube shows a logged-out visitor in the chosen country at that moment; personalised results cannot be reproduced.

### Related Actors

- [YouTube Scraper](https://apify.com/hridayrungta/youtube-scraper): video details, channel videos, search and comments in one Actor.
- [YouTube Channel Scraper](https://apify.com/hridayrungta/youtube-channel-scraper): channel stats and full video lists.
- [YouTube Transcript Scraper](https://apify.com/hridayrungta/youtube-transcript-scraper): video transcripts and subtitles as text.
- [YouTube Shorts Scraper](https://apify.com/hridayrungta/youtube-shorts-scraper): Shorts from channels with views and dates.
- [YouTube Comments Scraper](https://apify.com/hridayrungta/youtube-comments-scraper): comments and replies for any video.
- [streamers/youtube-scraper](https://apify.com/streamers/youtube-scraper): a broad third-party YouTube scraper.

# Actor input Schema

## `keywords` (type: `array`):

One search per line, exactly as you would type it into YouTube's search bar. Each keyword is searched separately.

## `maxResultsPerKeyword` (type: `integer`):

How many results to save for each keyword. YouTube shows about 20 per page; the scraper pages on until this number is reached or YouTube runs out of results. You pay per saved result. In only-new mode this is how deep the scraper looks (the top N results).

## `resultType` (type: `string`):

YouTube's "Type" filter. "All" returns the normal mix (mostly videos, sometimes channels and playlists). Shorts results usually carry title, views, link and thumbnail only.

## `uploadDate` (type: `string`):

YouTube's "Upload date" filter. YouTube applies it loosely: a few older but very relevant results can still appear.

## `duration` (type: `string`):

YouTube's "Duration" filter (videos only).

## `features` (type: `array`):

YouTube's "Features" filter. Pick one or more; YouTube returns only results that have all of them.

## `sortBy` (type: `string`):

YouTube's "Prioritize" option: Relevance (default order) or Popularity (most viewed first).

## `country` (type: `string`):

Two-letter country code that YouTube uses to localise results, e.g. US, GB, IN, DE, BR.

## `language` (type: `string`):

YouTube interface language code, e.g. en, de, es, pt-BR. Keep "en" for the most complete date parsing (publishedAt).

## `includeShortsShelves` (type: `boolean`):

YouTube mixes "Shorts" shelves into normal results. Off (default): only regular results are saved. On: Shorts from those shelves are saved too, with fewer fields (title, views, link, thumbnail). Shelves are always read when Result type is Shorts or Duration is Under 3 minutes, because YouTube puts most of those results only in shelves.

## `onlyNewResults` (type: `boolean`):

Monitoring mode. The scraper checks the top results for each keyword (up to "Max results per keyword") and saves only the ones it has not delivered before for that keyword + filter combination. What was delivered is remembered in a key-value store in your account. Combine with an Apify Schedule and Upload date = Today or This week to track new videos on a topic.

## `monitorStoreName` (type: `string`):

Name of the key-value store that remembers delivered results in monitoring mode. Use a different name to keep separate watch lists. Leave empty for "youtube-search-monitor".

## Actor input object example

```json
{
  "keywords": [
    "lofi music",
    "how to make sourdough bread"
  ],
  "maxResultsPerKeyword": 20,
  "resultType": "all",
  "uploadDate": "any",
  "duration": "any",
  "features": [],
  "sortBy": "relevance",
  "country": "US",
  "language": "en",
  "includeShortsShelves": false,
  "onlyNewResults": false,
  "monitorStoreName": ""
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "lofi music",
        "how to make sourdough bread"
    ],
    "maxResultsPerKeyword": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("hridayrungta/youtube-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": [
        "lofi music",
        "how to make sourdough bread",
    ],
    "maxResultsPerKeyword": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("hridayrungta/youtube-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "lofi music",
    "how to make sourdough bread"
  ],
  "maxResultsPerKeyword": 20
}' |
apify call hridayrungta/youtube-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hridayrungta/youtube-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gGPhwJLLoRzBa6AR0/builds/FNmvNlEG4HnNmHDOk/openapi.json
