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

Scrape YouTube search results, channels, playlists and videos: views, likes, comment count, subscribers, description, tags, duration, exact publish date. Shorts included. Filters by date, views, duration. No API key. From $1 per 1,000 videos.

- **URL**: https://apify.com/muarafa/youtube-scraper-pro.md
- **Developed by:** [Mohamed Arafa](https://apify.com/muarafa) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 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

## YouTube Scraper Pro – Search, Channels, Videos & Shorts

Scrape **YouTube search results, channels, playlists and single videos** into clean JSON, CSV or Excel: title, views, **likes**, **comment count**, **channel subscribers**, full description, tags, duration and exact publish date. Shorts included. No login, no cookies, no YouTube API key and no quotas.

**From $1 per 1,000 videos** ($1.50 per 1,000 with full details) – duplicates and failed videos are never charged.

### What can you do with YouTube data?

- **Market and competitor research** – see which videos, topics and channels win in your niche and how fast they grow.
- **Influencer and creator discovery** – find channels by keyword with their subscribers, views and engagement.
- **Content strategy and YouTube SEO** – study titles, tags, descriptions, durations and upload times of top-ranking videos.
- **Trend monitoring** – schedule searches sorted by upload date to catch new videos on any topic every day.
- **Lead generation** – build lists of creators and brands active on a topic.
- **AI and data projects** – collect large structured video datasets; pair with transcripts and comments for full context.

### How to scrape YouTube

1. Enter **search terms** (like typing into the YouTube search box) and/or paste **video, Shorts, channel or playlist URLs**.
2. Set how many videos you want per search and per channel, and choose **filters**: sort by date, views or rating; upload date; duration; HD, 4K, subtitles, Creative Commons or live.
3. Keep **Full video details** on for likes, comment count, subscribers, full description, tags and exact publish dates – or turn it off for the cheapest, fastest lists.
4. Click **Start** and download the results as **JSON, CSV, Excel, XML or HTML**, or get them through the API.

### Why this scraper?

| | YouTube Scraper Pro |
|---|---|
| Price | **$1 per 1,000 videos**, **$1.50 with full details** – no monthly fee |
| Inputs | Search terms with filters, videos, Shorts, channels (`@handle`, `/channel/`, `/c/`, `/user/`) and playlists – in one run |
| Shorts | Included and flagged with `is_short`; channel Shorts listed separately so you can include or skip them |
| Engagement | Views, likes, comment count and channel subscribers per video |
| Reliability | Uses YouTube's own app endpoints, retries with a fresh session and proxy IP, switches to residential IPs automatically when needed |
| Fair billing | Each `video_id` is charged once; failed videos are not charged; details are only charged when they were fetched |
| Cost control | `maxTotalItems` + Apify's *Maximum cost per run* – the scraper stops cleanly at the limit |

### Input

```json
{
  "searchQueries": ["web scraping tutorial", "best budget phone 2026"],
  "startUrls": ["https://www.youtube.com/@TED", "https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
  "maxResultsPerQuery": 50,
  "maxVideosPerChannel": 50,
  "includeDetails": true,
  "includeShorts": true,
  "sortBy": "date",
  "uploadDate": "week",
  "duration": "any",
  "features": ["subtitles"]
}
```

- **searchQueries** – one search per line.
- **startUrls** – videos, Shorts, channels and playlists. Channels return their newest videos (long videos and Shorts).
- **sortBy** – `relevance`, `date`, `views` or `rating` (search only).
- **uploadDate** – `any`, `hour`, `today`, `week`, `month`, `year` (search only).
- **duration** – `any`, `short` (under 4 min), `medium` (4-20 min), `long` (over 20 min) (search only).
- **features** – `hd`, `4k`, `subtitles`, `creative_commons`, `live` (search only).
- **includeDetails** – full details per video (+$0.0005 per video).
- **maxTotalItems** – hard limit for the whole run.

### Output

```json
{
  "video_id": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channel_name": "Rick Astley",
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channel_url": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
  "channel_subscribers": 4550000,
  "channel_subscribers_text": "4.55M subscribers",
  "view_count": 1831486462,
  "like_count": 19491731,
  "comment_count": 2400000,
  "duration_seconds": 213,
  "published_at": "2009-10-24T00:00:00.000Z",
  "published_at_text": "Oct 24, 2009",
  "is_short": false,
  "is_live": false,
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley...",
  "keywords": ["rick astley", "never gonna give you up"],
  "thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "source_type": "video",
  "rank": 1,
  "details": true,
  "scraped_at": "2026-10-29T12:00:00.000Z"
}
```

Without full details you still get title, channel, views, duration, relative publish date, description snippet (search), Shorts flag and thumbnail. `rank` is the position in the search results or channel list. Numbers YouTube shows rounded (like `4.4M`) are converted to integers.

### Run report

Every run saves `RUN-SUMMARY` in the key-value store: sources processed, videos returned, details fetched, and a list of searches or URLs that failed with the reason.

### Pricing

Pay-per-event, no monthly rental:

- **Video** – $0.001 per unique video = **$1 per 1,000**.
- **Full video details** – $0.0005 per video, only when details were fetched successfully.

Example: 1,000 videos with full details = **$1.50**. Duplicates and failed videos are free. Set *Maximum cost per run* and the scraper stops cleanly at your budget.

### Use it from code, automations and AI agents

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("muarafa/youtube-scraper-pro").call(run_input={
    "searchQueries": ["ai agents tutorial"],
    "maxResultsPerQuery": 100,
    "sortBy": "views",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["view_count"], item["like_count"])
```

**Node.js**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('muarafa/youtube-scraper-pro').call({
    startUrls: ['https://www.youtube.com/@mkbhd'],
    maxVideosPerChannel: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'videos');
```

**No-code:** works with **n8n, Make, Zapier, Google Sheets, Airbyte** and webhooks through the Apify integrations. Schedule a search sorted by upload date to get new videos on any topic every day.

**AI agents:** available as a tool through the **Apify MCP server**, so Claude, ChatGPT, Cursor and other MCP clients can search YouTube on demand.

### FAQ

**Do I need a YouTube API key or a Google account?** No. The scraper reads public data with no login, cookies or API key, so there are no YouTube Data API quotas.

**Can I scrape YouTube Shorts?** Yes – Shorts appear in search and channel results with `is_short: true`, and you can paste Shorts URLs directly. Turn off *Include Shorts* to skip them.

**Can I scrape all videos of a channel?** Yes – paste the channel URL and set *Max videos per channel* (up to 5,000).

**How many results can one search return?** Up to 1,000 per search term; YouTube itself stops serving results after several hundred for most queries. Use several related search terms or filters for more.

**Why are some likes or comment counts empty?** Some creators hide likes or turn comments off. Those fields are `null` instead of a wrong number.

**How much does it cost to scrape 10,000 YouTube videos?** $10, or $15 with full details. Apify's free plan includes monthly credit to try it.

**Is scraping YouTube legal?** The scraper only collects publicly available data. Personal data is protected by laws such as GDPR – only scrape and use it for legitimate purposes, and consult a lawyer if unsure.

Found a video or search that fails? Open an issue with the input – we fix reports fast.

### More tools by the same developer

- [YouTube Comments Scraper Pro](https://apify.com/muarafa/youtube-comments-pro) – comments and replies of videos, Shorts, playlists and channels, from $0.50 per 1,000.
- [YouTube Transcript Scraper Pro](https://apify.com/muarafa/youtube-transcript-pro) – transcripts and subtitles of videos, playlists and channels in all languages.
- [Facebook Ads Library Scraper Pro](https://apify.com/muarafa/facebook-ads-library-pro) – Meta ads by keyword or page, with media, CTA, dates and spend.
- [Google Trends Scraper Pro](https://apify.com/muarafa/google-trends-pro) – interest over time, by region, related queries and topics, CSV export.

# Actor input Schema

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

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

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

Video, Shorts, channel (@handle, /channel/, /c/, /user/) or playlist URLs. Channels return their latest videos.

## `maxResultsPerQuery` (type: `integer`):

How many videos to return for each search term.

## `maxVideosPerChannel` (type: `integer`):

Newest first. For channels the limit applies to long videos and Shorts separately.

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

Adds likes, comment count, channel subscribers, full description, tags and exact publish date (+$0.0005 per video). Turn off for the cheapest, fastest lists.

## `includeShorts` (type: `boolean`):

Include YouTube Shorts in channel and search results.

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

Order of search results (search terms only).

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

Only videos uploaded within this period (search terms only).

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

Only videos of this length (search terms only).

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

Only videos with these features.

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

Language code for YouTube's texts, e.g. en, ar, es. Default: en.

## `maxTotalItems` (type: `integer`):

Hard limit for the whole run. Also set Maximum cost per run in the run options to cap spend.

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

How many videos are processed in parallel.

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

How many times a failed request is retried with a new session before giving up.

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

Apify Proxy is recommended. The scraper switches to residential IPs automatically if YouTube starts blocking.

## Actor input object example

```json
{
  "searchQueries": [
    "web scraping tutorial"
  ],
  "startUrls": [],
  "maxResultsPerQuery": 50,
  "maxVideosPerChannel": 50,
  "includeDetails": true,
  "includeShorts": true,
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "features": [],
  "maxTotalItems": 1000,
  "maxConcurrency": 5,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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": [
        "web scraping tutorial"
    ],
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("muarafa/youtube-scraper-pro").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": ["web scraping tutorial"],
    "startUrls": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("muarafa/youtube-scraper-pro").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": [
    "web scraping tutorial"
  ],
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call muarafa/youtube-scraper-pro --silent --output-dataset

```

## MCP server setup

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

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/mFHJwgEF7UmcECwff/builds/RcEaJmVtGiIY5xTDU/openapi.json
