# YouTube Metrics Scraper - Videos, Shorts & Channels (`chronometrica/youtube-metrics-scraper`) Actor

Collect public metrics for YouTube videos, Shorts, live posts, and channel uploads. Get views, likes, comments, remixes, channel IDs, handles, publish dates, subscriber counts, and status fields.

- **URL**: https://apify.com/chronometrica/youtube-metrics-scraper.md
- **Developed by:** [Chronometrica](https://apify.com/chronometrica) (community)
- **Categories:** Social media, Videos
- **Stats:** 5 total users, 3 monthly users, 91.4% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 youtube post metrics

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 Metrics Scraper

### 📊 What does YouTube Metrics Scraper do?

YouTube Metrics Scraper collects public metrics for YouTube videos, Shorts, live
posts, and channel uploads. Paste known post URLs to measure them directly, or
paste channel URLs, channel IDs, and `@handles` to discover public uploads
first.

Use it when you need clean YouTube data for creator research, influencer
reporting, campaign tracking, competitor monitoring, social analytics,
dashboards, warehouse loads, and scheduled metric snapshots.

The Actor returns flat CSV/API-friendly rows with views, likes, comments, Shorts
remixes, subscriber counts, IDs, titles, descriptions, publish dates,
collaboration channels, row statuses, and per-metric quality labels.

This Actor does not log in, use cookies, scrape private YouTube content, collect
comment text, download videos, return dislikes, or access YouTube Studio
analytics. It only returns data that is publicly available at run time.

With YouTube Metrics Scraper, you can:

- 📈 Track public performance for known YouTube videos, Shorts, and live posts.
- 🎬 Measure videos and Shorts side by side in one normalized dataset.
- 👤 Discover public uploads from channel URLs, channel IDs, and `@handles`.
- 🔥 Sort discovered channel posts by newest, most popular, or oldest.
- 💬 Collect public views, likes, comments, and Shorts remix counts when
  available.
- 👥 Add public channel subscriber counts and channel identity fields.
- 🤝 Capture owner and collaborator channels when YouTube identifies them
  publicly.
- 🧭 Keep unavailable metrics as unavailable instead of turning them into fake
  zeroes.
- 📦 Export results as JSON, JSONL, CSV, Excel, XML, RSS, or HTML.

### ✨ What You Get

Each dataset row represents one YouTube video, Short, live post, or discovered
channel post.

| Data group         | Example fields                                                              |
| ------------------ | --------------------------------------------------------------------------- |
| 🔗 URL identity    | `inputUrl`, `postUrl`                                                       |
| 🆔 YouTube IDs     | `postId`, `postType`, `isShort`, `channelId`, `channelHandle`, `channelUrl` |
| 🧾 Post details    | `title`, `description`, `publishedAt`, `isLive`                             |
| 📊 Post metrics    | `views`, `likes`, `comments`, `remixes`                                     |
| 👥 Channel metrics | `channelSubscribersCount`                                                   |
| 🎯 Metric quality  | `postMetricStatus`, `channelMetricStatus`                                   |
| 🤝 Collaborations  | `collaborationCount`, `collaborationChannels`                               |
| 🚦 Row status      | `status`, `scrapedAt`                                                       |

Metric availability depends on what YouTube exposes publicly for each post or
channel. Some public counters are exact, some are rounded, and some are hidden
or delayed. Missing counts stay missing; they are not guessed and they are not
replaced with `0`.

### ⚙️ Can I use this Actor through an API?

Yes. You can run YouTube Metrics Scraper manually in Apify Console or use it
through:

- Apify API
- Python SDK
- Node.js SDK
- Webhooks
- Scheduled runs
- Apify integrations

This makes it useful for social media dashboards, influencer lists, competitive
intelligence, creator databases, campaign reporting, content audits, data
warehouses, and automated market research workflows.

### 🎯 Why scrape YouTube video, Shorts, and channel metrics?

YouTube public metrics help you understand which creators, channels, videos,
Shorts, campaigns, and competitors are gaining traction.

| Use case                     | How YouTube metric data helps                                                        |
| ---------------------------- | ------------------------------------------------------------------------------------ |
| 📈 Track creator performance | Monitor public views, likes, comments, and subscriber context over time.             |
| 🎬 Compare content formats   | Compare videos, Shorts, and live posts in one flat export.                           |
| 📣 Measure campaigns         | Collect repeatable snapshots for sponsored videos, creator deliverables, and drops.  |
| 🕵️ Monitor competitors       | Track known competitor videos or discover channel uploads before collecting metrics. |
| 🔥 Research top content      | Pull popular channel posts and compare the strongest public performers.              |
| 🧱 Build reporting workflows | Feed normalized YouTube rows into dashboards, spreadsheets, and BI tools.            |
| 🔎 Audit metric availability | Separate available, rounded, unavailable, and failed rows cleanly.                   |

### 💵 Pricing Event

YouTube Metrics Scraper uses pay-per-result pricing. One result means one
YouTube video, Short, live post, or discovered channel post metric row written
to the default dataset.

Every direct post input is processed by default. Use the optional `maxItems`
setting only when you want a total row cap. Use `maxItemsPerChannel` to control
channel discovery. Start with a small batch of 3 to 10 URLs when testing. The
run summary and row statuses show which URLs resolved, which returned public
metrics, and whether any inputs failed or were unsupported.

### 🚀 How do I use YouTube Metrics Scraper?

1. Create or log in to your Apify account.
2. Open **YouTube Metrics Scraper**.
3. Paste YouTube video URLs, Shorts URLs, channel URLs, channel IDs, `@handles`,
   or a mix of them.
4. Set an optional total row cap, or leave it blank to process every direct input.
5. Choose the channel post order if you are using channel discovery.
6. Leave the default settings for your first run.
7. Click **Start**.
8. Open the **Output** tab to inspect the dataset and run summary.
9. Download your data in JSON, JSONL, CSV, Excel, XML, RSS, or HTML.

### ⬇️ Input

The main input is `startUrls`. Paste at least one YouTube post URL, channel URL,
channel ID, raw video ID, or `@handle`. Direct posts and channel inputs can be
mixed in the same run.

```json
{
    "startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

#### 🔗 YouTube URLs and handles

Supported input shapes include:

```text
https://www.youtube.com/watch?v=VIDEO_ID
https://youtu.be/VIDEO_ID
https://www.youtube.com/shorts/VIDEO_ID
https://www.youtube.com/embed/VIDEO_ID
VIDEO_ID
https://www.youtube.com/@handle
https://www.youtube.com/@handle/videos
https://www.youtube.com/@handle/shorts
@handle
https://www.youtube.com/channel/UC...
UC...
```

Best results usually come from public post URLs and public channel pages that
open in a logged-out browser.

#### 📺 Channel discovery

Use channel discovery when you want the Actor to find public posts from a
YouTube channel before collecting metrics.

```json
{
    "startUrls": ["@MrBeast"],
    "channelSort": "popular",
    "maxItemsPerChannel": 25
}
```

Channel inputs discover public videos, Shorts, and live replays, then return the
same row shape as direct post URLs.

#### 🎛️ Settings

| Option               | What it does                                                                              |
| -------------------- | ----------------------------------------------------------------------------------------- |
| `startUrls`          | YouTube post URLs, raw video IDs, channel URLs, channel IDs, `@handles`, or mixed inputs. |
| `maxItems`           | Optional total row cap. Leave blank to process every direct post input.                   |
| `maxItemsPerChannel` | Maximum public posts to discover from each channel input.                                 |
| `channelSort`        | `recent`, `popular`, or `oldest` channel discovery order.                                 |
| `publishedAfter`     | Only keep discovered channel posts published on or after a `YYYY-MM-DD` date.             |
| `publishedBefore`    | Only keep discovered channel posts published on or before a `YYYY-MM-DD` date.            |
| `maxAgeDays`         | Only keep discovered channel posts from the last N days.                                  |
| `titleIncludes`      | Only keep discovered channel posts whose public title contains one of these phrases.      |
| `titleExcludes`      | Skip discovered channel posts whose public title contains any of these phrases.           |
| `maxConcurrency`     | Controls how many YouTube posts are resolved at the same time.                            |
| `requestTimeoutSecs` | Maximum wait time for each public YouTube request.                                        |
| `failOnNoMetrics`    | Fails the run if none of the input URLs expose public metrics.                            |

### ⬆️ Output sample

Results are stored in the default dataset. Each result is one YouTube metric
row.

```json
{
    "inputUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "postUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "postId": "dQw4w9WgXcQ",
    "postType": "video",
    "isShort": false,
    "title": "Example YouTube video title",
    "description": "Example public description",
    "publishedAt": "2009-10-25",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "channelHandle": "@Example",
    "channelUrl": "https://www.youtube.com/@Example",
    "views": 123456789,
    "likes": 1234567,
    "comments": 12345,
    "remixes": null,
    "postMetricStatus": [
        {
            "metric": "views",
            "value": 123456789,
            "status": "present",
            "precision": "exact"
        },
        {
            "metric": "likes",
            "value": 1234567,
            "status": "present",
            "precision": "exact"
        },
        {
            "metric": "comments",
            "value": 12345,
            "status": "present",
            "precision": "display_rounded"
        }
    ],
    "collaborationCount": 1,
    "collaborationChannels": [
        {
            "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
            "handle": "@Example",
            "url": "https://www.youtube.com/@Example",
            "role": "owner"
        }
    ],
    "channelSubscribersCount": 4510000,
    "channelMetricStatus": [
        {
            "metric": "channelSubscribersCount",
            "value": 4510000,
            "status": "present",
            "precision": "display_rounded"
        }
    ],
    "status": "ok",
    "scrapedAt": "2026-06-24T00:00:00.000Z",
    "isLive": false
}
```

`inputUrl` preserves the input that produced the row. `postUrl` is the resolved
public YouTube post URL. For Shorts, `postUrl` uses the public Shorts URL shape.

### 🎯 Metric status

YouTube can expose exact, rounded, delayed, or unavailable counters depending on
the post type, channel settings, geography, and current public page state.

The status fields help you separate:

- `present` metrics that were found,
- `unavailable` metrics that YouTube did not expose publicly,
- `not_attempted` metrics that do not apply to that row,
- `exact` values that appeared as full public integers,
- `display_rounded` or `likely_rounded` values that appeared as rounded public
  display counts.

Missing counts stay missing. This lets you filter rows without guessing whether
a blank value means zero.

### 🚦 Status values

Rows use explicit statuses so partial, unavailable, or failed inputs are still
auditable.

| Status                       | Meaning                                                                                             |
| ---------------------------- | --------------------------------------------------------------------------------------------------- |
| `ok`                         | The public YouTube post resolved and at least one useful public metric or metadata field was found. |
| `resolved_no_public_metrics` | The input resolved, but public metric fields were not exposed for that item.                        |
| `invalid_input`              | The input was not a valid YouTube URL, video ID, channel ID, or `@handle`.                          |
| `unsupported_url`            | The URL is a YouTube surface this Actor does not support.                                           |
| `blocked_or_challenged`      | YouTube returned a challenge, unavailable page, or blocked response.                                |
| `failed`                     | The input could not be resolved after retry.                                                        |

### 🧾 Output summary

The `OUTPUT` record contains a compact run summary with input counts, discovered
URL counts, status counts, metric coverage counts, skipped-input counts, and
post-type counts.

Use it to audit a run quickly before downloading the full dataset.

### ⚠️ Notes and limitations

- Public pages can hide, round, delay, or omit metrics.
- Comment bodies are not collected. The Actor only returns public comment
  counts when available.
- Search result scraping, playlist scraping, hashtag discovery, transcripts,
  subtitles, and media downloads are not part of this Actor.
- Dislikes are not public and are not returned.
- Channel discovery is best-effort and depends on public channel pages.
- Apify Proxy is enabled by default because direct cloud requests to YouTube are
  commonly challenged.

### 🔗 Related social media scrapers

Combine this Actor with our other social media scrapers for discovery,
performance tracking, comment research, and transcript collection.

#### YouTube

- [YouTube Search Scraper](https://apify.com/chronometrica/youtube-search-scraper)
  — find public videos, Shorts, channels, and metrics by keyword.
- [YouTube Comments Scraper](https://apify.com/chronometrica/youtube-comments-scraper)
  — collect public comments, replies, authors, likes, pins, and creator hearts.
- [YouTube Transcript Scraper](https://apify.com/chronometrica/youtube-transcript-scraper)
  — extract public captions as clean text, timestamps, SRT, VTT, or LLM-ready
  output.

#### Facebook

- [Facebook Metrics Scraper](https://apify.com/chronometrica/facebook-metrics-scraper)
  — collect public post, Reel, video, and profile/page metrics.
- [Facebook Comments Scraper](https://apify.com/chronometrica/facebook-comments-scraper)
  — collect public comments, replies, authors, dates, and reactions from known
  Facebook content.

#### Instagram

- [Instagram Metrics Scraper](https://apify.com/chronometrica/instagram-metrics-scraper)
  — collect public post, Reel, carousel, profile, and collaboration metrics.
- [Instagram Comments Scraper](https://apify.com/chronometrica/instagram-comments-scraper)
  — collect public comments, authors, dates, likes, and reply counts from posts
  and Reels.

#### TikTok

- [TikTok Search Scraper](https://apify.com/chronometrica/tiktok-search-scraper)
  — find public TikTok videos, creators, and metrics by keyword.
- [TikTok Metrics Scraper](https://apify.com/chronometrica/tiktok-metrics-scraper)
  — collect public video, profile, engagement, hashtag, and music data.
- [TikTok Comments Scraper](https://apify.com/chronometrica/tiktok-comments-scraper)
  — collect public comments, replies, authors, likes, and thread links.
- [TikTok Transcript Scraper](https://apify.com/chronometrica/tiktok-transcript-scraper)
  — extract public caption text and timestamped segments from TikTok videos.

# Actor input Schema

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

Paste YouTube video URLs, Shorts URLs, video IDs, channel URLs, channel IDs, or @handles. Direct posts become metric rows. Channel inputs discover public posts first, then collect the same metrics.

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

Optional maximum metric rows across direct posts and channel discovery. Leave blank to process every public item the Actor can find. Large values such as 999999 are accepted.

## `channelSort` (type: `string`):

Choose the public channel discovery order.

## `publishedAfter` (type: `string`):

Only keep discovered channel posts published on or after this YYYY-MM-DD date.

## `publishedBefore` (type: `string`):

Only keep discovered channel posts published on or before this YYYY-MM-DD date.

## `maxAgeDays` (type: `integer`):

Only keep discovered channel posts from the last N days. This combines with Published on or after by using the newer lower-bound date.

## `titleIncludes` (type: `array`):

Only keep discovered channel posts whose public title contains at least one of these phrases.

## `titleExcludes` (type: `array`):

Skip discovered channel posts whose public title contains any of these phrases.

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

Use Apify Proxy for public YouTube requests. The default is enabled because direct cloud requests are commonly challenged by YouTube.

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

Maximum seconds to wait for each public YouTube request.

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

Maximum number of YouTube requests to resolve at the same time.

## `failOnNoMetrics` (type: `boolean`):

Fail the run if none of the input URLs expose public metrics. Individual URLs without metrics still emit rows with structured statuses.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "channelSort": "recent",
  "publishedAfter": "",
  "publishedBefore": "",
  "titleIncludes": [],
  "titleExcludes": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "requestTimeoutSecs": 20,
  "maxConcurrency": 8,
  "failOnNoMetrics": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `output` (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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chronometrica/youtube-metrics-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 = { "startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("chronometrica/youtube-metrics-scraper").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"
  ]
}' |
apify call chronometrica/youtube-metrics-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/cykekv5MVPOSaBpoP/builds/yfXeoCTOcsk5yaqBc/openapi.json
