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

Scrape YouTube videos, Shorts and live streams from search, channels, playlists and hashtags: views, likes, comments, exact date, full description, tags and channel subscribers. Free filters, no API key or quota.

- **URL**: https://apify.com/ksvan/youtube-scraper.md
- **Developed by:** [K.S. Van](https://apify.com/ksvan) (community)
- **Categories:** Videos, Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 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.
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 Scraper: Videos, Shorts, Channels & Search

**Scrape YouTube videos, Shorts and live streams in bulk** from search results, channels, playlists and hashtag pages. Every video comes with views, likes, comment count, the **exact publish date and time**, full description, tags, hashtags, category and the **channel's subscriber count**. No YouTube API key, no quota, no login.

- 🔎 **Search YouTube** like a user would, with YouTube's own filters (upload date, length, 4K, live, subtitles…) and sort order
- 📺 **Whole channels**: Videos, Shorts and Live tabs, each with its own limit
- 📃 **Playlists and #hashtag pages**, plus single video, Shorts and live URLs
- 🎯 **Free filters**: min/max views, min likes, exact duration, published date range, title keywords, content type
- 💸 **About 1/3 cheaper than the most popular YouTube scraper**, and filters, details and subscriber counts are included in the price
- ♻️ **No duplicates**: a video found by several searches is saved and charged once
- 📦 Export to JSON, CSV, Excel, HTML, or use the API, webhooks, Make, Zapier, n8n or the Apify MCP server

#### Use cases for YouTube data

- **Influencer and creator discovery**: find channels in a niche with subscriber counts, then filter by views to spot rising creators
- **Competitor and brand monitoring**: track what competitors publish, how fast videos grow, which titles and tags they use
- **Trend research**: see which topics, formats and Shorts are taking off this week (`uploadDate: week`, `sortBy: views`)
- **Content strategy and SEO**: collect titles, tags, hashtags and descriptions of top-ranking videos for any keyword
- **Market and product research**: gather review videos about products, with engagement numbers
- **Datasets for AI and analytics**: clean, flat JSON that is easy to load into a spreadsheet, database or LLM pipeline

#### What data can you scrape from YouTube?

<table>
<tr><td>📝 Title and URL</td><td>👀 View count</td></tr>
<tr><td>👍 Like count</td><td>💬 Comment count (optional)</td></tr>
<tr><td>📅 Exact publish date and time</td><td>⏱️ Duration in seconds</td></tr>
<tr><td>🧾 Full description</td><td>🏷️ Tags and #hashtags</td></tr>
<tr><td>🗂️ Category</td><td>🔴 Live / Short / video type</td></tr>
<tr><td>📺 Channel name, ID, @handle, URL</td><td>📈 Channel subscribers</td></tr>
<tr><td>✔️ Verified channel badge</td><td>🎞️ Channel video count</td></tr>
<tr><td>🖼️ Thumbnail (max resolution)</td><td>🔢 Rank in search / channel order</td></tr>
</table>

#### How this scraper compares

| | **This Actor** | Most popular YouTube scraper |
|---|---|---|
| Price per 1,000 videos (Free plan) | **$2.70** | $4.00 |
| Price per 1,000 videos (Gold plan, the "from" price) | **$1.60** | $2.40 |
| Date filter | **Free** | +$1.30 / 1,000 |
| Exact publish date, likes, tags, category | ✅ included | ✅ |
| Channel subscribers on every video | ✅ included | ✅ |
| Views, likes, duration, title filters | ✅ **free** | partly |
| Duplicates across searches | **skipped, not charged** | charged |
| Failed inputs | **never charged** | — |

#### How to scrape YouTube data

1. [Create a free Apify account](https://console.apify.com/sign-up) (the Free plan includes $5 of credit every month, enough for about 1,850 videos).
2. Open YouTube Scraper and add search terms, YouTube URLs, or both.
3. Set **Max results per search or URL**, and optionally filters.
4. Click **Start**. The first results appear in seconds.
5. Download the data as JSON, CSV, Excel or HTML, or get it through the API.

#### ⬇️ Input example

```json
{
  "searchQueries": ["air fryer recipes", "home workout"],
  "startUrls": [
    "https://www.youtube.com/@MrBeast",
    "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI",
    "https://www.youtube.com/hashtag/cooking",
    "https://www.youtube.com/shorts/zfq_piABTaw"
  ],
  "maxResults": 50,
  "channelTabs": ["videos", "shorts"],
  "uploadDate": "month",
  "sortBy": "views",
  "minViews": 10000
}
```

##### How to scrape YouTube Shorts and live streams

- For channels, choose the **Shorts** and/or **Live streams** tabs in `channelTabs`.
- For any source, set `contentType` to `shorts`, `videos` or `live` to keep only that kind of content.
- Shorts URLs (`youtube.com/shorts/...`) are accepted directly.

##### How to filter YouTube videos by date

Use YouTube's own `uploadDate` filter for searches (last hour, today, this week, this month, this year), or the free `publishedAfter` / `publishedBefore` date range, which works for channels, playlists and searches and uses the exact publish date.

#### ⬆️ Output example

```json
{
  "videoId": "g-r1afXW1Vg",
  "url": "https://www.youtube.com/watch?v=g-r1afXW1Vg",
  "title": "I Put an Egg on Potatoes in the Air Fryer… and THIS Happened!",
  "type": "video",
  "viewCount": 1206430,
  "likeCount": 6424,
  "commentCount": 343,
  "durationSeconds": 221,
  "durationText": "3:42",
  "publishedAt": "2026-08-24T00:15:11-07:00",
  "publishedTimeText": "2 months ago",
  "channelName": "Rosario Cooking",
  "channelId": "UC8QghjMT7h7tAAjX9cuLx5A",
  "channelUrl": "https://www.youtube.com/channel/UC8QghjMT7h7tAAjX9cuLx5A",
  "channelHandle": "@RosarioCooking",
  "channelVerified": true,
  "channelSubscribers": 741000,
  "channelSubscribersText": "741K subscribers",
  "channelVideoCount": 317,
  "description": "Hello everyone, today I'm going to show you a Simple Air Fryer Potato Recipe!...",
  "tags": ["air fryer recipes", "air fryer", "air fryer tips", "best air fryer recipes", "easy recipes"],
  "hashtags": [],
  "category": "Education",
  "isLiveContent": false,
  "isFamilySafe": true,
  "badges": ["4K"],
  "thumbnailUrl": "https://i.ytimg.com/vi/g-r1afXW1Vg/maxresdefault.jpg",
  "rank": 2,
  "searchQuery": "air fryer recipes",
  "scrapedAt": "2026-11-24T07:49:03+00:00"
}
```

Inputs that cannot be scraped (deleted channel, private playlist, mistyped URL) produce a record with an `error` field and are **not charged**.

#### More YouTube tools from the same developer

- [YouTube Comments Scraper](https://apify.com/ksvan/youtube-comments-scraper): comments and replies with likes, pinned and hearted flags
- [YouTube Transcript Scraper](https://apify.com/ksvan/youtube-transcript-scraper): transcripts and captions with timestamps, SRT export

#### ❓FAQ

##### How much does it cost to scrape YouTube?

You pay only for saved videos: **$2.70 per 1,000 videos** on the Free plan, going down to $1.60 per 1,000 on higher Apify plans. Full details, channel subscribers, filters and duplicate skipping are included. Filtered-out videos, duplicates and failed inputs are free. Platform usage is included in the price.

##### How many videos can I scrape?

Up to 5,000 per search term, channel tab, playlist or hashtag, and as many sources as you like in one run. YouTube itself shows roughly 500–700 results for a single search, so for bigger datasets use several related search terms (duplicates are skipped automatically).

##### Can I scrape comments or transcripts?

Yes, with the companion actors [YouTube Comments Scraper](https://apify.com/ksvan/youtube-comments-scraper) and [YouTube Transcript Scraper](https://apify.com/ksvan/youtube-transcript-scraper). This actor gives the comment count per video when you turn on **Comment count**.

##### Can I scrape dislikes?

No. YouTube hides dislike counts publicly, so no scraper can get them.

##### Do I need a proxy or a YouTube API key?

No API key or login. The default Apify datacenter proxy works well and is included.

##### Can I use it with the API, Make, Zapier, n8n or AI agents?

Yes. Run it through the [Apify API](https://docs.apify.com/api/v2), the Python and JavaScript clients, webhooks, [integrations](https://apify.com/integrations), or the Apify MCP server for AI agents (Claude, ChatGPT, Cursor and others).

##### Is it legal to scrape YouTube?

This actor collects only publicly available data. Respect copyright and personal-data rules (such as GDPR) when you store or reuse the data, and consult a lawyer if you are unsure about your use case.

##### Feedback

Found a bug or need a field? Open an issue on the **Issues** tab and it will be looked at quickly. If the actor saved you time, a short review helps other users find it. Thank you!

# Actor input Schema

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

What you would type into the YouTube search box. Each term is scraped separately (up to 'Max results per search or URL').

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

Any mix of video, Shorts and live URLs, 11-character video IDs, channel URLs (@handle, /channel/UC..., /c/...), playlist URLs and hashtag pages (youtube.com/hashtag/...).

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

How many videos to save for each search term, channel tab, playlist or hashtag. Filtered-out videos do not count and are not charged.

## `contentType` (type: `string`):

Keep only this kind of content (free filter).

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

Sort order of YouTube search results. Applies to search terms only.

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

YouTube's own upload date filter for search terms (free).

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

YouTube's own length filter for search terms (free).

## `features` (type: `array`):

YouTube's feature filters for search terms (free).

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

Which tabs to scrape for channel URLs. Each tab gets its own 'Max results' budget.

## `fetchDetails` (type: `boolean`):

Exact publish date and time, like count, full description, tags, hashtags, category and live stream times. Included in the price.

## `includeChannelInfo` (type: `boolean`):

Add channel subscriber count, handle and video count to every video (one request per channel, cached). Included in the price.

## `includeCommentCount` (type: `boolean`):

Add the number of comments (one extra request per video, so the run is slower). Included in the price.

## `minViews` (type: `integer`):

Free filter: skip videos with fewer views.

## `maxViews` (type: `integer`):

Free filter: skip videos with more views (handy for finding small creators).

## `minLikes` (type: `integer`):

Free filter: skip videos with fewer likes (needs full video details).

## `minDurationSeconds` (type: `integer`):

Free filter on exact video length.

## `maxDurationSeconds` (type: `integer`):

Free filter on exact video length.

## `publishedAfter` (type: `string`):

Free filter: keep videos published on or after this date (YYYY-MM-DD). Exact with full details, approximate without.

## `publishedBefore` (type: `string`):

Free filter: keep videos published on or before this date (YYYY-MM-DD).

## `titleMustContain` (type: `array`):

Free filter: keep only videos whose title contains at least one of these words (case-insensitive).

## `deduplicate` (type: `boolean`):

A video found by several searches or URLs is saved (and charged) only once per run.

## `maxItems` (type: `integer`):

Stop the whole run after this many saved videos (0 = no limit).

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

YouTube interface language code (hl), e.g. en, de, es. Affects relative dates and counts in text fields.

## `country` (type: `string`):

Two-letter country code (gl) for search results, e.g. US, GB, DE, IN.

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

How many videos are enriched at the same time.

## `maxRetries` (type: `integer`):

Each failed request is retried from a new IP address.

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

Apify datacenter proxy works well. No YouTube API key or login is needed.

## Actor input object example

```json
{
  "searchQueries": [
    "air fryer recipes"
  ],
  "maxResults": 20,
  "contentType": "all",
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "channelTabs": [
    "videos"
  ],
  "fetchDetails": true,
  "includeChannelInfo": true,
  "includeCommentCount": false,
  "deduplicate": true,
  "language": "en",
  "country": "US",
  "maxConcurrency": 15,
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One record per video, Short or live stream.

# 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": [
        "air fryer recipes"
    ],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ksvan/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": ["air fryer recipes"],
    "maxResults": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ksvan/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": [
    "air fryer recipes"
  ],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ksvan/youtube-scraper --silent --output-dataset

```

## MCP server setup

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