# YouTube Search Scraper: No API Key or Quota (`leathered_latch/youtube-search-scraper`) Actor

Type a search and get YouTube's results in rank order: title, channel, exact view count, length, upload age and description snippet. No API key, no daily quota. Pay per video.

- **URL**: https://apify.com/leathered_latch/youtube-search-scraper.md
- **Developed by:** [Noor Holdings](https://apify.com/leathered_latch) (community)
- **Categories:** Videos, Social media
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 videos

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: videos, exact views, channels and rank

Type a search and get YouTube's results back as rows, in the order YouTube ranks them. Each row has the title, channel, exact view count, length, upload age and description snippet.

Sort and filter the way YouTube's own search does: by views, by upload date, or only videos from this week. You pay per video delivered.

### What you get

| Field | Example |
|---|---|
| `searchQuery` | how to make cold brew |
| `rank` | 3 |
| `title` | Everything I Learned About Cold Brew Coffee |
| `channelName` | James Hoffmann |
| `viewCount` | 1060568 |
| `published` | 1y ago |
| `duration` / `durationSeconds` | 26:50 / 1610 |
| `badges` | 2 products, 4K, Verified |
| `url` | Link to the video |

#### Sample output

```json
{
  "searchQuery": "how to make cold brew",
  "rank": 3,
  "videoId": "AB0QLjroFss",
  "title": "Everything I Learned About Cold Brew Coffee",
  "url": "https://www.youtube.com/watch?v=AB0QLjroFss",
  "channelName": "James Hoffmann",
  "channelId": "UCMb0O2CdPBNi-QqPk5T3gsQ",
  "channelUrl": "https://www.youtube.com/@jameshoffmann",
  "viewCount": 1060568,
  "views": "1,060,568 views",
  "published": "1y ago",
  "duration": "26:50",
  "durationSeconds": 1610,
  "badges": "2 products, 4K, Verified",
  "isLive": false
}
```

### Quick start

1. Type what you'd search on YouTube into **Search phrases**. Add as many as you like.
2. Pick **Sort by** and **Uploaded** if you want them. The defaults match a normal YouTube search.
3. Set **Max videos per search** and click **Start**.

### Use cases

- Find who ranks for your keywords and how many views the top 20 pull.
- Sort by upload date, filtered to this week, to watch new videos in a niche.
- Collect channel links from a search to build an outreach list.
- Pass the `url` column to our YouTube Transcript Scraper or YouTube Channel Videos Scraper.

### How accurate is it?

We checked 8 results for "how to make cold brew" against each video's own page. Titles and channels matched on all 8. View counts were within 20 views (the page we checked a minute later had counted a few more), and lengths were within a second.

Search results only contain videos. Channels, playlists and Shorts shelves are skipped, so you don't pay for them.

YouTube's own upload-date filter leaks. Ask for "this week" and a few months-old videos still turn up. We drop any video clearly older than the window you picked, and you aren't charged for those. `RUN_SUMMARY` tells you how many were skipped.

### What happens when something goes wrong

A search with no results returns 0 rows and isn't charged. `RUN_SUMMARY` lists how many videos each search returned.

### Pricing

Pay per video delivered, plus Apify's small start fee per run. Set a maximum cost per run and the scraper stops at your limit.

### FAQ

**Does it need a YouTube API key?**
No.

**How many results can one search return?**
Up to 500 here. YouTube itself tends to stop somewhere in the few hundreds, and stops sooner for narrow searches.

**Will my results match what I see in my browser?**
Close, though not always identical. YouTube shuffles search results by location and history, and we search logged out from the US.

**Something broke?**
Open an issue with the search phrase. I answer within a day.

### Limitations

- `published` is YouTube's rounded age ("1y ago"). For an exact date, open the video.
- Shorts in their own shelf aren't included.

### Export or use as an API

Download any run's results from the **Storage** tab as CSV, Excel, JSON or XML.

To call it from your own code, send your input to Apify's API and get the rows back in one request:

```
POST https://api.apify.com/v2/acts/leathered_latch~youtube-search-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN
```

It also plugs into Make, Zapier and n8n through Apify's integrations, and AI agents can find and run it through Apify's MCP server.

### Your responsibility

How you use the output is your call, and so is the legal side of it. Copyright still covers any text or images you republish. The source site's own terms apply too. If you're unsure about a use, check with a lawyer first.

If you own content that shows up in these results and want it handled differently, open an issue on the Issues tab. We answer within 14 days.

### Data source and credit

Every row comes from YouTube (Google LLC). We don't own this data, and we don't take credit for it. The search results belong to the creators of each video.

This tool reads only what YouTube shows to any logged-out visitor. No logins, no private data. Each row keeps a link back to the page it came from (the `url` field), so you can check any result and credit the source when you use it.

Not affiliated with, endorsed by or sponsored by YouTube or Google. All names and trademarks belong to their owners.

### Changelog

- **0.1** First release. Sort by relevance, views, date or rating; upload-date filter; up to 500 videos per search.
- **0.1.3** Upload-date filter now enforced (YouTube's lets older videos through). Retries when YouTube returns an empty results page.

# Actor input Schema

## `searches` (type: `array`):

What you'd type into YouTube search, one per line.

## `maxResultsPerSearch` (type: `integer`):

1 to 500. YouTube usually stops offering results somewhere past a few hundred. You pay only for videos delivered.

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

YouTube's own sort.

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

Only videos uploaded in this window.

## Actor input object example

```json
{
  "searches": [
    "air fryer review"
  ],
  "maxResultsPerSearch": 50,
  "sortBy": "relevance",
  "uploadDate": "any"
}
```

# 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 = {
    "searches": [
        "air fryer review"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leathered_latch/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 = { "searches": ["air fryer review"] }

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

```

## MCP server setup

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