# YouTube Competitor Channel Analysis Scraper (`googleapi/youtube-competitor-channel-analysis-scraper`) Actor

Compare source-backed public competitor channel counters and bounded public video samples.

- **URL**: https://apify.com/googleapi/youtube-competitor-channel-analysis-scraper.md
- **Developed by:** [Google API](https://apify.com/googleapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What this Actor does

YouTube Competitor Channel Analysis Scraper compares public channel statistics and a sample of recent public video cards. It returns one dataset row per channel with the displayed audience counts and clearly labeled comparisons from the sampled videos.

Sample view averages and top views describe only the returned sample. They are not official YouTube Analytics data or channel-wide engagement rates.

### Input

Provide one or more public channel handles or URLs. `maxItems` limits channel rows. Video samples are included by default; set `maxSampleVideos` to control their size or `includeSampleVideos` to `false` to omit them.

```json
{"channelHandles":["Google","NASA"],"maxItems":10,"maxSampleVideos":5}
```

```json
{"channelUrls":["https://www.youtube.com/@Google","https://www.youtube.com/@NASA"],"includeSampleVideos":true}
```

Set `includeChannelDetails` to `true` to add public About information such as country, join date, total views, and channel links. `includeMedia` and `includeLinks` control public images and links.

`startUrls` is also accepted for public channel URLs. `deduplicate` is enabled by default. `locale` sets the language preference; the Input tab lists the per-channel sample and profile-detail limits.

### Dataset output

Each row includes `channelId`, `channelName`, `handle`, `channelUrl`, verification state, subscriber and video counts with their original display labels, and profile images. Optional About information includes description, country, join date, total views, and external links.

The `sampleVideos` array may include video IDs, titles, URLs, thumbnails, visible view counts, relative publication text, and duration. Derived fields include `sampleVideoCount`, `averageSampleViewCount`, `topSampleViewCount`, and `subscriberRank`.

```json
{
  "channelId": "UCexample123",
  "channelName": "Example Creator",
  "handle": "@ExampleCreator",
  "subscriberCount": 1250000,
  "subscriberCountText": "1.25M subscribers",
  "videoCount": 384,
  "videoCountText": "384 videos",
  "sampleVideos": [
    {
      "videoId": "HuGAiGfKqW0",
      "title": "Creative technology fundamentals",
      "videoUrl": "https://www.youtube.com/watch?v=HuGAiGfKqW0",
      "viewCountText": "1.2M views",
      "publishedText": "2 days ago",
      "duration": "12:34"
    }
  ],
  "sampleVideoCount": 1,
  "averageSampleViewCount": 1200000,
  "topSampleViewCount": 1200000
}
```

Compact counters are estimates; their original display text is retained. Relative publication labels are not converted to exact dates. Missing public details are omitted rather than inferred.

Download dataset results as JSON, CSV, Excel, or another format supported by Apify. The run page also provides result totals and source status.

### Cost, coverage, and responsible use

Check the Actor's Pricing tab for current Actor and Apify platform charges. The number of channels and sample videos affects run volume. Results reflect public pages at run time and can vary by market or channel.

This Actor is independent of YouTube and Google. Follow YouTube's terms and applicable privacy laws when using public channel information.

# Actor input Schema

## `channelUrl` (type: `string`):

Public HTTPS YouTube channel URL or @handle.

## `channelUrls` (type: `array`):

Ordered public HTTPS channel URLs or @handles.

## `channelHandles` (type: `array`):

Public channel handles with or without @.

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

Object-form alias for public YouTube channel URLs.

## `sourceUrls` (type: `array`):

Compatibility alias for public YouTube channel URLs.

## `url` (type: `string`):

Compatibility alias for one public YouTube channel URL.

## `includeChannelDetails` (type: `boolean`):

Fetch at most one public About page per channel for country, joined date, total views and public links. Disabled by default; 8-second timeout and identity match required.

## `maxItems` (type: `integer`):

Global maximum number of competitor channel sources. Default: 25.

## `deduplicate` (type: `boolean`):

Skip repeated public channel references.

## `includeMedia` (type: `boolean`):

Include publicly exposed avatar and banner URLs.

## `requestDelayMs` (type: `integer`):

Delay between ordered public channel Videos-page requests.

## `maxConcurrency` (type: `integer`):

Requests are intentionally ordered; only 1 is accepted.

## `maxRequestRetries` (type: `integer`):

Finite retries for transient public requests.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each public channel Videos-page request.

## `requestTimeoutMs` (type: `integer`):

Compatibility alias for requestTimeoutSecs.

## `maxResponseBytes` (type: `integer`):

Maximum public HTML bytes retained.

## `userAgent` (type: `string`):

Optional ordinary browser user agent; no stealth or fingerprint spoofing is used.

## `locale` (type: `string`):

Accept-Language value for public requests.

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

Validated for compatibility; direct extraction does not route through a proxy.

## `renderJavaScript` (type: `boolean`):

Compatibility flag; public HTML and embedded state are read without a browser.

## `useBrowser` (type: `boolean`):

Compatibility flag; browser automation is not required.

## `includeLinks` (type: `boolean`):

Include public external links presented by the channel.

## `includeSampleVideos` (type: `boolean`):

Include bounded public Videos-tab cards and sample view comparisons.

## `maxSampleVideos` (type: `integer`):

Maximum public video cards to inspect per competitor channel. Set to 0 to omit the sample.

## `page` (type: `integer`):

Starting page for a public channel Videos source. Only page 1 is supported.

## `maxPages` (type: `integer`):

Maximum public Videos pages per channel. This Actor reads the initial page only.

## Actor input object example

```json
{
  "includeChannelDetails": false,
  "maxItems": 25,
  "deduplicate": true,
  "includeMedia": true,
  "requestDelayMs": 0,
  "maxConcurrency": 1,
  "maxRequestRetries": 1,
  "requestTimeoutSecs": 30,
  "maxResponseBytes": 2000000,
  "locale": "en-US",
  "renderJavaScript": false,
  "useBrowser": false,
  "includeLinks": true,
  "includeSampleVideos": true,
  "maxSampleVideos": 5,
  "page": 1,
  "maxPages": 1
}
```

# Actor output Schema

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

No description

## `runSummary` (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("googleapi/youtube-competitor-channel-analysis-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("googleapi/youtube-competitor-channel-analysis-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 '{}' |
apify call googleapi/youtube-competitor-channel-analysis-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,googleapi/youtube-competitor-channel-analysis-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/NhhFIxLaWN57p7lC9/builds/a40mMeCBSgAh84ftP/openapi.json
