# YouTube Search Scraper & Video Opportunity Intelligence (`azzarilabs/youtube-search-video-intelligence`) Actor

Find public videos and channels by topic, compare observed reach and freshness, and choose content opportunities.

- **URL**: https://apify.com/azzarilabs/youtube-search-video-intelligence.md
- **Developed by:** [Azzari Labs](https://apify.com/azzarilabs) (community)
- **Categories:** Social media, Marketing, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.20 / 1,000 video 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 & Video Opportunity Intelligence

Find public videos and channels around a topic, compare the observable signals, and choose a content hypothesis worth testing. Enter one search topic; the default 25-result run is enough to inspect the shape of the evidence.

### Problem → result → decision

Manual YouTube search makes it hard to compare visible views, freshness, channels, and search position across results. Give this Actor a topic and a small result cap. It exports structured public rows, an aggregate `OUTPUT`, and a readable `REPORT.html`. Use those observations to shortlist formats, channels, or topics for human review—not to predict future performance.

### Three use cases

1. Compare the public reach and recency of videos for a planned topic.
2. Find recently published videos or Shorts to review before a campaign.
3. Monitor a brand or content category's visible search results over time.

### Quick Start (<30 seconds)

1. Replace the sample topic if needed.
2. Leave the 25-result cap and Videos/Relevance defaults in place.
3. Click Start, then inspect the Videos Dataset view and REPORT. Narrow by date or duration only if needed.

```json
{"searchQueries":["artificial intelligence"],"maxResultsPerQuery":25,"resultType":"videos","sortBy":"relevance"}
```

Full sample input: `examples/INPUT.json`. The first four fields are the main decisions. Upload date, duration, locale hints, and enrichment are under Advanced options; all existing API keys remain accepted.

### Illustrative output row

```json
{"record_type":"video","query":"artificial intelligence","search_position":1,"video_id":"sample12345","video_url":"https://www.youtube.com/watch?v=sample12345","title":"Illustrative public video","channel_name":"Example channel","view_count":1200,"published_at":null,"views_per_day":null,"content_opportunity_score":null}
```

This is a sanitized schema-shaped illustration, not a live production result or a reliability claim. Actual public fields can be null. `OUTPUT` and `REPORT.html` summarize the observed results, warnings, and scoring reasons.

### Pricing

`video-result`: USD 0.0002 per valid unique delivered video. At that event rate, 100 / 1,000 / 10,000 videos cost USD 0.02 / 0.20 / 2.00 in event charges. Search summaries, channel rows, duplicates, empty results, OUTPUT, and REPORT are not charged. The live Cloud pricing contract is authoritative; this candidate does not change it.

### Evidence and limits

The Cloud-validated 0.1.2 smoke delivered 25 videos and passed Dataset, OUTPUT, and REPORT checks. That proves one observed run, not an SLA or guaranteed coverage. Public YouTube ordering and available metrics vary by time and locale. The supported query path is English-language, and an observed sample is not a complete YouTube census or a forecast of future views.

**Next step:** Run one topic, review the evidence, then increase the cap only if it informs a real decision. For audience discussion on a known video, use [YouTube Comments](https://apify.com/azzarilabs/youtube-comments-scraper).

# Actor input Schema

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

Enter 1–10 English search queries; start with one specific topic.

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

Set a small cap for a quick first run; only valid delivered rows are billed.

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

Choose videos, Shorts, channels, or mixed results.

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

Use Relevance for discovery, Upload date for fresh videos, or View count for established examples.

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

Optional YouTube time filter.

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

Optional public duration filter.

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

Language hint for public search, for example en.

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

Country hint for public search, for example US.

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

Fetch additional public video metadata when available.

## `includeDescription` (type: `boolean`):

Include public descriptions when exposed.

## Actor input object example

```json
{
  "searchQueries": [
    "artificial intelligence"
  ],
  "maxResultsPerQuery": 25,
  "resultType": "videos",
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "language": "en",
  "country": "US",
  "includeVideoDetails": true,
  "includeDescription": true
}
```

# Actor output Schema

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

No description

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

No description

## `report` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("azzarilabs/youtube-search-video-intelligence").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("azzarilabs/youtube-search-video-intelligence").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 '{}' |
apify call azzarilabs/youtube-search-video-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,azzarilabs/youtube-search-video-intelligence"
        }
    }
}
```

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/Wcl4iaDfIQ6SRoLvt/builds/Q4efkZNMiyXDgXh1f/openapi.json
