# YouTube Trends Scraper: Breakout Keywords & SEO ($0.30/1k) (`unitbytes/youtube-trends-scraper`) Actor

Extract YouTube search trends, breakout video keywords (+5,000%), viewer geography, and historical YouTube topic demand. Supports bulk keyword lists (up to 100), category filters, and flat JSON or Excel/CSV.

- **URL**: https://apify.com/unitbytes/youtube-trends-scraper.md
- **Developed by:** [UnitBytes | Enterprise Web Data](https://apify.com/unitbytes) (community)
- **Categories:** SEO tools, Marketing, AI
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 result scrapeds

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

<p align="center">
  <a href="https://apify.com/unitbytes/youtube-trends-scraper?fpr=939u3w&fp_sid=readme" target="_blank">
    <img src="https://raw.githubusercontent.com/unitbytes/.github/main/assets/banners/unitbytes-google-trends-realtime-keyword-api-banner.jpg" alt="YouTube Trends Scraper & Breakout Keyword Research by UnitBytes" width="100%" />
  </a>
</p>

<p align="center">
  <a href="https://console.apify.com/actors/unitbytes~youtube-trends-scraper" target="_blank">
    <img src="https://raw.githubusercontent.com/unitbytes/.github/main/assets/try-it-for-free.svg" width="240" height="48" alt="Try it for Free">
  </a>
  <br>
  <sub>⚡ <b>YouTube Creator & SEO Trial:</b> Run live YouTube keyword trend queries with Apify free monthly credit</sub>
</p>

## 🎥 YouTube Trends Scraper — Breakout Keywords & Video SEO

> **Find breakout YouTube topics before they saturate.** Query Google's dedicated **YouTube Search Index** directly to extract **Breakout YouTube searches (`+5,000%`), historical viewer search timelines, top viewer countries/states, and related video topics**—up to **100 YouTube keywords in a single run**.

<div align="center">

| 🎥 Dedicated YouTube Index | 🚀 +5,000% Breakout Tags | 📦 Bulk 100 Keywords | 📊 1-Click Excel / CSV / JSON | 💰 $0 Start Fee ($0.30/1k) |
| :---: | :---: | :---: | :---: | :---: |
| True Viewer Search Demand | Spot Viral Video Topics Early | Shared or Independent Scale | Clean Flat Rows by Default | 4-Tier Volume PPE |

</div>

***

<table>
  <tr>
    <td colspan="6" style="padding:10px 14px;background:#059669;color:#FFFFFF;font-size:13px;font-weight:700;border-radius:6px 6px 0 0">
      ⚡ UnitBytes · Search Trends & Market Demand Intelligence Suite
    </td>
  </tr>
  <tr>
    <td colspan="2" style="padding:10px 12px;border:1px solid #E2E8F0;background:#FFF4ED;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">🎥 <b><a href="https://apify.com/unitbytes/youtube-trends-scraper?fpr=939u3w&fp_sid=ecosystem" style="color:#C2410C;text-decoration:none;font-size:13px">YouTube Trends Scraper</a></b></span><br><span style="color:#EA580C;font-size:11px;font-weight:700">📍 You are here</span><br>
      <span style="color:#64748B;font-size:11px">Breakout YouTube search queries, video topics & viewer regions</span>
    </td>
    <td colspan="2" style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">🔥 <b><a href="https://apify.com/unitbytes/google-trending-now-scraper?fpr=939u3w&fp_sid=ecosystem" style="color:#0F172A;text-decoration:none;font-size:13px">Google Trending Now</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">Realtime Viral Spikes</span><br>
      <span style="color:#64748B;font-size:11px">4h/24h/48h/7d trending searches, volumes & breaking news</span>
    </td>
    <td colspan="2" style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">🛍️ <b><a href="https://apify.com/unitbytes/google-shopping-trends-scraper?fpr=939u3w&fp_sid=ecosystem" style="color:#0F172A;text-decoration:none;font-size:13px">Google Shopping Trends</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">E-Commerce & Product Research</span><br>
      <span style="color:#64748B;font-size:11px">Breakout physical products, seasonal buyer demand & regions</span>
    </td>
  </tr>
  <tr>
    <td colspan="3" style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:50%">
      <span style="white-space:nowrap">📈 <b><a href="https://apify.com/unitbytes/google-trends-scraper?fpr=939u3w&fp_sid=ecosystem" style="color:#0F172A;text-decoration:none;font-size:13px">Google Trends All-in-One Scraper</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">Marketers & Spreadsheets</span><br>
      <span style="color:#64748B;font-size:11px">20-year timelines, DMA heatmaps, bulk 100 keywords & Excel/CSV</span>
    </td>
    <td colspan="3" style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:50%">
      <span style="white-space:nowrap">⚡ <b><a href="https://apify.com/unitbytes/google-trends-api?fpr=939u3w&fp_sid=ecosystem" style="color:#0F172A;text-decoration:none;font-size:13px">Google Trends Fast API</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">Developers & AI Agents (MCP)</span><br>
      <span style="color:#64748B;font-size:11px">Sub-second REST API & unnested flat JSON for LLM pipelines</span>
    </td>
  </tr>
</table>

***

### ✨ Why Use YouTube Trends Scraper?

#### 1. 🎥 100% Dedicated to YouTube Viewer Search Behavior

What people type into the **YouTube search bar** (`how to build ai agents`, `minecraft tutorial`, `air fryer recipes`) is completely different from what they type into standard Google Web search. This actor queries **Google's YouTube Search index (`gprop: "youtube"`)** out of the box.

#### 2. ⭐ All 4 YouTube Keyword Datasets in One Run (`scrape_type: "all"`)

By default, a single run extracts:

- 🚀 **Breakout & Top Related YouTube Searches (`related_queries`)**: Uncover both evergreen high-volume tags (`top`) and surging **`+5,000%` Breakout video queries (`rising`)**.
- 📈 **YouTube Search Interest Over Time (`interest_over_time`)**: Track hourly, daily, weekly, or multi-year viewer demand from 2008 to today.
- 🌍 **Viewer Geography (`interest_by_region`)**: See which countries, states, DMA metros, or cities watch your niche most (`COUNTRY`, `REGION`, `DMA`, `CITY`).
- 🧠 **Related YouTube Entities & Topics (`related_topics`)**: Discover connected creators, games, software tools, and Knowledge Graph topics.

#### 3. 📦 Compare 5 Topics Side-by-Side OR Bulk-Screen 100 Keywords

- **Shared Scale Comparison (`compare_keywords: true` - Default)**: Compare up to 5 video titles or niches head-to-head on the same 0–100 scale to pick the winning video idea.
- **Bulk Keyword Research (`compare_keywords: false`)**: Paste up to **100 YouTube keywords** in a single run to score an entire content calendar.

***

### 🧪 Ready-to-Run Input Examples

#### 1. ⭐ Complete YouTube Niche Intelligence (Timeline + Regions + Breakout Queries + Topics)

```json
{
  "scrape_type": "all",
  "keywords": ["AI Agents", "Claude Code"],
  "predefined_timeframe": "today 3-m",
  "common_geo": "US"
}
```

#### 2. 🎮 Gaming Niche Breakout Tag Finder (`category: 8` = Games)

```json
{
  "scrape_type": "related_queries",
  "keywords": ["Minecraft", "GTA 6", "Roblox"],
  "category": 8,
  "predefined_timeframe": "today 1-m",
  "common_geo": "US"
}
```

#### 3. 📦 Bulk 100-Keyword Video Calendar Screening (`compare_keywords: false`)

```json
{
  "scrape_type": "interest_over_time",
  "keywords": [
    "python tutorial",
    "cursor ide",
    "n8n automation",
    "claude mcp",
    "local llm",
    "rag tutorial"
  ],
  "compare_keywords": false,
  "predefined_timeframe": "today 12-m",
  "common_geo": "US"
}
```

***

### 📤 Sample Output Data (`output_format: "flat"`)

```json
[
  {
    "scrape_type": "related_queries",
    "event_index": 1,
    "error": false,
    "subset": "rising",
    "original_keyword": "AI Agents",
    "related_keyword": "claude code tutorial",
    "value": 5000
  },
  {
    "scrape_type": "interest_over_time",
    "event_index": 2,
    "error": false,
    "keyword": "AI Agents",
    "value": 92,
    "date": "2026-10-18T00:00:00+00:00",
    "isPartial": false
  }
]
```

***

### ⚙️ Input Parameters Reference

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `keywords` | `array[string]` | `["AI Agents", "Claude Code"]` | YouTube search terms to analyze (up to 5 in comparative mode, or up to **100** when `compare_keywords: false`) |
| `scrape_type` | `string` | `"all"` | `"all"` (all 4 datasets), `"related_queries"`, `"interest_over_time"`, `"interest_by_region"`, or `"related_topics"` |
| `compare_keywords` | `boolean` | `true` | `true` compares up to 5 keywords on a shared 0–100 scale. `false` runs up to 100 keywords independently |
| `category` | `integer` | `0` | Niche filter (`0` = All, `3` = Entertainment, `5` = Tech, `8` = Gaming, `20` = Sports, `45` = Health, `71` = Food) |
| `predefined_timeframe` | `string` | `"today 12-m"` | `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all` |
| `custom_timeframe` | `string` | `""` | Custom date range `'YYYY-MM-DD YYYY-MM-DD'` |
| `common_geo` | `string` | `"US"` | 2-letter ISO country code (`US`, `GB`, `CA`, `IN`, etc.), country name, or `WORLDWIDE` |
| `custom_geo_code` | `string` | `""` | Sub-region code (`US-CA`, `US-NY`, etc.) |
| `geo_resolution` | `string` | `"COUNTRY"` | Regional granularity: `COUNTRY`, `REGION`, `DMA`, or `CITY` |
| `output_format` | `string` | `"flat"` | `"flat"` (1 row per data point for Excel/CSV/APIs) or `"legacy"` (nested JSON envelope) |
| `max_events` | `integer` | `10000` | Maximum number of results to extract |

***

### 💎 Pay-Per-Event Pricing (Zero Start Penalty)

| Apify Plan Tier | Unit Price per Data Point | Cost per 25-Item Query | Run Start Fee |
| :--- | :--- | :--- | :--- |
| **Free** | $0.00045 | **~$0.011** (1.1¢) | **$0.00** ($0.00005) |
| **Starter** | $0.00040 | **~$0.010** (1.0¢) | **$0.00** ($0.00005) |
| **Scale** | $0.00035 | **~$0.008** (0.8¢) | **$0.00** ($0.00005) |
| **Enterprise** | $0.00030 | **~$0.007** (0.7¢) | **$0.00** ($0.00005) |

***

### 📞 Support & Feedback

- 🐛 **Bug Reports & Feature Requests**: Open a ticket on the [Apify Issues Tab](https://apify.com/unitbytes/youtube-trends-scraper/issues?fpr=939u3w)
- 💬 **Creator Profile**: [unitbytes on Apify](https://apify.com/unitbytes)

### ⚖️ Compliance & Privacy

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Google LLC, YouTube, or Alphabet Inc. It retrieves only publicly available, aggregate search statistics published by Google Trends and does not collect or process any personal data. Read Apify's guide on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

Enter up to 5 YouTube keywords to compare side-by-side on a shared 0–100 scale, or uncheck 'Compare Keywords' below to bulk-research up to 100 YouTube keywords in one run.

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

Select 'All-in-One' to extract YouTube search timeline, viewer regions, breakout related queries, and related topics in a single run.

## `compare_keywords` (type: `boolean`):

When enabled (default), up to 5 YouTube keywords are compared side-by-side on the same 0–100 scale. Uncheck to bulk-analyze up to 100 YouTube keywords in one run (each scored independently on its own 0–100 scale).

## `category` (type: `integer`):

Filter by category ID (0 = All Categories, 3 = Entertainment & Music, 5 = Tech & Computers, 8 = Gaming, 12 = Business, 20 = Sports, 45 = Health & Fitness, 71 = Food & Cooking, 174 = Science).

## `trends_urls` (type: `array`):

Optionally paste trends.google.com/trends/explore?... URLs directly.

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

Select a preset time window for YouTube search trends.

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

Format: 'YYYY-MM-DD YYYY-MM-DD' (e.g. '2025-01-01 2025-12-31'). Overrides Predefined Timeframe when filled.

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

2-letter ISO country code ('US', 'GB', 'CA', 'DE', 'IN', 'BR', etc.), full country name, or 'WORLDWIDE' for global YouTube search volume.

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

Optional state/region code such as 'US-CA' or 'US-NY'.

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

Granularity for 'Viewer Interest by Region'.

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

'flat' outputs 1 row per data point (ready for Excel, CSV, Google Sheets, and AI agents). 'legacy' outputs a consolidated nested JSON object.

## `max_events` (type: `integer`):

Maximum number of trend data points to return (1 to 10,000).

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

Apify Residential proxies are automatically managed on Apify Cloud.

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

Locked to YouTube Search index by default

## `acknowledge_costs` (type: `boolean`):

Internal flag for backward compatibility

## Actor input object example

```json
{
  "keywords": [
    "AI Agents",
    "Claude Code"
  ],
  "scrape_type": "all",
  "compare_keywords": true,
  "category": 0,
  "predefined_timeframe": "today 12-m",
  "common_geo": "US",
  "custom_geo_code": "",
  "geo_resolution": "COUNTRY",
  "output_format": "flat",
  "max_events": 10000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "gprop": "youtube",
  "acknowledge_costs": true
}
```

# 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": [
        "AI Agents",
        "Claude Code"
    ],
    "common_geo": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("unitbytes/youtube-trends-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": [
        "AI Agents",
        "Claude Code",
    ],
    "common_geo": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("unitbytes/youtube-trends-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": [
    "AI Agents",
    "Claude Code"
  ],
  "common_geo": "US"
}' |
apify call unitbytes/youtube-trends-scraper --silent --output-dataset

```

## MCP server setup

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