# YouTube Video Stats: Views, Likes, Comments by Video URL (`accountable_eel/youtube-video-stats-lookup`) Actor

Paste YouTube video URLs or IDs and get one row per video: exact views, likes and comment count, duration, publish date, category, tags, description and channel. No login, no Google API key, no API quota. Private or removed videos are free.

- **URL**: https://apify.com/accountable_eel/youtube-video-stats-lookup.md
- **Developed by:** [Adriana Voss](https://apify.com/accountable_eel) (community)
- **Categories:** Social media, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 video returneds

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

## YouTube Video Stats: Views, Likes, Comments by Video URL

**Paste a list of YouTube video URLs or IDs and get a spreadsheet with each video's exact views, likes, comment count, duration and publish date.**

### Who uses this

- **Creator and brand teams** tracking how a set of competitor or campaign videos performs, without opening each one.
- **Agencies and analysts** filling a Google Sheet or Airtable with view and like counts for a client report.
- **Researchers and data teams** collecting tags, category and publish dates for a list of video IDs, with no Google API key and no daily quota.

### Try it in 30 seconds

The input box already holds two real video IDs. Click **Start** and you get one row per video. No login, no cookies, no API key.

### Example output

Real rows from a keyless run on 2026-10-11:

| videoId | title | views | likes | comments | duration (s) | published |
|---|---|---|---|---|---|---|
| dQw4w9WgXcQ | Rick Astley - Never Gonna Give You Up | 1,825,571,544 | 19,484,272 | 2,458,789 | 213 | 2009-10-24 |
| jNQXAC9IVRw | Me at the zoo | 442,880,517 | 20,055,529 | 10,638,397 | 19 | 2005-04-23 |
| 9bZkp7q19f0 | PSY - GANGNAM STYLE | 6,089,273,797 | 32,303,429 | 5,465,116 | 252 | 2012-07-15 |

Every row also carries channel name, ID and URL, category, tags, description, thumbnail and live/unlisted flags.

### What it costs

About **$0.60 to $0.80 per 1,000 videos returned**, depending on your Apify plan, and nothing at all for a video that is private, removed or mistyped. First runs fit inside Apify's free credit.

### Why this one

- **Exact numbers, not the rounded ones on the page.** The watch page shows "1.8B views" and "19M"; the page's own data carries the full integers, and that is what you get.
- **Comment count included.** The count comes from the same public comments panel a visitor sees. A video with comments turned off returns `null` and `commentsEnabled: false`, never a fake 0.
- **Missing is `null`, never 0.** A hidden like count or a video with no tags comes back empty, so a chart never plots a false zero.
- **Never charged for a miss.** A private, removed or bot-checked video comes back as a clean `NOT_FOUND` or `BLOCKED` row and costs nothing.
- **Any URL shape works.** `watch?v=`, `youtu.be/`, Shorts, embed and live links, or a bare 11-character ID.
- **No API key and no quota.** It reads the public watch page, so there is no Google Cloud project to set up and no 10,000-unit daily limit to plan around.

### Example runs

Keyless runs, no API key and no login. Counts move by the minute, so yours will be slightly higher.

**1. The prefilled input, run on a datacenter IP that YouTube bot-checked**

```json
{ "videos": ["dQw4w9WgXcQ", "jNQXAC9IVRw"] }
```

One row for `Rick Astley - Never Gonna Give You Up` (1,825,571,456 views, 19,484,269 likes, 2,458,789 comments) and one `BLOCKED` row for the second video, with the message "YouTube asked this connection to confirm it is not a bot". The blocked line cost nothing. Later versions re-fetch a bot-checked page on a fresh proxy IP before giving up.

**2. A mix of IDs and a short link**

```json
{ "videos": ["dQw4w9WgXcQ", "jNQXAC9IVRw", "https://youtu.be/9bZkp7q19f0"] }
```

Three rows, one per video, the short link resolved to `9bZkp7q19f0` (`PSY - GANGNAM STYLE`, 6,089,273,797 views, category Music, 14 tags). Run time about 8 seconds, platform cost under $0.0005.

**3. A line that is not a video**

```json
{ "videos": ["dQw4w9WgXcQ", "https://www.youtube.com/@NASA"] }
```

A channel link is not a video, so that line comes back as one `BAD_FORMAT` row that says so, and only the real video is returned. A private or removed video returns a `NOT_FOUND` row the same way, and a YouTube bot check returns `BLOCKED`; none of these is charged.

### How to use

1. **In the Apify Console.** Open the actor page and click **Start** — the `videos` field is already pre-filled with a working example. Results land in the run's dataset as soon as each item is found.
2. **Via the API.** Call it directly with a POST request — no Console needed once you have an API token:
   ```bash
   curl "https://api.apify.com/v2/acts/accountable_eel~youtube-video-stats-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"videos":["dQw4w9WgXcQ","jNQXAC9IVRw"]}'
   ```
3. **On a schedule.** Save this actor as an Apify **Task** with the input you want, then add a **Schedule** (hourly, daily, weekly) so it runs on its own — no server of your own required.

### Input

```json
{
  "videos": [
    "dQw4w9WgXcQ",
    "jNQXAC9IVRw"
  ]
}
```

One YouTube video URL or 11-character video ID per line. Accepted formats: dQw4w9WgXcQ, https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://youtu.be/dQw4w9WgXcQ, https://www.youtube.com/shorts/jNQXAC9IVRw.

```json
{
  "items": ["<identifier-1>", "<identifier-2>"],
  "maxConcurrency": 5
}
```

`items` is a list of YouTube video URLs or 11-character video IDs. One dataset row is returned
per item; rows with `"found": false` are never charged.

### Output

One row per item, for example:

| query | found | status | videoId | url | title | channelName | channelId | channelUrl | viewCount | likeCount | commentCount | commentsEnabled | durationSeconds | publishedAt | category | tags | description | isLive | isUnlisted | thumbnailUrl | scrapedAt |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| dQw4w9WgXcQ | true | OK | <video id> | <video url> | <title> | <channel> | <channel id> | <channel url> | <views> | <likes> | <comments> | <comments on> | \<duration (seconds)> | <published> | <category> | <tags> | <description> | <live content> | <unlisted> | <thumbnail> | 1970-01-01T00:00:00.000Z |

A miss comes back as a row with `"found": false` and is never charged.

### Pricing

Pay-per-event. A flat per-run fee covers session/proxy warmup; you're billed
per item only when data is actually found and returned — see
`.actor/pay_per_event.json` for exact prices. A miss is never charged.

### Use it from Clay, n8n, Make, or an AI agent

This actor runs synchronously over plain HTTP — call it directly from a script, a workflow tool, or an AI agent, no Apify Console needed once you have an API token.

```bash
curl "https://api.apify.com/v2/acts/accountable_eel~youtube-video-stats-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"videos":["dQw4w9WgXcQ","jNQXAC9IVRw"]}'
```

**n8n.** Add an HTTP Request node: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~youtube-video-stats-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body Content Type `JSON`, JSON Body `{"videos":["dQw4w9WgXcQ","jNQXAC9IVRw"]}` (swap in an expression from an earlier node for a real value).

**Clay.** Add an "HTTP API" column: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~youtube-video-stats-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body `{"videos":["{{video}}"]}`, mapping the row's video into the `videos` array.

**MCP.** In Claude, Cursor, or any MCP client with the Apify MCP server, ask for "youtube video stats scraper" — the agent will find and run this actor.

# Actor input Schema

## `videos` (type: `array`):

One YouTube video URL or 11-character video ID per line. Accepted formats: dQw4w9WgXcQ, https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://youtu.be/dQw4w9WgXcQ, https://www.youtube.com/shorts/jNQXAC9IVRw. You're only charged for the ones we actually find — a miss costs nothing.

## `testRun` (type: `boolean`):

Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.

## `onlyFound` (type: `boolean`):

Only keep rows where something was actually found. Misses are always free, whether or not you show them here.

## `includeKeywords` (type: `array`):

Optional. Only keep results that mention at least one of these words (e.g. a job title, a city, a product name). Leave empty to keep everything.

## `excludeKeywords` (type: `array`):

Optional. Drop any result that mentions one of these words. Leave empty to skip nothing.

## `maxResults` (type: `integer`):

Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit.

## `columns` (type: `array`):

Choose which pieces of information to include in each result row. All are included by default.

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

Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.

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

Apify Proxy config. Residential recommended for anti-bot-sensitive targets.

## Actor input object example

```json
{
  "videos": [
    "dQw4w9WgXcQ",
    "jNQXAC9IVRw"
  ],
  "testRun": false,
  "onlyFound": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "columns": [
    "videoId",
    "url",
    "title",
    "channelName",
    "channelId",
    "channelUrl",
    "viewCount",
    "likeCount",
    "commentCount",
    "commentsEnabled",
    "durationSeconds",
    "publishedAt",
    "category",
    "tags",
    "description",
    "isLive",
    "isUnlisted",
    "thumbnailUrl"
  ],
  "maxConcurrency": 5,
  "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 = {
    "videos": [
        "dQw4w9WgXcQ",
        "jNQXAC9IVRw"
    ],
    "includeKeywords": [],
    "excludeKeywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("accountable_eel/youtube-video-stats-lookup").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 = {
    "videos": [
        "dQw4w9WgXcQ",
        "jNQXAC9IVRw",
    ],
    "includeKeywords": [],
    "excludeKeywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("accountable_eel/youtube-video-stats-lookup").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 '{
  "videos": [
    "dQw4w9WgXcQ",
    "jNQXAC9IVRw"
  ],
  "includeKeywords": [],
  "excludeKeywords": []
}' |
apify call accountable_eel/youtube-video-stats-lookup --silent --output-dataset

```

## MCP server setup

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

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/Rkj4JBYnPM7jU0dZg/builds/Npm2jDLLTeyOFAKdo/openapi.json
