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

Scrape YouTube search results, channels, playlists, Shorts and videos: title, views, exact likes, comment count, publish date, duration, description, chapters, hashtags and channel subscribers. Search filters for upload date, duration and sort. No API key, no browser. Pay per video.

- **URL**: https://apify.com/murch1k/youtube-scraper.md
- **Developed by:** [Murch1k](https://apify.com/murch1k) (community)
- **Categories:** Videos, Social media, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.50 / 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

## YouTube Scraper — Search Results, Channels, Playlists, Videos & Shorts

Scrape **YouTube search results, channel videos, Shorts, live streams, playlists and single videos** into a clean table: **title, views, exact likes, comment count, publish date, duration, full description, chapters, hashtags, thumbnail, channel name, handle, subscribers and verified badge**.

Works like the YouTube website (search filters included), but returns structured data you can export to Excel, CSV, JSON or Google Sheets. No YouTube API key, no quota, no login, no browser.

### Features

- **Every source in one run:** search terms, `@channels`, playlists and video/Shorts links together. A video found by two sources is returned (and billed) only once.
- **Exact like counts** (e.g. `2,344`, not `2.3K`) and comment counts, plus channel subscriber counts on every row.
- **Search filters:** upload date (hour → year), duration (under 4 min, 4–20 min, over 20 min) and sort (relevance, upload date, views, rating). `rank` keeps YouTube's result order for SEO tracking.
- **Channel tabs:** latest Videos, Shorts or Live streams.
- **Chapters & hashtags** parsed from descriptions.
- **HTTP only, no browser:** uses YouTube's own web API; about 1 s per 10 videos with details. Switch off `scrapeDetails` for list-only runs.
- **Pay per video:** $2.50 per 1,000 videos — well below typical YouTube scrapers — with a hard cost cap.

### Use cases

- **YouTube SEO & keyword research:** who ranks for a term, with what titles, durations and engagement.
- **Competitor and channel monitoring:** export a channel's latest uploads with views, likes and comments every day.
- **Influencer discovery:** search a niche, sort by views, and get channel subscribers + verified badge per result.
- **Content research for AI:** collect descriptions, chapters and hashtags at scale.
- **Market research:** track how products are reviewed on YouTube (pair with our YouTube Comments and YouTube Transcript scrapers).

### Input

```json
{
  "searchQueries": ["best budget phone 2026"],
  "startUrls": ["@mkbhd", "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI", "https://www.youtube.com/shorts/0e3GPea1Tyg"],
  "maxResultsPerSource": 50,
  "scrapeDetails": true,
  "sortBy": "relevance",
  "uploadDate": "month",
  "duration": "any",
  "channelTab": "videos"
}
```

| Option | Default | Notes |
|---|---|---|
| `searchQueries` | — | Search terms. |
| `startUrls` | — | Channels, playlists, video/Shorts URLs or IDs. |
| `maxResultsPerSource` | 50 | Per search / channel / playlist. |
| `scrapeDetails` | `true` | Exact likes, comment count, date, description, chapters, subscribers. |
| `sortBy` | `relevance` | `relevance`, `date`, `views`, `rating` (search only). |
| `uploadDate` | `any` | `hour`, `today`, `week`, `month`, `year` (search only). |
| `duration` | `any` | `short` (<4 min), `medium` (4–20), `long` (>20) (search only). |
| `channelTab` | `videos` | `videos`, `shorts`, `streams`. |
| `maxResults` | 0 | Cost cap for the whole run. |
| `maxConcurrency` | 20 | Video pages in parallel. |

### Output

#### Real output (default input)

First 2 of 20 records from a run with the prefilled input (4.0 s on a test machine; long values shortened here):

```json
[
  {
    "videoId": "QVv3mQzlrN0",
    "url": "https://www.youtube.com/watch?v=QVv3mQzlrN0",
    "title": "Apple Homeview Impressions: Not Convinced!",
    "description": "New Smart home display from Apple. With plenty of quirks and features.\n\nThe deskpad! http://shop.MKBHD.com\n\nPlaylist of MKBHD Intro music: h…",
    "viewCount": 6764780,
    "likes": 87163,
    "commentCount": 6600,
    "publishedDate": "2026-10-13",
    "publishedTimeText": "1 day ago",
    "durationSeconds": 707,
    "durationText": "11:47",
    "isShort": false,
    "isLive": false,
    "wasLive": false,
    "hashtags": [],
    "chapters": [],
    "thumbnail": "https://i.ytimg.com/vi/QVv3mQzlrN0/hq720.jpg",
    "channelName": "Marques Brownlee",
    "channelId": "UCBJycsmduvYEL83R_U4JriQ",
    "channelHandle": "@mkbhd",
    "channelUrl": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ",
    "channelSubscribers": 21400000,
    "channelVerified": true,
    "sourceType": "channel",
    "source": "@mkbhd",
    "rank": 1,
    "scrapedAt": "2026-10-15T12:03:33.325Z"
  },
  {
    "videoId": "_0G4OG39XjI",
    "url": "https://www.youtube.com/watch?v=_0G4OG39XjI",
    "title": "WTF is a Googlebook?",
    "description": "New laptops are dropping left and right! Let's talk about Google's entry.\n\nMKBHD Merch: http://shop.MKBHD.com\n\nPlaylist of MKBHD Intro music…",
    "viewCount": 7838345,
    "likes": 95477,
    "commentCount": 7700,
    "publishedDate": "2026-10-08",
    "publishedTimeText": "6 days ago",
    "durationSeconds": 853,
    "durationText": "14:13",
    "isShort": false,
    "isLive": false,
    "wasLive": false,
    "hashtags": [],
    "chapters": [],
    "thumbnail": "https://i.ytimg.com/vi/_0G4OG39XjI/hq720.jpg",
    "channelName": "Marques Brownlee",
    "channelId": "UCBJycsmduvYEL83R_U4JriQ",
    "channelHandle": "@mkbhd",
    "channelUrl": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ",
    "channelSubscribers": 21400000,
    "channelVerified": true,
    "sourceType": "channel",
    "source": "@mkbhd",
    "rank": 2,
    "scrapedAt": "2026-10-15T12:03:33.393Z"
  }
]
```

```json
{
  "videoId": "Oi3uzDEFflo",
  "url": "https://www.youtube.com/watch?v=Oi3uzDEFflo",
  "title": "Best Budget Phones (Summer 2026) | Top 10 Tested & Reviewed",
  "description": "Reviewing the best budget smartphones for Summer time 2026 in the UK…",
  "viewCount": 161899,
  "likes": 2344,
  "commentCount": 216,
  "publishedDate": "2026-07-26",
  "publishedTimeText": "2 months ago",
  "durationSeconds": 669,
  "durationText": "11:09",
  "isShort": false,
  "isLive": false,
  "wasLive": false,
  "hashtags": [],
  "chapters": [
    { "start": 0, "startText": "0:00", "title": "Budget blowers ahoy" },
    { "start": 45, "startText": "0:45", "title": "Xiaomi Redmi Note 15" }
  ],
  "thumbnail": "https://i.ytimg.com/vi/Oi3uzDEFflo/hq720.jpg",
  "channelName": "Tech Spurt",
  "channelId": "UCVLN0tY51ewH44wUtx3YZTA",
  "channelHandle": "@TechSpurt",
  "channelUrl": "https://www.youtube.com/channel/UCVLN0tY51ewH44wUtx3YZTA",
  "channelSubscribers": 1400000,
  "channelVerified": true,
  "sourceType": "search",
  "source": "best budget phone 2026",
  "rank": 1,
  "scrapedAt": "2026-10-13T19:40:00.000Z"
}
```

### Use with AI agents (MCP), LangChain, RAG & the API

This actor is a ready-made **tool for AI agents**: an LLM can call it, wait for the run and read clean JSON back.

**MCP server (Claude Desktop, Claude Code, Cursor, VS Code, any MCP client)** — add Apify's hosted MCP server with this actor enabled as a tool:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=murch1k/youtube-scraper",
      "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
    }
  }
}
```

**LangChain / LangGraph** (`pip install langchain-apify`, set `APIFY_API_TOKEN`):

```python
import json
from langchain_apify import ApifyActorsTool, ApifyWrapper
from langchain_core.documents import Document

## 1) give the actor to an agent as a tool
tool = ApifyActorsTool("murch1k/youtube-scraper")

## 2) or load results as Documents for a RAG index
loader = ApifyWrapper().call_actor(
    actor_id="murch1k/youtube-scraper",
    run_input={"searchQueries": ["best budget phone 2026"], "startUrls": ["@mkbhd", "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI", "https://www.youtube.com/shorts/0e3GPea1Tyg"], "maxResultsPerSource": 50, "scrapeDetails": True, "sortBy": "relevance", "uploadDate": "month", "duration": "any", "channelTab": "videos"},
    dataset_mapping_function=lambda item: Document(page_content=json.dumps(item, ensure_ascii=False), metadata={"url": item.get("url")}),
)
docs = loader.load()
```

**REST API — one synchronous call, dataset items in the response:**

```bash
curl -X POST "https://api.apify.com/v2/acts/murch1k~youtube-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries": ["best budget phone 2026"], "startUrls": ["@mkbhd", "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI", "https://www.youtube.com/shorts/0e3GPea1Tyg"], "maxResultsPerSource": 50, "scrapeDetails": true, "sortBy": "relevance", "uploadDate": "month", "duration": "any", "channelTab": "videos"}'
```

Also works with the Apify Python/JS clients, **Make, Zapier, n8n**, Google Sheets, webhooks and schedules. Export as JSON, CSV, Excel, XML or RSS.

**RAG tip:** An agent can research a niche in one call: search a topic, then rank rows by `viewCount`/`likes` and summarise `title` + `description` of the top videos.

### Pricing

- **$2.50 per 1,000 videos** ($0.0025 per video).
- The prefilled input returns 20 videos → **$0.05**.
- Example: 1,000 videos → $2.50; 10,000 → $25.00. Set **Max results (cost cap)** to limit any run.

### Limitations

- `durationSeconds` comes from search/channel/playlist listings; for videos given directly by URL it may be empty.
- Subscriber counts are shown by YouTube rounded (`1.4M`) and returned as numbers.
- Only public data is collected.

### FAQ

**Is this a YouTube Data API alternative?**
Yes. No API key and no quota; it returns views, exact likes, comment counts and channel subscribers for every video.

**Can I track YouTube search rankings?**
Yes. `rank` keeps YouTube's result order, so scheduled runs show how a video moves for a keyword.

**Does it scrape Shorts and live streams?**
Yes. Paste Shorts links, or choose the channel tab `shorts` or `streams`.

# Actor input Schema

## `searchQueries` (type: `array`):

What you would type into the YouTube search box, one per line.

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

Channels (<code>@handle</code>, <code>/channel/UC…</code>), playlist URLs, video or Shorts URLs, or bare video IDs.

## `maxResultsPerSource` (type: `integer`):

Search results are ranked as YouTube shows them; channels give their latest videos first.

## `scrapeDetails` (type: `boolean`):

Open each video for exact likes, comment count, publish date, full description, chapters, hashtags and channel subscribers. Turn off for the fastest run with list data only (title, views, duration, relative date).

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

Applies to search terms only.

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

Applies to search terms only.

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

Applies to search terms only.

## `channelTab` (type: `string`):

Which channel tab to list.

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

Stop after this many videos in total. <code>0</code> = no limit.

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

Video detail pages fetched in parallel. Above ~20 YouTube starts throttling a single IP — enable a proxy if you raise it.

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

Not needed in most cases. Enable Apify Proxy only if you see HTTP 429 errors on very large runs.

## Actor input object example

```json
{
  "searchQueries": [
    "best budget phone 2026"
  ],
  "startUrls": [
    "@mkbhd"
  ],
  "maxResultsPerSource": 10,
  "scrapeDetails": true,
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "channelTab": "videos",
  "maxResults": 0,
  "maxConcurrency": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `runStats` (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 = {
    "searchQueries": [
        "best budget phone 2026"
    ],
    "startUrls": [
        "@mkbhd"
    ],
    "maxResultsPerSource": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("murch1k/youtube-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 = {
    "searchQueries": ["best budget phone 2026"],
    "startUrls": ["@mkbhd"],
    "maxResultsPerSource": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("murch1k/youtube-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 '{
  "searchQueries": [
    "best budget phone 2026"
  ],
  "startUrls": [
    "@mkbhd"
  ],
  "maxResultsPerSource": 10
}' |
apify call murch1k/youtube-scraper --silent --output-dataset

```

## MCP server setup

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