# YouTube Data Extractor (`esdrasdw/youtube-data-extractor`) Actor

High-quality YouTube data, delivered fast: Shorts and videos from public channels with views, duration, thumbnail and publish time. From $0.35 per 1,000 results.

- **URL**: https://apify.com/esdrasdw/youtube-data-extractor.md
- **Developed by:** [Esdrasdw](https://apify.com/esdrasdw) (community)
- **Categories:** Social media, Videos, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 results

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 Shorts, Videos & Lives Scraper

Collect **Shorts**, **long-form videos** and **live streams** from any public YouTube channel with **exact** numbers: view count, like count, publish date and time, duration, category, description and tags. Add one channel or hundreds, pick the tabs you want, and get a clean table you can download as JSON, CSV or Excel.

No YouTube API key, no login and no quota to manage.

⚡ **Fast.** Channels and tabs run in parallel: a whole channel with almost 2,000 videos comes back in seconds.

### What you can do with it

- **Analyze a creator's Shorts strategy**: see which Shorts got the most views and likes.
- **Audit a channel's content**: export every video with exact views, likes, duration and publish date.
- **Benchmark competitors**: run several channels at once and compare their numbers side by side.
- **Track growth over time**: schedule a daily run with **Only uploads newer than** = `2 days` and compare the numbers day by day.
- **Find a channel's greatest hits**: sort by **Popular** and keep the top 20.

### Input

| Field | What it does | Example |
|---|---|---|
| **Channels** | One channel per line: handle, channel ID, `c/` path or full URL. | `@MrBeast`, `https://www.youtube.com/@mkbhd` |
| **Content type** | `shorts`, `videos`, `streams`, `both` (Shorts and videos) or `all`. | `all` |
| **Shorts per channel** | Maximum Shorts per channel (0 skips them). | `50` |
| **Videos per channel** | Maximum long-form videos per channel (0 skips them). | `50` |
| **Live streams per channel** | Maximum live streams, current and past, per channel. | `20` |
| **Sort by** | `latest` (default), `popular` or `oldest`, like the buttons on YouTube. | `popular` |
| **Only uploads newer than** | A date (`2024-01-31`) or a period (`7 days`, `2 weeks`). | `7 days` |
| **Exact numbers and dates** | On by default. Off = fastest run with only what the channel page shows. | `true` |
| **Language** | Language for titles: `en` (default) or `pt`. | `en` |

Example input:

```json
{
  "channels": ["@MrBeast", "@mkbhd"],
  "mode": "all",
  "shorts_limit": 30,
  "videos_limit": 30,
  "streams_limit": 10,
  "sortBy": "latest",
  "newerThan": "30 days"
}
```

### Output

Each Short, video or live stream is one row in the dataset:

```json
{
  "channel": "@MrBeast",
  "channel_title": "MrBeast",
  "channel_id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "type": "video",
  "id": "q6fgVVmdpgY",
  "title": "$250,000 Hunger Games In Real Life",
  "views": 80727046,
  "likes": 1261620,
  "url": "https://www.youtube.com/watch?v=q6fgVVmdpgY",
  "thumb": "https://i.ytimg.com/vi/q6fgVVmdpgY/hq720.jpg",
  "published": "4 days ago",
  "published_at": "2026-11-14T09:00:05-08:00",
  "duration": "33:58",
  "duration_seconds": 2037,
  "category": "Entertainment",
  "description": "...",
  "keywords": ["..."],
  "hashtags": null,
  "mentions": null,
  "position": 1
}
```

| Field | Description |
|---|---|
| `channel`, `channel_title`, `channel_id` | The channel as given, its display name and its ID. |
| `type` | `short`, `video` or `stream`. |
| `id`, `url` | Video ID and link. |
| `title` | Video title. |
| `views` | Exact view count. For a stream on air, the number watching now. |
| `likes` | Exact like count. |
| `published_at` | Exact publish date and time (ISO 8601); only the date (`2026-11-14`) when YouTube does not give the time. |
| `published` | Relative publish time as shown on the channel page (videos and streams). |
| `duration`, `duration_seconds` | Length as shown on the thumbnail and in seconds. |
| `is_live`, `live_started_at` | Whether a stream is on air now, and when it started. |
| `category`, `description`, `keywords` | YouTube category, full description and the creator's tags, when YouTube provides them. |
| `thumb` | Largest thumbnail available. |
| `hashtags`, `mentions` | Hashtags and @mentions found in the title. |
| `position` | Position in the tab, in the chosen order. |

With **Exact numbers and dates** off, `views` is the rounded number from the channel page (for example 3.8M) and `likes`, `published_at`, `category`, `description` and `keywords` stay empty.

The **Overview** tab of the dataset shows the thumbnail, title, link, views, likes, type, publish date and duration in a table. The run summary with the results per channel and tab is saved as `OUTPUT` in the key-value store.

### Pricing

You pay for the results you get, plus a $0.00005 fee when a run starts.

| Apify plan | Price per 1,000 results |
|---|---|
| Free | $0.50 |
| Starter | $0.35 |
| Scale and Business | $0.35 |

### Good to know

- Only public channels and videos are collected.
- A channel that does not exist, or a tab the channel does not have (for example no live streams), returns no rows and is listed in `OUTPUT`. Nothing is charged for it.
- With **Only uploads newer than** and **Latest** order, the run stops reading a tab as soon as it reaches older uploads.
- If you set a maximum cost per run, the run stops when it is reached and keeps everything collected so far.
- YouTube auto-translates some titles into the language you pick. Choose **Portuguese** for Brazilian channels to keep their original titles, and **English** for everything else.

### FAQ

**Do I need a YouTube API key?** No.

**How many channels can I add?** As many as you want. Eight channels run at the same time.

**Can I get only the newest uploads?** Yes. Set **Only uploads newer than** to a period such as `2 days`, or set a small limit per channel with **Latest** order.

**Are the numbers rounded?** No. Views and likes are the exact counts, and the publish date comes with the time.

# Actor input Schema

## `channels` (type: `array`):

One channel per line. Accepts a handle (@MrBeast), channel/UC... IDs, c/Name paths or the full channel URL.

## `mode` (type: `string`):

Which tabs of each channel to collect.

## `shorts_limit` (type: `integer`):

Maximum number of Shorts per channel. Used when the content type includes Shorts. 0 skips Shorts.

## `videos_limit` (type: `integer`):

Maximum number of long-form videos per channel. Used when the content type includes videos. 0 skips videos.

## `streams_limit` (type: `integer`):

Maximum number of live streams (current and past) per channel. Used when the content type includes live streams. 0 skips them.

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

Order of each tab, the same as the Latest / Popular / Oldest buttons on YouTube. The limits above count from the top of this order.

## `newerThan` (type: `string`):

Skip anything published before this date. Accepts a date (2024-01-31) or a period such as "7 days", "2 weeks" or "3 months". With Latest order the run stops as soon as it reaches older uploads, so daily monitoring is fast and cheap.

## `exactDetails` (type: `boolean`):

Exact view count, like count, publish date and time, duration in seconds, category, description and tags for every result. Turn off for the fastest run with only what the channel page shows (rounded views, relative dates, no likes).

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

Language YouTube uses for titles and publish times. YouTube auto-translates some titles, so pick the language of the channels you follow (for example Portuguese for Brazilian channels).

## Actor input object example

```json
{
  "channels": [
    "@MrBeast",
    "https://www.youtube.com/@GoogleDevelopers"
  ],
  "mode": "both",
  "shorts_limit": 50,
  "videos_limit": 50,
  "streams_limit": 50,
  "sortBy": "latest",
  "exactDetails": true,
  "language": "en"
}
```

# Actor output Schema

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

Every Short, video and live stream collected, with views, likes, publish date, link and thumbnail. Ready to download as JSON, CSV or Excel.

## `summary` (type: `string`):

Results per channel and tab, run time and status.

# 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 = {
    "channels": [
        "@MrBeast",
        "https://www.youtube.com/@GoogleDevelopers"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("esdrasdw/youtube-data-extractor").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 = { "channels": [
        "@MrBeast",
        "https://www.youtube.com/@GoogleDevelopers",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("esdrasdw/youtube-data-extractor").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 '{
  "channels": [
    "@MrBeast",
    "https://www.youtube.com/@GoogleDevelopers"
  ]
}' |
apify call esdrasdw/youtube-data-extractor --silent --output-dataset

```

## MCP server setup

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

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/RcJtFgaivwZe0xLD8/builds/85z7RIGJ4dDY1AA5b/openapi.json
