# YouTube Search Scraper - Results with All Filters (`dataspace/youtube-search-scraper`) Actor

Scrape YouTube search results with every filter YouTube offers: videos, Shorts, channels, playlists or movies, upload date, duration, 4K, HD, subtitles, Creative Commons, live and more. Views, duration, channel, publish time. No API key.

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

## Pricing

from $0.85 / 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.

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

Scrape YouTube search results with **every filter YouTube offers** — videos, **Shorts**, channels, playlists or movies; upload date; duration; **4K, HD, Subtitles/CC, Creative Commons, Live, 360°, VR180, 3D, HDR, Location**; relevance, popularity or newest first. Results come in YouTube's own order with views, duration, channel and publish time. No API key, no quota.

- ✅ **All of YouTube's search filters**, including the new Shorts type and duration ranges
- ✅ **Keyword research and rank tracking** — `position` tells you where each video ranks for a query
- ✅ **Fast** — hundreds of results per minute; turn on details only when you need likes and comments
- ✅ **$0.85 per 1,000 results**, platform usage included

### What data do you get?

| Type | Fields |
|---|---|
| Video (`type: "video"`) | `title`, `url`, `videoId`, `channelName`, `channelId`, `channelUrl`, `isVerifiedChannel`, `viewCount`, `durationText`, `durationSeconds`, `publishedTimeText`, `descriptionSnippet`, `badges` (4K, CC, New…), `isLive`, `thumbnailUrl` |
| Short (`type: "short"`) | `title`, `url`, `videoId`, `viewCount`, `thumbnailUrl` |
| Channel (`type: "channel"`) | `name`, `handle`, `url`, `subscriberCount`, `descriptionSnippet`, `avatarUrl`, `isVerified` |

Need full channel statistics (number of videos, total views, join date, country, links)? Use the [YouTube Channel Scraper](https://apify.com/dataspace/youtube-channel-scraper) with *Search keywords* — it finds channels for a keyword and returns their complete stats.

| Playlist (`type: "playlist"`) | `title`, `url`, `playlistId`, `playlistType` (playlist / course), `channelName`, `videoCount` |
| Every result | `searchQuery`, `position`, `scrapedAt` |
| With **Add video details** | `likeCount`, `commentCount`, `publishedAt` (exact date), `description`, `hashtags`, `channelSubscriberCount` |

### How to use

1. Enter one or more **search queries**.
2. Pick the **type** and any filters, exactly as on YouTube.
3. Set **Max results per query** and click **Start**.

### Example input

```json
{
  "searchQueries": ["home workout", "yoga for beginners"],
  "maxResultsPerQuery": 100,
  "type": "videos",
  "sortBy": "popularity",
  "uploadDate": "month",
  "duration": "3to20",
  "features": ["hd", "subtitles"]
}
```

### Example output (real result, shortened)

```json
{
  "type": "playlist",
  "title": "Python Tutorial 2026 | Complete Python Course (Beginner to Advanced) | Telusko",
  "url": "https://www.youtube.com/playlist?list=PLsyeobzWxl7omDoEYrrf3oXvXxa6MPgek",
  "playlistType": "playlist",
  "channelName": "Telusko",
  "videoCount": 54,
  "searchQuery": "python tutorial",
  "position": 1
}
```

### Pricing

Pay per result: **$0.85 per 1,000 results**, plus a tiny start fee of $0.00005 per run. Platform usage (compute and proxies) is included — you are not charged anything else.

| Example | Cost |
|---|---|
| top 100 videos for 10 keywords | $0.85 |
| daily rank tracking of 50 keywords × 20 results | ~$0.85 per day |

Set a maximum cost for a run and the Actor stops when it is reached.

### Use it via API

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("dataspace/youtube-search-scraper").call(run_input={
    "searchQueries": ["ai agents tutorial"],
    "maxResultsPerQuery": 50,
    "uploadDate": "week",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["position"], item["title"], item["viewCount"])
```

### Use cases

- **YouTube SEO and rank tracking** — schedule daily runs and follow the `position` of your videos for each keyword.
- **Content research** — find what is popular this week for a topic and in which length.
- **Creator discovery** — search with type **Channels** to list channels for a niche.
- **Course and playlist research** — type **Playlists** returns playlists and YouTube courses with their video counts.
- **Creative Commons footage** — combine the Creative Commons filter with your topic.

### Integrations and AI agents

Export to Excel, CSV or JSON, send results to Google Sheets, Make, Zapier, n8n or webhooks, run on a schedule, or let an AI agent search YouTube through the Apify MCP server.

### FAQ

**Do I need a YouTube API key?** No, and there are no daily API quotas.

**How many results can I get per query?** As many as YouTube shows when you keep scrolling — usually a few hundred.

**Is it legal?** The Actor collects only publicly visible search results without logging in and without bypassing any protection. It does not collect comments, commenter names or e-mail addresses. You are responsible for using the data in line with applicable laws and YouTube's terms.

**Missing a feature?** Open an issue on the Issues tab — feedback is welcome.

### More scrapers by dataspace

- [YouTube Channel Scraper](https://apify.com/dataspace/youtube-channel-scraper) — channel stats plus latest or popular videos
- [YouTube Scraper](https://apify.com/dataspace/youtube-video-channel-scraper) — search, channels and single videos with full details
- [Google Trends Scraper](https://apify.com/dataspace/google-trends-scraper) — YouTube search interest over time
- [Google Maps Scraper](https://apify.com/dataspace/google-maps-scraper) — local businesses with phones and websites
- [Google News Scraper](https://apify.com/dataspace/google-news-scraper) — headlines by keyword and country

**Like it?** If this Actor saves you time, please leave a review on the Reviews tab — it helps others find it. Found a problem? Open an issue and it will be fixed quickly.

### Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by YouTube or Google LLC. YouTube is a trademark of Google LLC and is mentioned only to describe the publicly available data source. It collects only publicly visible search results — without logging in, without solving CAPTCHAs, without downloading videos and without collecting comments, commenter data or e-mail addresses. You are responsible for making sure that your use of the data complies with applicable laws (including copyright and data protection laws such as GDPR) and with YouTube's terms.

# Actor input Schema

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

Search YouTube like in the search box, one query per line, e.g. <code>python tutorial</code>, <code>iphone 17 review</code>.

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

How many results to return for each query. YouTube usually shows up to a few hundred results per search.

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

What to search for — the same as YouTube's 'Type' filter.

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

Relevance (YouTube's default), popularity (most views) or upload date (newest first).

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

Only results uploaded in this period.

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

Only videos of this length (YouTube's current duration filter).

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

Only results with all selected features, e.g. 4K + Subtitles/CC.

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

Also get each video's like count, comment count, exact publish date, full description and hashtags. Slower (one extra request per video), same price per result.

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

Two-letter country code to search as a viewer from that country, e.g. <code>US</code>, <code>GB</code>, <code>IN</code>, <code>DE</code>.

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

The scraper connects directly first and switches to a new proxy IP only if YouTube slows it down. The default works for most runs.

## Actor input object example

```json
{
  "searchQueries": [
    "python tutorial"
  ],
  "maxResultsPerQuery": 20,
  "type": "videos",
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "includeVideoDetails": false,
  "country": "US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per search result in YouTube's order: title, channel, views, duration, publish time and link.

## `allFields` (type: `string`):

Every result with all fields (and video details if enabled).

# 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": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataspace/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": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("dataspace/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": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call dataspace/youtube-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dataspace/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/p3DEuZaTnTp1ZWlEE/builds/51GOUWKR6Hp5GnAF2/openapi.json
