# YouTube Search Results Scraper - Keywords to CSV (`benthepythondev/youtube-search-results-scraper`) Actor

Search YouTube by keyword without an API key and export the results: title, link, exact views, age, length, channel, verified badge and rank. Filter by upload date, length and type.

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

## Pricing

from $1.20 / 1,000 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 Results Scraper - Keywords to CSV

Search YouTube by keyword and export what it returns: title, link, exact views, age, length, channel, verified badge, description snippet and rank. Filter by upload date, length and type, and choose YouTube's relevance or popularity order. No API key, no login, no proxy to configure. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the YouTube Search Results Scraper?

It is an Apify Actor that sends your search terms to YouTube the way its own site does and reads the answers without a browser. The default run (ten results) takes about five seconds. Two filtered searches with 100 results each took fifteen seconds in our test on Apify.

Every search term is its own search, and every row carries the term and its rank, so many searches can share one dataset. The filters are YouTube's own: the Actor picks them from the filter menu YouTube returns, in the same way a visitor would click them.

#### What data does it extract?

- **Video:** `video_id`, `url`, `title`, `type` (`video`, `short` or `live`), `duration_seconds`, `thumbnail`, `description` (the snippet YouTube shows)
- **Reach:** `view_count` (exact for videos), `published`
- **Search:** `query`, `search_rank`
- **Channel:** `channel`, `channel_id`, `channel_url`, `channel_handle`, `channel_is_verified`
- **With details on:** `upload_date`, `like_count`, the full `description`, `channel_subscribers`

### ⬇️ Input

| Field | Type | What it does |
|---|---|---|
| `queries` | array | Search terms, one search per entry |
| `maxResults` | integer | Results per search. 10 by default |
| `uploadDate` | string | `any`, `today`, `week`, `month` or `year` |
| `contentType` | string | `any`, `videos` or `shorts` |
| `duration` | string | `any`, `short` (under 3 minutes), `medium` (3 to 20) or `long` (over 20) |
| `sort` | string | `relevance` or `popularity` |
| `excludeVideoIds` | array | Videos you already have; they are skipped and not charged |
| `includeDetails` | boolean | Publication date, likes and full description per video |

#### Example input

This week's long videos for two topics:

```json
{
  "queries": ["nasa artemis", "web scraping tutorial"],
  "maxResults": 100,
  "uploadDate": "week",
  "contentType": "videos",
  "duration": "long"
}
```

### ⬆️ Output

A real row:

```json
{
  "video_id": "ix9cRaBkVe0",
  "url": "https://www.youtube.com/watch?v=ix9cRaBkVe0",
  "title": "Python Full Course for free 🐍",
  "type": "video",
  "view_count": 12670927,
  "published": "2 years ago",
  "duration_seconds": 43200,
  "thumbnail": "https://i.ytimg.com/vi/ix9cRaBkVe0/hq720.jpg",
  "channel": "Bro Code",
  "channel_id": "UC4SVo0Ue36XCfOyb5Lh1viQ",
  "channel_url": "https://www.youtube.com/channel/UC4SVo0Ue36XCfOyb5Lh1viQ",
  "channel_handle": "@BroCodez",
  "channel_is_verified": true,
  "description": "python #tutorial #beginners Python tutorial for beginners' full course 2024 *Learn Python in 1 HOUR* ...",
  "query": "python tutorial",
  "search_rank": 1,
  "scraped_at": "2026-10-03T11:18:55.852102+00:00"
}
```

### 💰 How much does it cost?

You pay per saved row, plus a tiny start fee per run.

| Apify plan | Price per 1,000 rows |
|---|---|
| Free | $1.50 |
| Starter | $1.35 |
| Scale | $1.275 |
| Business | $1.20 |

The default run (ten results) costs 1.5 cents. Details do not cost extra. Set **Maximum cost per run** in the run options and the Actor stops at that amount and says so in the status message.

### 💡 Use cases

- 🔍 **Keyword and SEO research:** see who ranks for a term, with views, length and channel size signals.
- 📰 **Topic monitoring:** schedule a search with **Upload date: today** and `excludeVideoIds` from earlier runs to get only new videos.
- 🤝 **Find creators in a niche:** search the topic, then group the rows by `channel_id`.
- 🧠 **Datasets for AI:** collect video ids by topic and pass them to the transcript or comment Actors.

### ❓ FAQ

**Do I need a YouTube API key or a Google account?** No. The Actor reads what YouTube's own site loads for any visitor and uses no API quota.

**Why are some view counts round numbers?** YouTube shows large counts rounded in lists (88K, 4.3M). Search rows of videos carry the exact view count; Shorts in search results are rounded.

**Why is there no exact date in the list rows?** YouTube lists only show an age ("2 days ago"). Turn on **Include exact details** and each row gets `upload_date`, the exact `view_count`, `like_count` and the full `description`, at one extra request per video and the same price per row.

**Is it legal to scrape YouTube?** The Actor reads only what YouTube shows publicly to any visitor and does not log in. Channel and video data can be personal data, so GDPR, CCPA and similar rules apply to how you store and use it, and YouTube's terms apply to you as well. If in doubt, ask a lawyer.

**Something is missing or broken?** Open an issue on the Actor's Issues tab with the run ID. Issues are answered within one business day.

**How many results can one search return?** YouTube ends a search after roughly 150 to 250 results and says "No more results". The status message tells you when that happened. To collect more, use several search terms or split one term with the filters.

**Which country are the results for?** The Actor asks for US results in English. YouTube also looks at the address of the visitor, which on Apify is in the United States.

**Why did a search with an upload-date filter return fewer rows than `maxResults`?** YouTube mixes a few older videos into filtered results. The Actor leaves those out, so every saved row is inside the window you chose.

**Does it export channels and playlists from the results?** No, only videos, Shorts and live streams.

### 🔗 You might also like

- [YouTube Channel Videos Scraper](https://apify.com/benthepythondev/youtube-channel-intelligence)
- [YouTube Shorts Scraper](https://apify.com/benthepythondev/youtube-shorts-scraper)
- [YouTube Playlist Scraper](https://apify.com/benthepythondev/youtube-playlist-extractor)
- [YouTube Video Metadata Scraper](https://apify.com/benthepythondev/youtube-video-metadata-scraper)
- [YouTube Comments Scraper](https://apify.com/benthepythondev/youtube-comments-scraper)
- [YouTube Transcript Scraper](https://apify.com/benthepythondev/youtube-transcript-scraper)

**Keywords:** youtube search scraper, youtube search results scraper, scrape youtube search, youtube keyword search export, youtube search to csv, youtube search api alternative, youtube search without api key, youtube keyword research, youtube seo tool, youtube video search data, youtube search filter, youtube trending topics, youtube topic monitoring, youtube search rank, youtube search dataset

# Actor input Schema

## `queries` (type: `array`):

One search per entry, exactly as you would type it on YouTube.

## `maxResults` (type: `integer`):

Rows to save for each search term.

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

YouTube's own upload-date filter.

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

YouTube's own type filter. Channels and playlists in the results are never exported.

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

YouTube's own length filter.

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

The orders YouTube offers for a search.

## `excludeVideoIds` (type: `array`):

Videos you already have; they are not saved or charged again.

## `includeDetails` (type: `boolean`):

Opens every video's watch page data: exact view count, publication date, likes and the full description. One extra request per video, same price per row.

## Actor input object example

```json
{
  "queries": [
    "python tutorial"
  ],
  "maxResults": 10,
  "uploadDate": "any",
  "contentType": "any",
  "duration": "any",
  "sort": "relevance",
  "excludeVideoIds": [],
  "includeDetails": false
}
```

# Actor output Schema

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

No description

## `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 = {
    "queries": [
        "python tutorial"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/youtube-search-results-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 = { "queries": ["python tutorial"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,benthepythondev/youtube-search-results-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/Lx4hsgr8MsagpR1aJ/builds/f1BWGO9L2tBUKwHNe/openapi.json
