# YouTube Scraper: Videos, Channels, Shorts & Search (`precious_bathmat/youtube-video-scraper`) Actor

Scrape YouTube videos from searches, channels, Shorts, live streams and playlists: views, dates, length, likes, comments and descriptions. Plus a report per channel or search: top videos, outliers, views per day and upload pace. No API key, no login.

- **URL**: https://apify.com/precious_bathmat/youtube-video-scraper.md
- **Developed by:** [Mariam Ahmed](https://apify.com/precious_bathmat) (community)
- **Categories:** Social media, Marketing
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 videos

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

## YouTube Scraper: Videos, Channels, Shorts & Search

Scrape **YouTube videos** from searches, channels, Shorts, live streams and playlists, with no API key and no login, and get a **report for every channel and search** that tells you what works:

- **Search** with YouTube's own filters: sort by views or date, upload date (hour to year), length, videos or Shorts
- **Channels** by link or @handle: the Videos, Shorts and Live tabs, sorted by latest, most popular or oldest, up to 5,000 videos per tab
- **Playlists** and **single videos**
- **Every video**: title, channel, views, date, length, Short or live, thumbnail and link
- **Details** (optional): exact views, likes, comment count, full description, hashtags and exact publish date
- **Reports**: top videos, fastest-growing videos, **outliers** (videos that beat the channel's usual views), upload pace, title words, top channels in a search, and channel facts (subscribers, total views, join date, country, links)

### What does this YouTube scraper do?

```
Marques Brownlee · @mkbhd · 21.3M subscribers · 5.73B total views · joined Mar 21, 2008
 Last 40 videos: median 4.8M views, 1.5 uploads a week, 9 in the last 30 days
 Outlier: "iPhone 18 Pro/Duo Impressions: Mogged" 27.5M views, 5.7× the usual

Search "best budget laptop" (this month, by views)
 Median 183K views · top channels: Just Josh, Techum, REVIEW SHEVIEW
 Outlier: "My Son Needs a New Laptop" 4.3M views, 23.6× the median
```

1. Add **search terms**, **channels**, **playlists** or **video links**, in any mix.
2. Pick search filters, channel tabs and sort order, and how many videos to read from each.
3. You get **one row per video** in the dataset, **one report per search, channel tab and playlist**, and a file of **channel facts**.

```mermaid
flowchart LR
    A[Search terms<br/>+ filters] --> D[Videos<br/>one row each]
    B[Channels<br/>videos, Shorts, live] --> D
    C[Playlists,<br/>video links] --> D
    D --> E[Details<br/>likes, comments,<br/>description, date]
    D --> F[Reports<br/>top, outliers,<br/>upload pace,<br/>channel facts]
```

### Who is it for?

- **YouTubers**: find the outliers in your niche, the titles and topics that beat a channel's usual views, and how often competitors upload
- **Marketers and agencies**: shortlist creators for a campaign by views, growth and upload pace; track a brand's channel
- **Researchers and analysts**: what YouTube ranks for a search, who dominates it, and how fresh the results are
- **Product and e-commerce teams**: every review of your product (or a competitor's) with views, likes and comments
- **AI and data teams**: titles, descriptions and hashtags at scale

### What data do you get?

**Videos** (dataset, one row per video)

| Field | What it tells you |
|---|---|
| `sourceType`, `source`, `rank` | Which search, channel tab or playlist it came from, and its position |
| `videoId`, `title`, `url`, `thumbnailUrl` | The video |
| `channelName`, `channelId`, `channelUrl`, `channelSubscribers` | Who posted it |
| `views`, `viewsRounded` | Views (exact in search results and with details; rounded on channel pages and playlists) |
| `publishedTimeText`, `approxPublishedAt`, `ageDays` | When it was posted |
| `duration`, `durationSeconds` | Length |
| `isShort`, `isLive`, `isUpcoming`, `wasLive` | Short, live now, scheduled, or a past live stream |
| `descriptionSnippet` | Description snippet (search results) |
| `likes`, `comments`, `publishDate`, `description`, `hashtags` | With details on |

**Report** (`REPORTS` and `REPORT_<type>-<name>`, one per search, channel tab and playlist)

| Field | What it tells you |
|---|---|
| `videosRead`, `totalViews`, `medianViews`, `meanViews`, `medianViewsPerDay` | How the videos perform |
| `topVideos`, `fastestGrowing` | The 10 most viewed, and the 10 with the most views per day since posting |
| `outliers` | Videos with 3× or more the median views, and by how much (needs 10+ videos) |
| `uploads`, `uploadsPerWeek`, `newestVideo` | Upload pace (channels read by latest) |
| `medianLengthSeconds`, `shortsSharePercent`, `liveSharePercent` | What kind of videos |
| `topTitleWords` | Words that recur in titles |
| `topChannels` | Who dominates a search or playlist |
| `channel` | Subscribers, total views, video count, join date, country, description, links |

`CHANNELS` lists every channel read, `REPORTS_CSV` has one flat row per report, and `RUN_SUMMARY` lists problems and the limits of the data.

### Example: 2 October 2026

One run with 2 searches (this month, sorted by views), 4 channels, a playlist and a video, 40 videos each with details: **243 videos and 7 reports**.

| Source | Median views | Upload pace | Biggest outlier |
|---|---|---|---|
| Search "iphone 18 review" | 4.0M | - | Apple Event, 50.4M views (12.4×) |
| Search "best budget laptop" | 183K | - | "My Son Needs a New Laptop", 4.3M (23.6×) |
| Marques Brownlee, videos | 4.8M | 1.5 a week | "iPhone 18 Pro/Duo Impressions", 27.5M (5.7×) |
| Veritasium, videos | 10.3M | 0.75 a week | "The Closest Thing We Have to Alien...", 59.7M (5.8×) |
| MrBeast, Shorts | 128M | 1.4 a week | "Who's The Strongest Streamer?", 1.01B (7.9×) |
| Lex Fridman, videos | 1.0M | 0.8 a week | "Pavel Durov: Telegram...", 3.1M (3.1×) |

Apple posted 8 of the top 40 "iphone 18 review" videos this month; Marques Brownlee and Mrwhosetheboss 4 each.

A second run read **1,500 videos and 123 Shorts from one channel plus 293 search results in 44 seconds**.

### Pricing

**$0.002 per video** ($2 per 1,000), **$0.002 per video for details** (when turned on), and **$0.02 per report**.

- A channel's last 50 videos with a report: **$0.12**
- The same with details: **$0.22**
- 1,000 videos from one channel, no details, one report: **$2.02**
- Single video links include details at **$0.002** each

Turn off reports to pay for videos only.

### Good to know

- **Views**: search results and details give exact views. Channel tabs and playlists show YouTube's rounded figure ("4.6M views", `viewsRounded: true`); turn on details for exact numbers.
- **Dates**: listings show "2 days ago", so `approxPublishedAt` is approximate. Details add the exact publish date. Shorts listings carry no date or length; details add the date.
- **Likes** are exact when YouTube sends them, otherwise rounded (`likesRounded`). Comment counts are rounded by YouTube; empty when comments are turned off.
- **YouTube's search ends** after a few hundred results (293 for "python tutorial"). Use filters or more specific terms to go further.
- **Upload pace** is only worked out for channels read by "Latest"; "Most popular" gives a channel's all-time best videos instead.
- **No personal data**: public channel and video information only. Email addresses in channel and video descriptions are hidden.
- **Large runs keep going**: YouTube blocks an address after a few hundred pages. The Actor then switches to Apify Proxy on its own (datacenter first, residential only if needed), at no extra cost to you. If every address is blocked, the run stops cleanly and keeps what it read.
- Data comes from **YouTube's own web API**, the one youtube.com uses for search, channel pages and playlists.

### Input

| Field | Meaning |
|---|---|
| **Search terms** | Words, or YouTube search links |
| **Channels** | Channel links, @handles or channel ids (a link to a Shorts or Live tab reads that tab) |
| **Playlists** | Playlist links or ids |
| **Videos** | Video or Shorts links or ids |
| **Videos per search, channel tab or playlist** | 1 to 5,000 (default 50) |
| **Search: sort, upload date, length, videos or Shorts** | YouTube's search filters |
| **Channel: tabs** | Videos, Shorts, Live streams |
| **Channel: sort** | Latest, most popular, oldest |
| **Add video details** | Off by default |
| **Reports** | On by default |

### Integrations

Export to JSON, CSV, Excel or Google Sheets, or connect through the Apify API, webhooks, Make, Zapier and n8n. **Schedule it** to follow competitors' channels or a search every day.

# Actor input Schema

## `searchTerms` (type: `array`):

What you would type in YouTube's search box. A YouTube search link also works.

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

Channel links, @handles or channel ids. A link to a channel's Shorts or Live tab reads that tab.

## `playlists` (type: `array`):

Playlist links or ids.

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

Single video or Shorts links or ids. Always read with details (likes, comments, description, exact date).

## `maxVideos` (type: `integer`):

Most videos to read from each search, each channel tab and each playlist (1 to 5,000).

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

How search results are ordered.

## `uploadDate` (type: `string`):

Only videos uploaded in this period.

## `duration` (type: `string`):

Only videos of this length.

## `searchType` (type: `string`):

Search regular videos or Shorts.

## `channelTabs` (type: `array`):

Which tabs to read on each channel.

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

Latest shows upload pace in the report; Most popular gives a channel's all-time best videos.

## `includeDetails` (type: `boolean`):

Open each video for exact views, likes, comment count, full description, hashtags and the exact publish date. One extra request and one extra charge per video.

## `includeReports` (type: `boolean`):

One report per search, channel tab and playlist: top videos, fastest-growing, outliers, upload pace, title words, channel facts.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone 18 review"
  ],
  "channels": [
    "@mkbhd"
  ],
  "maxVideos": 50,
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "searchType": "videos",
  "channelTabs": [
    "videos"
  ],
  "channelSort": "latest",
  "includeDetails": false,
  "includeReports": true
}
```

# Actor output Schema

## `videos` (type: `string`):

One row per video: title, channel, views, date, length, Short or not, link; with details also likes, comments, description, hashtags.

## `reports` (type: `string`):

Per search, channel tab and playlist: top videos, fastest-growing, outliers, upload pace, title words, channel facts.

## `reportsCsv` (type: `string`):

One flat row per report.

## `channels` (type: `string`):

Subscribers, total views, video count, join date, country and links of each channel read.

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

Requests, problems and the limits of the data.

# 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 = {
    "searchTerms": [
        "iphone 18 review"
    ],
    "channels": [
        "@mkbhd"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("precious_bathmat/youtube-video-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 = {
    "searchTerms": ["iphone 18 review"],
    "channels": ["@mkbhd"],
}

# Run the Actor and wait for it to finish
run = client.actor("precious_bathmat/youtube-video-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 '{
  "searchTerms": [
    "iphone 18 review"
  ],
  "channels": [
    "@mkbhd"
  ]
}' |
apify call precious_bathmat/youtube-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,precious_bathmat/youtube-video-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/FALCoFxXzRJRuBBYu/builds/iA1fCYPkEuVTRtgpi/openapi.json
