# YouTube Search Scraper — Videos, Shorts, Channels & Playlists (`valev-lab/youtube-search-scraper`) Actor

Scrape YouTube search results by keyword: videos, Shorts, channels and playlists. Export views, subscribers, dates and rankings to CSV, Excel or JSON. Filter by country, language, duration or views. Add likes, descriptions and tags, or monitor unseen matches. No YouTube API key.

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

## Pricing

from $0.50 / 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 — Videos, Shorts, Channels & Playlists by Keyword, No API Key

### What does YouTube Search Scraper do?

**YouTube Search Scraper finds public videos, Shorts, channels and playlists by keyword and exports their data to CSV, Excel or JSON.** Use it as a [YouTube](https://www.youtube.com) search API alternative for keyword research, influencer discovery, content planning and repeat monitoring. No YouTube API key or YouTube login is required.

Collect titles, URLs, views, subscribers, duration, publish dates and displayed badges. Search multiple keywords together: **one result keeps every matched query and its original candidate rank, with one result charge.** Add likes, full descriptions and tags when needed. **Monitor mode remembers delivered IDs per keyword and returns unseen matches on later runs.**

#### Try a five-result search

Start with one keyword and five videos, then increase the limit after reviewing the output:

```json
{
  "searchQueries": ["python tutorial"],
  "resultType": "videos",
  "maxResultsPerQuery": 5
}
```

At the configured rates, this basic sample has **$0.00405 in Free-plan event charges**, including one start. See the Input tab for the full form. The saved API example and Console prefill use five results; ordinary keyword inputs that omit the limit default to 50.

#### At a glance

| | |
| --- | --- |
| **Input** | Multiple keywords; videos, Shorts, channels, playlists or all four |
| **Pagination** | InnerTube search continuation tokens; up to 500 matching results per query |
| **Native filters** | Upload window, result type, duration, features, relevance/popularity |
| **Local filters** | Minimum video views, minimum channel subscribers, publish-date cutoff and exact requested duration boundaries |
| **Localization** | YouTube country `gl` and interface language `hl` |
| **Optional details** | Available likes, full description, tags and exact available video counts/dates |
| **Monitoring** | Named persistent store; per-keyword history; no fee for already-seen IDs |
| **Cost control** | Successful unique results only; combined result/details fee checked against the run's maximum charge |

### Why scrape YouTube search results?

- **Keyword research:** compare the titles, formats, views and ages of videos competing for a topic. Retain overlapping keyword matches without duplicating rows.
- **Influencer discovery:** search channels directly, filter by public subscribers and pass shortlisted creators to our [YouTube Channel Scraper](https://apify.com/valev-lab/youtube-channel-scraper) for profiles, About links and upload catalogues.
- **Content gap analysis:** compare long videos, Shorts and playlists across related phrases to find under-covered topics and formats.
- **Topic monitoring:** schedule the same keywords and deliver only IDs the workflow has not saved before. Newly discovered can include older content.

Use Apify schedules, webhooks, the API and integrations with Google Sheets, Make, Zapier and n8n. Video rows link to our [YouTube Transcript Scraper](https://apify.com/valev-lab/youtube-transcript-scraper) for captions and [YouTube Comments Scraper](https://apify.com/valev-lab/youtube-comments-scraper) for audience research. This Actor exports metadata; the companion tools run separately.

### How to scrape YouTube search by keyword

1. Add keywords to `searchQueries`.
2. Choose a `resultType` and set `maxResultsPerQuery` (normally 50; maximum 500).
3. Optionally configure country, language, filters, video details or monitoring.
4. Run the Actor and inspect the Videos, Channels and Playlists dataset views.
5. Download the dataset as JSON, HTML, CSV or Excel, or retrieve it through the Apify API.

The views select columns from the **same mixed dataset**. Filter `type` downstream for separate tables: `video`/`short`, `channel` or `playlist`. Free `info` and `error` diagnostics can also appear.

### Ready-to-use YouTube search workflows

Use a saved example task or open a prefilled Actor input below, replace its keywords and run it. Each workflow addresses a different research job; none creates a recurring schedule automatically.

| Task | Research job | Starting workload |
| --- | --- | --- |
| [**Export YouTube search results to CSV**](https://apify.com/valev-lab/youtube-search-scraper/examples/youtube-search-export-csv) | Build a keyword result list for a spreadsheet or database | One keyword, up to 50 videos |
| [**Find YouTube Shorts by keyword**](https://apify.com/valev-lab/youtube-search-scraper/examples/youtube-shorts-keyword-research) | Compare short-form ideas, titles and public reach | One keyword, up to 50 Shorts |
| [**Find YouTube channels by keyword and subscribers**](https://apify.com/valev-lab/youtube-search-scraper/examples/youtube-channel-finder-by-keyword) | Shortlist creators for influencer research | Up to 50 channels with at least 10K visible subscribers |
| [**Search YouTube playlists and courses**](https://apify.com/valev-lab/youtube-search-scraper/examples/youtube-playlist-keyword-search) | Discover educational collections and competing course topics | One keyword, up to 25 playlists |
| [**YouTube content-gap research**](https://console.apify.com/actors/valev-lab~youtube-search-scraper/input?prefill=%7B%22proxyConfiguration%22%3A%7B%22useApifyProxy%22%3Atrue%7D%2C%22searchQueries%22%3A%5B%22ai%20agents%22%2C%22autonomous%20agents%22%5D%2C%22resultType%22%3A%22videos%22%2C%22maxResultsPerQuery%22%3A25%2C%22filters%22%3A%7B%22duration%22%3A%22long%22%2C%22sortBy%22%3A%22views%22%7D%2C%22minViews%22%3A1000%7D) | Compare long-form coverage and shared keyword matches in your own analysis | Two keywords, up to 25 matches each, videos over 20 minutes |
| [**Monitor unseen YouTube search results**](https://console.apify.com/actors/valev-lab~youtube-search-scraper/input?prefill=%7B%22proxyConfiguration%22%3A%7B%22useApifyProxy%22%3Atrue%7D%2C%22searchQueries%22%3A%5B%22ai%20agents%22%5D%2C%22resultType%22%3A%22videos%22%2C%22maxResultsPerQuery%22%3A25%2C%22monitorMode%22%3Atrue%2C%22monitorStoreName%22%3A%22youtube-search-monitor-example%22%7D) | Collect results the workflow has not saved before | One keyword, up to 25 unseen IDs, named history store |
| [**Search with video details**](https://console.apify.com/actors/valev-lab~youtube-search-scraper/input?prefill=%7B%22proxyConfiguration%22%3A%7B%22useApifyProxy%22%3Atrue%7D%2C%22searchQueries%22%3A%5B%22python%20tutorial%22%5D%2C%22resultType%22%3A%22videos%22%2C%22maxResultsPerQuery%22%3A20%2C%22includeVideoDetails%22%3Atrue%7D) | Analyze available likes, full descriptions and tags | One keyword, up to 20 enriched videos |
| [**Search by country and language**](https://console.apify.com/actors/valev-lab~youtube-search-scraper/input?prefill=%7B%22proxyConfiguration%22%3A%7B%22useApifyProxy%22%3Atrue%7D%2C%22searchQueries%22%3A%5B%22%D1%80%D0%B5%D1%86%D0%B5%D0%BF%D1%82%D0%B8%22%5D%2C%22resultType%22%3A%22videos%22%2C%22maxResultsPerQuery%22%3A25%2C%22gl%22%3A%22BG%22%2C%22hl%22%3A%22bg%22%7D) | Research a localized market | Bulgarian recipes example, BG/bg hints, up to 25 videos |

The content-gap preset exports evidence for your analysis; it does not calculate a gap score. Country/language settings are search hints, not creator-country filters. Result caps are shared across types for each query and may exceed the unique row count when keywords overlap.

### How much does it cost?

The **pay-per-event prices are configured** below; check the Pricing tab before running. Free means the Apify Free plan, not zero cost. A result is one successfully saved unique video, Short, channel or playlist. Private cloud tests verified start, result and details events, free diagnostic/duplicate/seen-ID paths and a low spending cap.

| Event | Free | Bronze | Silver | Gold and above |
| --- | ---: | ---: | ---: | ---: |
| `apify-actor-start`, per standard start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |
| `search-result`, per unique saved result, any type | $0.0008 | $0.0007 | $0.0006 | $0.0005 |
| `video-details`, per successfully detailed video/Short | +$0.0007 | +$0.0007 | +$0.0007 | +$0.0007 |

**1,000 basic results: $0.80005 Free / $0.50005 Gold+.** With details on all 1,000 videos: **$1.50005 / $1.20005**. These event estimates include one standard start. Standard run compute and proxy usage are covered by the configured PPE model; account-level storage/export charges follow Apify’s plan terms. The start event scales with allocated memory (minimum one event); the Actor never charges it manually.

Errors, duplicates, filtered-out results, empty searches and already-seen monitor results have no custom result/details event. A failed enrichment becomes a free diagnostic. Hidden likes are `null`. A unique video matched by five keywords incurs one result event and at most one details event.

The Actor checks the combined result + details price before delivery. Set Apify's **maximum total charge** to limit event spending. The default dataset-item event must stay disabled so info and errors remain free.

#### Prices compared with other YouTube search Actors

Public Store API prices checked **10 November 2026**; this table compares event rates, not measured reliability or identical feature bundles. Competitor README text can lag their active price configuration. Compare the total price and included fields for your workload; billing units and plan discounts differ.

| Actor | Free → Gold, per 1,000 | Start | Scope |
| --- | ---: | ---: | --- |
| **This Actor** | **$0.80 → $0.50**; details +$0.70 | $0.00005 | Four types, all query matches, persistent per-keyword monitoring |
| [API Ninja YouTube Search](https://apify.com/api-ninja/youtube-search-scraper/pricing) | $5.00 → $0.50 | $0.01 | Multiple search types and detail modes |
| [Zebu YouTube Search](https://apify.com/delicious_zebu/youtube-video-scraper-by-keyword/pricing) | $1.20 → $0.50 | $0.00005 | Videos/Shorts, richer video and channel statistics |
| [Maxime Dupré Channel Search](https://apify.com/maximedupre/youtube-channel-search-scraper/pricing) | $1.00 → $0.40 channels | No listed start event | Channel discovery; channel profiles and first-match evidence |

The API Ninja active public price schedule is $0.005 per Free result and $0.0005 on paid plans; its README showed older lower amounts when checked. Verify current prices before comparing a large workload. No competitor was run as a paid benchmark during development.

### Input example

```json
{
  "searchQueries": ["ai agents", "autonomous agents"],
  "resultType": "videos",
  "maxResultsPerQuery": 50,
  "filters": {
    "uploadDate": "week",
    "duration": "long",
    "sortBy": "views",
    "features": ["subtitles"]
  },
  "minViews": 1000,
  "gl": "US",
  "hl": "en",
  "includeVideoDetails": false,
  "monitorMode": false,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

See the Input tab for every option. Example files include the five acceptance workloads.

| Option | Default | Meaning |
| --- | --- | --- |
| `searchQueries` | Five-result sample when empty | Up to 100 nonempty keywords; repeated keywords are searched once |
| `resultType` | `videos` | `videos`, `shorts`, `channels`, `playlists`, `all` |
| `maxResultsPerQuery` | 50 | 1–500 matching unseen IDs; shared across types for each query |
| `filters.uploadDate` | None | `hour`, `today`, `week`, `month`, `year`; hour also checked locally |
| `filters.duration` | None | `short` (<240s), `medium` (240–1200s), `long` (>1200s); `<4m`, `4–20m`, `4-20m`, `>20m` also accepted |
| `filters.sortBy` | `relevance` | `relevance`, `views`, `date`, `rating`; date/rating limitations below |
| `filters.features` | `[]` | `live`, `4K`, `HD`, `subtitles`, `CC`, `creative commons`; combined as native filters |
| `minViews` | 0 | Local video/Short filter; use details for exact available counts |
| `minSubscribers` | 0 | Local channel filter; hidden counts excluded when positive |
| `dateFrom` | None | Inclusive UTC `YYYY-MM-DD` video cutoff |
| `gl`, `hl` | `US`, `en` | YouTube country/interface-language hints, independent of proxy country |
| `includeVideoDetails` | false | Shared player/watch enrichment on videos/Shorts; extra event |
| `monitorMode` | false | Only results not delivered before for this exact query in the named store |
| `monitorStoreName` | `youtube-search-scraper-monitor` | Persistent named store; choose a different name per independent workflow |
| `proxyConfiguration` | Apify Proxy | Datacenter first with per-request residential fallback; explicit direct/custom/residential choices respected |

With no keywords, the credential-free local health check searches `python tutorial` for five basic videos. Ordinary keyword inputs default to 50. Its local HTTP policy is two 5-second attempts with a short backoff; cloud/ordinary jobs use the shared YouTube retry ladder and can take longer under blocks. The measured local health run completed in 1.329 seconds. A private validation run returned five videos in 8.402 seconds at 256 MB; a subsequent PPE check on build 1.0.2 completed in 4.803 seconds. A 200-video date-search test took 95.430 seconds, including search traversal and serial dataset delivery. These are observed examples, not completion-time guarantees; larger or detail-heavy jobs may need a longer run timeout.

#### Native filter changes and precise duration boundaries

YouTube currently exposes **under 3 minutes, 3–20 minutes and over 20 minutes**, plus relevance and popularity. This Actor preserves the requested **4-minute** boundaries: under-four searches use no narrower native duration filter, medium uses native 3–20 plus local >=4, and long uses native >20 plus a local check. `CC` means closed captions/subtitles; choose `creative commons` for the license filter.

The historical `sp` encodings for hour, date and rating are accepted as input but are no longer listed in the current menu. Hour results are checked against the local one-hour cutoff. **Date sort orders available dates locally within up to the first 500 unique candidates; it cannot guarantee the globally newest videos on YouTube.** Original query ranks remain in `rank`/`matches`; sorting changes row order. **Rating sort sends the legacy parameter but cannot promise rating order.** The run summary records these limits. `views` follows YouTube's current popularity ranking, which is not guaranteed to be a pure numeric view-count sort.

Video filters apply to videos/Shorts. Channel and playlist searches remain meaningful in `all` mode even when duration/date/features are set. The four typed searches are interleaved so an early video page does not consume the whole mixed limit. There are naturally no >20-minute Shorts. Mixed traversal ranks are not the ranking of a single unfiltered YouTube page.

### What data does it extract?

| Type | Fields |
| --- | --- |
| Every result | `type`, `title`, `url`, first `query`, every matched `queries`, query-specific `matches: [{query, rank}]`, `rank`, `isNew`, `scrapedAt` |
| Video / Short | `videoId`, `channelName`, `channelId`, `channelUrl`, `isVerifiedChannel`, `publishedAt`, `publishedAtIsApproximate`, `publishedTimeText`, `durationSec`, `viewCount`, `thumbnail`, `descriptionSnippet`, `badges`, `isLive`, `transcriptActorUrl`, `commentsActorUrl` |
| Optional video details | `likeCount`, `description`, `tags`; exact available counts/dates replace card estimates |
| Channel | `channelId`, `handle`, `subscriberCount`, `videoCount`, `description`, `avatar`, `isVerified`, `channelActorUrl` |
| Playlist | `playlistId`, `channelName`, `videoCount`, `thumbnail` |

Missing public values are `null`, and absent badge/tag lists are empty arrays. Many modern channel search cards show subscribers but omit the number of uploads: `videoCount` stays `null`. Shorts lack channel/date/duration on their cards, so the shared HTTP player supplies available base fields even when paid details are off. Verification flags reflect badges shown in the search response.

Illustrative shortened records:

```json
[
  {"type":"video","videoId":"abcdefghijk","title":"Example tutorial","query":"python tutorial","queries":["python tutorial","learn python"],"matches":[{"query":"python tutorial","rank":1},{"query":"learn python","rank":4}],"rank":1,"viewCount":1200000,"durationSec":1800,"publishedAtIsApproximate":true,"isNew":null},
  {"type":"channel","channelId":"UCabcdefghijklmnopqrstuv","title":"Example Creator","handle":"@example","subscriberCount":12000,"videoCount":null,"query":"python","rank":2},
  {"type":"playlist","playlistId":"PLexample","title":"Example course","videoCount":12,"query":"python","rank":3}
]
```

`RUN_SUMMARY` records query pages, candidates, matched IDs, errors, duplicate/seen skips, request counts, measured body bytes, proxy mode, escalations, timing and reference event-cost estimates. A valid empty or fully filtered query writes a free `type: "info"` row. Failed pages produce free `type: "error"` diagnostics; valid results from successful pages can still be delivered. A run fails if it can deliver nothing and has errors.

### Monitoring and pagination

Reuse the same named store between scheduled runs. History is scoped to the **exact keyword**; changing case creates a separate query history. Types and locale share that keyword's history within the store. Only successfully saved IDs are remembered. A repeated ID matched by a newly added keyword can be new to that keyword, but it is still charged once per run.

Rows are buffered until all keywords finish so every matching query can be retained. Matching is bounded by each query's result limit, available continuations, failures and the spending limit. Tight local filters or many seen IDs can require many pages. There is no promise YouTube will supply 500 matches. Repeated tokens fail explicitly instead of looping or pretending the search was complete.

Avoid overlapping jobs against the same store: named stores do not provide an atomic cross-run lock. Locally, purge clears the default storage; named-store cleanup can also remove your history. Keep monitoring storage between repeat tests. Local data is never uploaded automatically.

### Use the YouTube search scraper API with Python or JavaScript

Call `valev-lab/youtube-search-scraper` through the [Apify API](https://docs.apify.com/api/v2) or `apify-client`. Keep your Apify token in an environment variable; a YouTube API key is unnecessary.

#### JavaScript: find channels by keyword

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('valev-lab/youtube-search-scraper').call({
    searchQueries: ['crypto news'],
    resultType: 'channels',
    maxResultsPerQuery: 50,
    minSubscribers: 10000,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const channels = items.filter(item => item.type === 'channel');
```

`listItems()` returns one page; paginate larger datasets. Schedules and API access are provided by Apify. Use your Apify API token for programmatic calls. The saved example tasks provide ready-to-run research presets.

#### Python: export keyword search results

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("valev-lab/youtube-search-scraper").call(run_input={
    "searchQueries": ["python tutorial"],
    "resultType": "videos",
    "maxResultsPerQuery": 5,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["type"] in ("video", "short"):
        print(item["title"], item["url"], item["viewCount"])
```

The Python iterator paginates automatically. An Apify API token is required for programmatic calls; it is separate from a YouTube Data API key.

#### Use YouTube search with AI agents and MCP

Use this Actor as a tool through the [Apify MCP server](https://docs.apify.com/mcp). Select `valev-lab/youtube-search-scraper`, authenticate to Apify and pass the same input fields. Tool-selection URL: `https://mcp.apify.com?tools=valev-lab/youtube-search-scraper`.

For traceable research, retain `url`, `query`, `queries`, `matches` and `scrapedAt` when passing results to an assistant or report. `queries` preserves keyword overlap without duplicate rows. Follow `transcriptActorUrl` for source captions, `commentsActorUrl` for audience discussion and `channelActorUrl` for creator profiles; companion runs have separate prices. External-assistant invocation has not been benchmarked here.

### Measured private validation

Twelve private cloud checks on runtime build 1.0.1 delivered **455 results with no error rows**, including videos, Shorts, channels, playlists, Bulgarian search, overlapping keywords and monitoring. Six automatic datacenter-to-residential escalations recovered successfully. The monitor test returned 35 results and then zero new IDs. Peak observed memory was about 113 MiB with a 256 MB allocation.

These measurements describe the tested workloads, not a sustained reliability SLA. Search output and timing depend on YouTube availability, IP route, local filters, requested details and dataset delivery. Public fields can be hidden, rounded or missing.

### FAQ

#### Does this require a YouTube API key?

No. It uses public YouTube HTTP endpoints and the shared InnerTube client. Programmatic Apify runs still require your Apify token. It does not use a browser or a paid upstream API.

#### How do I get all result types in one YouTube search dataset?

Set `resultType` to `all`. The Actor interleaves typed searches for videos, Shorts, channels and playlists, then merges stable IDs into one dataset. `maxResultsPerQuery` is shared across those types; `type` identifies each result.

#### What does the search rank mean?

`rank` is the one-based candidate position before local filters, seen-ID exclusions and deduplication. It belongs to the first matched query; `matches` retains each matched query’s rank. Mixed-type traversal ranks are not the ranking of a single unfiltered YouTube page.

#### Does this use my YouTube Data API quota?

No. It reads public search metadata without using your YouTube Data API key or Google API quota. YouTube can still rate-limit or restrict results; the Actor reports page failures and retries through its proxy transport.

#### Can I search channels and filter by subscribers?

Yes. Choose `channels` or `all` and set `minSubscribers`. Abbreviations such as `12K subscribers` become 12,000. These are rounded public counts, and channels with hidden counts are skipped when a threshold is set. Use the Channel Actor link for richer profile research.

#### Can I get 500 results from every keyword?

500 is a maximum, not a guarantee. The Actor follows continuation tokens until the matching-result limit, end of results, spending limit or an explicit page error. Search availability, filters and monitor history can reduce the result count.

#### Are publish dates and counts exact?

Relative ages such as “3 days ago” become approximate UTC timestamps and are flagged. English and Bulgarian age/count labels are parsed; other unsupported age labels remain null unless player metadata provides a date. Player details can replace rounded video counts and estimates with exact available values. A day-only date means midnight UTC, not an exact upload time. Subscriber abbreviations remain rounded.

#### Does monitor mode return only newly uploaded videos?

It returns IDs unseen by that exact keyword's history. Older content can appear for the first time or match changed filters. The first monitor run collects a backlog up to the matching limit. Only IDs saved to the dataset advance history.

#### What happens when no results match?

A free info item explains that no matching unseen results were available. There is no search-result or video-details fee. The platform start event and ordinary resource usage can still apply.

#### Are 99% reliability and competitor superiority proven?

The private cloud sample passed 12 checks with no error rows, including six successful proxy escalations. Sustained 99%+ production reliability and an equivalent competitor benchmark have not been established. The pricing table compares published event rates and scope, not measured competitor success.

#### How are blocks and proxies handled?

The shared transport retries with exponential backoff and rotates sessions, then retries a failed datacenter request through residential proxy. User-selected custom proxies, direct HTTP or residential settings are respected. Local runs without external proxy access fall back to direct HTTP and report that route. Byte measurements cover request and response bodies, not TLS/header overhead or the proxy provider's final invoice.

#### Where do transcripts and comments come from?

Open the prefilled `transcriptActorUrl` or `commentsActorUrl` in a video row. Those companion Actors run separately with their own pricing. Channel results similarly link to the [YouTube Channel Scraper](https://apify.com/valev-lab/youtube-channel-scraper).

#### Where can I get help?

Use the Issues tab with the run ID, a sanitized input and the expected behavior. Use the API tab for integration examples. Collect only public data you have a legitimate reason to process, and respect YouTube's terms and applicable privacy requirements.

# Actor input Schema

## `searchQueries` (type: `array`):

Add one keyword or phrase per entry. Empty keywords use the five-video sample health check.

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

All interleaves four typed searches; the result limit is shared.

## `maxResultsPerQuery` (type: `integer`):

Matching unseen results per query, across selected types. YouTube may expose fewer. No-input health check uses five.

## `filters` (type: `object`):

Optional search filters, for example {"uploadDate":"week","duration":"long","sortBy":"views","features":\["subtitles"]}. Video filters do not constrain channel/playlist results in all mode.

## `minViews` (type: `integer`):

Local filter on videos/Shorts. Counts can be rounded without video details.

## `minSubscribers` (type: `integer`):

Local filter on channel results. Missing public counts are excluded when this is positive.

## `dateFrom` (type: `string`):

Inclusive YYYY-MM-DD local video filter. Relative dates are estimates; unsupported localized dates stay null.

## `gl` (type: `string`):

Two-letter YouTube country hint; does not change the proxy location.

## `hl` (type: `string`):

YouTube interface language. English and Bulgarian relative dates/count units are parsed; other unavailable dates use shared player metadata.

## `includeVideoDetails` (type: `boolean`):

Add available likes, full description and tags to video/Short results. Adds the video-details fee only to successfully enriched results.

## `monitorMode` (type: `boolean`):

Remember successfully delivered result IDs per exact keyword in a named store. First run delivers the matching backlog.

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

Reuse for scheduled runs. Use separate names for independent workflows and avoid overlapping runs.

## `proxyConfiguration` (type: `object`):

Apify datacenter first with residential fallback through the shared YouTube transport. Explicit direct, custom and residential settings are respected.

## Actor input object example

```json
{
  "searchQueries": [
    "python tutorial"
  ],
  "resultType": "videos",
  "maxResultsPerQuery": 5,
  "filters": {
    "sortBy": "relevance",
    "features": []
  },
  "minViews": 0,
  "minSubscribers": 0,
  "gl": "US",
  "hl": "en",
  "includeVideoDetails": false,
  "monitorMode": false,
  "monitorStoreName": "youtube-search-scraper-monitor",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Mixed result types and free diagnostics.

## `videos` (type: `string`):

Columns of the same mixed dataset; views do not filter row types.

## `channels` (type: `string`):

Columns of the same mixed dataset; views do not filter row types.

## `playlists` (type: `string`):

Columns of the same mixed dataset; views do not filter row types.

## `summary` (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 = {
    "searchQueries": [
        "python tutorial"
    ],
    "maxResultsPerQuery": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("valev-lab/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 = {
    "searchQueries": ["python tutorial"],
    "maxResultsPerQuery": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("valev-lab/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 '{
  "searchQueries": [
    "python tutorial"
  ],
  "maxResultsPerQuery": 5
}' |
apify call valev-lab/youtube-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,valev-lab/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/oBQeXljEZP8tmjdWo/builds/6R8yfeJA2DscHHOgE/openapi.json
