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

Scrape YouTube search results, channels, playlists and videos: title, views, likes, publish date, duration, channel, subscribers and description. Search filters for date, duration and sort. Fast, cheap, no API key.

- **URL**: https://apify.com/inimi/youtube-video-scraper.md
- **Developed by:** [Inimi](https://apify.com/inimi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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: Search, Videos, Channels & Playlists

Scrape **YouTube search results, channels, playlists and videos** in one Actor. Get title, views, likes, publish date, duration, channel, subscribers, description and more, as clean JSON, CSV or Excel.

No browser and no YouTube API key (no daily quota). The Actor reads YouTube the same way the website does, so it is **fast and cheap**, and proxies are included in the price.

### What can you use it for?

- **Keyword & niche research**: see which videos rank for a search term, and how many views they get.
- **Competitor tracking**: pull every new video from competitor channels on a schedule.
- **Trend spotting**: search with "Upload date: today" and sort by views to catch what is taking off.
- **Influencer discovery**: find channels covering a topic, with subscriber counts.
- **Datasets for AI**: titles, descriptions and stats for classification, RAG or fine-tuning.
- **Reporting**: export views and likes to Google Sheets, Looker Studio or your BI tool.

### Features

| | |
|---|---|
| Search | Any search term, sorted by relevance, upload date, views or rating |
| Search filters | Upload date (hour, today, week, month, year) and duration (under 4 min, 4-20 min, over 20 min) |
| Channels | Latest videos of any channel (URL, @handle or ID) |
| Playlists | Every video of a playlist |
| Videos | Video URLs or IDs, with full details |
| Full details (optional for search/channels) | Exact view count, exact likes, publish date, full description, hashtags, channel subscribers |
| Always included | Title, URL, channel name/ID/URL, verified badge, views, duration, published time, description snippet, live flag, badges (4K, CC...), thumbnail, search rank |

### How to use

1. Add **search terms** and/or **video, channel or playlist URLs**.
2. Set how many results you want and, for search, the sort order and filters.
3. Turn on **Full details for every video** if you need exact likes, publish dates and full descriptions for search and channel results.
4. Click **Start** and download your data, or use the API.

### Input example

```json
{
    "searchQueries": ["claude ai tutorial", "best budget phone 2026"],
    "startUrls": ["https://www.youtube.com/@mkbhd", "https://www.youtube.com/watch?v=aircAruvnKk"],
    "maxResultsPerQuery": 100,
    "sortBy": "views",
    "uploadDate": "month",
    "includeDetails": true
}
```

### Output example

```json
{
    "videoId": "aircAruvnKk",
    "url": "https://www.youtube.com/watch?v=aircAruvnKk",
    "title": "But what is a neural network? | Deep learning chapter 1",
    "channelName": "3Blue1Brown",
    "channelId": "UCYO_jab_esuFRV4b17AJtAw",
    "channelUrl": "https://www.youtube.com/@3blue1brown",
    "channelSubscribers": 8730000,
    "viewCount": 25037081,
    "likes": 568368,
    "durationText": "18:40",
    "durationSeconds": 1120,
    "publishDate": "2017-10-05",
    "publishedTimeText": "9 years ago",
    "description": "What are the neurons, why are there layers, and what is the math underlying it?...",
    "isLive": false,
    "badges": ["CC"],
    "searchQuery": "neural networks explained",
    "rank": 1,
    "status": "ok"
}
```

### Pricing

You pay **per video saved**. Proxies and compute are included. Set a maximum cost per run and the Actor stops cleanly when it is reached.

### FAQ

**How many results can one search return?**
As many as YouTube shows when you keep scrolling, usually several hundred per search term. Use several related search terms to collect more.

**Why do some rows have no `likes` or `publishDate`?**
Search and channel results show rounded views and relative dates ("2 weeks ago"). Turn on **Full details for every video** to get exact likes, views and the publish date.

**Do I need a YouTube API key?**
No. There is no quota to worry about.

**Can I call it from code or an AI agent?**
Yes, via the Apify API, the official JS/Python clients, or Apify's MCP server.

**Related Actors**: YouTube Transcript Scraper, YouTube Comments Scraper, YouTube Channel Scraper and YouTube Shorts Scraper by the same author.

# Actor input Schema

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

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

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

Optional. Video URLs/IDs (full details), channel URLs or @handles (latest videos), playlist URLs.

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

0 = as many as YouTube returns (usually several hundred).

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

Max videos per channel or playlist.

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

Sort search results by.

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

Upload date.

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

Duration.

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

Adds exact likes, exact view count, publish date, full description and channel subscribers to search and channel results (one extra request per video, slower). Video and playlist URLs always get full details.

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

Parallel requests.

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

Proxies are included in the price. Switch to residential proxies if you see many blocked requests.

## Actor input object example

```json
{
  "searchQueries": [
    "claude ai tutorial"
  ],
  "maxResultsPerQuery": 50,
  "maxVideosPerChannel": 50,
  "sortBy": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "includeDetails": false,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        "claude ai tutorial"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("inimi/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 = {
    "searchQueries": ["claude ai tutorial"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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