# YouTube Search, Video Metadata & Official Trending Chart (`automationnation/youtube-trend-auditor`) Actor

Extract YouTube search results and video metadata via fast HTTP scraping. Optionally add a free YouTube Data API key to pull the real, official Trending chart by region — the /feed/trending page blocks plain scraping, verified directly.

- **URL**: https://apify.com/automationnation/youtube-trend-auditor.md
- **Developed by:** [Nathan Carter](https://apify.com/automationnation) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 youtube video/search result extracteds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube SEO & Trend Auditor (Metadata Scraper)

Extract high-value YouTube data without the need for complex API keys or OAuth. This Actor provides instant access to video metadata, channel insights, and keyword search results, perfect for SEO research and content strategy.

### 🎯 Why use this Actor?

YouTube's official API is restrictive, quota-limited, and difficult to set up. This Actor provides a lightweight, high-performance alternative, allowing you to:

- **Perform Keyword Research:** Audit the top 20 videos for any search term.
- **Competitor Intelligence:** Monitor channel growth, view velocity, and engagement metrics.
- **Content Gap Analysis:** Identify trending topics in your niche by scanning the top-ranked results for specific keywords.

### 📊 What Data Do You Get?

The scraper returns clean, structured JSON:

- `videoTitle` & `channelName`: Core identifier metadata.
- `viewCount`: Raw view count (parsed).
- `subscriberCount`: Channel reach (normalized K/M/B parser).
- `publishDate`: ISO-8601 timestamps.
- `videoUrl`: Direct deep-link to the content.

### 💡 Use Cases

- **SEO Audit:** Feed top-ranked video titles into an LLM to generate high-performing video scripts.
- **Trend Monitoring:** Track how quickly new videos in your niche are gaining views.
- **Lead Generation:** Identify high-growth channels for influencer marketing.

### ⚡ Pricing

- **Pay Per Event:** $1.00 per 1,000 results.
- **Zero Compute Waste:** Pure HTTP/Cheerio architecture. No headless browser rendering.

# Actor input Schema

## `startUrls` (type: `array`):

YouTube video URLs to extract metadata from.

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

Search terms to pull the top 20 video results for.

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

Without this, only search results and individual video lookups are available — YouTube's actual Trending feed blocks plain scraping (verified: even with the standard consent cookie, the unauthenticated page returns zero real video items, only a consent nudge). With a free YouTube Data API v3 key, set trendingRegion to pull the real, official Trending chart for that region.

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

ISO 3166-1 alpha-2 region code (e.g. US, GB, IN) to pull the official YouTube Trending chart for. Ignored if youtubeApiKey is not set.

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

Proxy settings to avoid rate-limiting.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "searchQueries": [
    "AI tools 2026"
  ],
  "trendingRegion": "US",
  "proxyConfiguration": {
    "useApifyProxy": 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 = {
    "startUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "searchQueries": [
        "AI tools 2026"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("automationnation/youtube-trend-auditor").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 = {
    "startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "searchQueries": ["AI tools 2026"],
}

# Run the Actor and wait for it to finish
run = client.actor("automationnation/youtube-trend-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "searchQueries": [
    "AI tools 2026"
  ]
}' |
apify call automationnation/youtube-trend-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automationnation/youtube-trend-auditor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DsqnUVCwgWok8pkTc/builds/PZwL4VW3OYUTb0QdJ/openapi.json
