# YouTube Video Details Scraper - Views, Likes & Comments (`aolmo/youtube-video-details`) Actor

Full details of any YouTube video by URL or id: exact views, likes, comments count, publish date, duration, category, tags, hashtags, chapters, description, channel and subscribers. No API key or quota. $0.001 per video; growth of views, likes and comments on scheduled runs.

- **URL**: https://apify.com/aolmo/youtube-video-details.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Categories:** Videos, Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 video scrapeds

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

Scrape the full details of any YouTube video by URL or id, without an API key and without quota limits. Paste video links (watch, youtu.be or Shorts) and the Actor returns one row per video: title, full description, exact view count, likes, comments count, publish and upload dates, duration, category, tags, hashtags, chapters, thumbnail, channel with id, URL and subscribers, and availability flags. Schedule it and every row carries the growth of views, likes and comments since the previous run: content analytics, competitor benchmarks, influencer vetting, campaign reporting and research datasets.

You pay $0.001 per video.

### What you get

One Dataset row per video:

- `videoId`, `url`, `title`, `description`, `thumbnail`.
- `views` (exact), `likes`, `comments`.
- `publishedAt`, `uploadDate`, `dateText`, `durationSeconds`, `category`.
- `keywords` (the video tags), `hashtags`, `chapters` (title and start time).
- `channelName`, `channelId`, `channelUrl`, `channelSubscribers`.
- `isLive`, `isLiveContent`, `isFamilySafe`, `isUnlisted`, `availableCountries`.
- `viewsChange`, `likesChange`, `commentsChange`: growth since the previous run (null on the first run).

Videos that are private, removed or age-gated return a row with an `error` field and are not charged.

### How to use it

1. Open the **Input** tab.
2. Paste video URLs or ids in **Video URLs or ids**, one per line.
3. Click **Start** and export the rows as JSON, CSV or Excel.
4. Schedule it (for example daily) to track how each video grows.

Need the videos of a channel or a search first? Use **YouTube Channel & Search Scraper**, then send its `url` column here for the full details.

### Input

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://youtu.be/9bZkp7q19f0", "https://www.youtube.com/shorts/abcdefghijk"]
}
```

| Field | Description |
|-------|-------------|
| `videoUrls` | Video URLs or 11-character ids. Up to 1,000 per run. |

### Output example

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelUrl": "https://www.youtube.com/@RickAstleyYT",
  "channelSubscribers": 4550000,
  "publishedAt": "2009-10-24T23:57:33-07:00",
  "views": 1826271632,
  "likes": 19487698,
  "comments": 2400000,
  "durationSeconds": 213,
  "category": "Music",
  "keywords": ["rick astley", "never gonna give you up"],
  "hashtags": ["RickAstley"],
  "chapters": [],
  "viewsChange": null
}
```

### Pricing

Pay per event, no subscription:

- **Video scraped**: $0.001 per video. 1,000 videos cost $1.
- **Stats changed**: $0.0005 per video whose views, likes or comments changed since the previous scheduled run.

Videos that cannot be read are free. Other YouTube scrapers charge $1 to $5 per 1,000 videos.

### Use it as an API

```bash
curl -X POST "https://api.apify.com/v2/acts/aolmo~youtube-video-details/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]}'
```

### FAQ

**Do I need a YouTube API key?** No, and there is no daily quota.

**Does it return the transcript or the comments?** No; use **YouTube Transcript API** and **YouTube Comments Scraper** for those.

**Why is the comments count rounded?** YouTube shows it rounded (2.4M); views and likes are exact.

**Where is the data stored between runs?** In a Key-Value Store of your account named `micro-saas-state-youtube-video-details`, one key per video.

# Actor input Schema

## `videoUrls` (type: `array`):

One per line: https://www.youtube.com/watch?v=..., https://youtu.be/..., a Shorts URL or the 11-character id. Up to 1,000 per run.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=9bZkp7q19f0"
  ],
  "product": "youtube-video-details"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=9bZkp7q19f0"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/youtube-video-details").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 = { "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=9bZkp7q19f0",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("aolmo/youtube-video-details").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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=9bZkp7q19f0"
  ]
}' |
apify call aolmo/youtube-video-details --silent --output-dataset

```

## MCP server setup

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

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/WjEG8IFpJvRa5afD9/builds/cWWhsulDFatlGjVh4/openapi.json
