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

Scrape YouTube search results, channels and playlists with filters (upload date, sort, duration). Exact views, likes, subscribers, tags, description and publish date for every video, as numbers ready for analysis. Fast, no login, pay per video.

- **URL**: https://apify.com/karioski/youtube-scraper.md
- **Developed by:** [KARIOSKI](https://apify.com/karioski) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 video with full details

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/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** extracts YouTube search results, channel videos and playlists, with rich details for every video: exact **views, likes, subscribers**, tags, full description, category, duration and publish date. It uses YouTube's own filters (upload date, sort, duration) and returns numbers as numbers, ready for spreadsheets and analytics. Fast and without login.

### What can this Actor do?

- **Search** any keyword with YouTube's filters: upload date (hour, today, week, month, year), sort (relevance, date, views, rating) and duration.
- Scrape **channels** (`@handle`, `/channel/`, `/c/`, `/user/`) and **playlists** up to your limit.
- **Single videos and Shorts** from any URL format or plain IDs.
- **Full details per video**: views, likes, comments-ready IDs, subscribers, tags, category, description, live status, thumbnail.
- **Numbers as integers** (`1.2M` → `1200000`) for sorting and charts.
- **Cheaper search-only mode** when you just need titles, views and URLs.

### Why choose it over other tools?

- Exact like and subscriber counts on every row, not only search snippets.
- Two price levels: pay less when you don't need full details.
- No browser, so runs are fast and cheap even for thousands of videos.

### What data can I extract?

| Field | Description |
|---|---|
| `id / url / title` | Video ID, link and title |
| `channelName / channelId / subscriberCount` | Channel info with subscribers as a number |
| `viewCount / likeCount` | Exact counts |
| `publishDate / publishedText` | Publish date and relative time |
| `durationSeconds / category / keywords` | Length, category and tags |
| `description / isLive / thumbnail` | Full description, live flag, thumbnail URL |
| `source` | Which search, channel or playlist the video came from |

### How to use it

1. Enter search terms and/or paste channel, playlist or video URLs.
2. Set filters (upload date, sort, duration) and the maximum number of videos.
3. Keep **Full video details** on for views, likes and subscribers, or turn it off for a cheaper quick list.
4. Click **Start** and export the results to Excel, CSV or JSON.

### Input example

```json
{
  "searchQueries": [
    "rust programming tutorial"
  ],
  "startUrls": [
    "https://www.youtube.com/@TED"
  ],
  "maxResults": 100,
  "uploadDate": "month",
  "sortBy": "view_count",
  "includeDetails": true
}
```

### Output example

```json
{
  "id": "flS3cmjcows",
  "title": "How to Learn Rust in 2027 (Step by Step Roadmap)",
  "channelName": "Let's Get Rusty",
  "subscriberCount": 179000,
  "viewCount": 38558,
  "likeCount": 669,
  "publishDate": "Nov 17, 2026",
  "durationSeconds": 351,
  "keywords": [
    "rust"
  ],
  "source": {
    "type": "search",
    "query": "rust programming tutorial"
  }
}
```

Download the dataset as JSON, CSV, Excel or HTML, or read it with the API.

### How much does it cost?

This Actor uses **pay-per-event** pricing: you pay only for results delivered, and platform usage is included. Prices drop further on higher Apify plans (Silver, Gold).

| What you pay for | Price on paid plans |
|---|---|
| Video with full details | $0.0025 ($2.50 per 1,000) |
| Video, search data only | $0.001 ($1 per 1,000) |

**Example:** 1,000 videos with views, likes and subscribers cost **$2.50**.

You can set a **maximum cost per run** in the run options; the Actor stops cleanly when it is reached. Failed items and errors are never charged.

### Use cases

- **Influencer discovery** with subscriber and engagement numbers.
- **Competitor and niche research**: what topics and formats get views.
- **Trend tracking** with scheduled runs and upload-date filters.
- **Datasets for analytics and AI**.

### Integrations and API

You can run this Actor and get its data in many ways:

- **Apify API and clients** for [JavaScript](https://docs.apify.com/api/client/js) and [Python](https://docs.apify.com/api/client/python): start runs and download results as JSON, CSV, Excel, XML or HTML.
- **Schedules**: run it hourly, daily or weekly to monitor changes.
- **Integrations**: Make, Zapier, n8n, Google Sheets, Slack, Airbyte, webhooks and more.
- **AI agents (MCP)**: add it to Claude, Cursor, VS Code or any MCP client through the [Apify MCP server](https://mcp.apify.com), and your agent can call it as a tool.

### FAQ

#### How many videos can I scrape?

As many as YouTube shows for a search, channel or playlist; set `maxResults` per source.

#### Can I get comments or transcripts?

Yes, with our [YouTube Comments Scraper](https://apify.com/karioski/youtube-comments-scraper) and [YouTube Transcript Scraper](https://apify.com/karioski/youtube-transcript-scraper) on the same URLs.

#### Do I need an API key?

No, there are no YouTube Data API quotas or keys.

#### Is it legal to scrape this data?

This Actor collects only publicly available data and does not log in to any account. Personal data is protected by laws such as the GDPR in the EU; don't scrape personal data unless you have a legitimate reason. If you're unsure whether your use case is legitimate, consult a lawyer. See also Apify's post on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

### Related tools

- [YouTube Transcript Scraper](https://apify.com/karioski/youtube-transcript-scraper): the spoken words of each video
- [YouTube Comments Scraper](https://apify.com/karioski/youtube-comments-scraper): audience comments and replies
- [App Store & Google Play Reviews Scraper](https://apify.com/karioski/app-reviews-scraper): user reviews of mobile apps

Found a bug or missing a feature? Open an issue on the **Issues** tab. We usually reply within 24 hours.

# Actor input Schema

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

Keywords to search on YouTube.

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

Direct video URLs, channel URLs (@handle, /channel/...) or playlist URLs.

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

How many results to collect per search, channel or playlist.

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

Only videos uploaded within this period (search only).

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

Order of the results.

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

Only videos of this length (search only).

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

Exact views, likes, full description, tags, category, subscribers and publish date for every video.

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

Requests normally go direct. If YouTube answers with a bot check, that request is retried through a fresh proxy IP.

## Actor input object example

```json
{
  "searchQueries": [
    "rust programming tutorial"
  ],
  "maxResults": 10,
  "uploadDate": "all",
  "sortBy": "relevance",
  "duration": "all",
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        "rust programming tutorial"
    ],
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("karioski/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": ["rust programming tutorial"],
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("karioski/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": [
    "rust programming tutorial"
  ],
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call karioski/youtube-scraper --silent --output-dataset

```

## MCP server setup

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