# YouTube Scraper – Search, Channels, Playlists & Video Details (`pulsedata/youtube-scraper`) Actor

Scrape YouTube without the API or quotas: keyword search with filters, all videos/Shorts/streams of a channel, playlists, and video details (views, likes, duration, publish date, description, tags, subscribers). Clean JSON, $1 per 1,000 videos.

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

## Pricing

from $1.00 / 1,000 video listeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Scraper – Search, Channels, Playlists & Video Details (no API key)

A fast, affordable alternative to the YouTube Data API – **no API key, no quotas**. Scrape:

- **Search results** for any keyword – videos, channels or playlists – with sort (relevance, upload date, view count, rating) and upload-date filters, hundreds of results per query.
- **Channels** – channel profile (subscribers, video count, description, handle, avatar) plus every video of the *Videos*, *Shorts* and *Live* tabs.
- **Playlists** – all videos of any playlist.
- **Video details** – exact view count, likes, publish date, full description, tags/keywords, category, duration, channel and its subscriber count.

Clean, consistent JSON for every video: `videoId`, `url`, `title`, `channelName`, `channelId`, `channelUrl`, `viewCount`, `publishedTimeText`/`publishedAt`, `durationSeconds`, `thumbnailUrl`, `isLive`, `isShort`, `position`, `source` – and with details also `likeCount`, `description`, `keywords`, `category`, `channelSubscriberCount`.

Pricing: **$1 per 1,000 listed videos/channels/playlists, $2 per 1,000 detailed videos.** Combine with our [YouTube Transcript Scraper](https://apify.com/toned_ingredient/youtube-transcript-scraper) and [YouTube Comments Scraper](https://apify.com/toned_ingredient/youtube-comments-scraper).

### Example input

```json
{
  "searchQueries": ["python tutorial"], "searchSort": "view_count", "searchUploadDate": "year", "maxResultsPerQuery": 100,
  "channelUrls": ["https://www.youtube.com/@3blue1brown"], "channelTabs": ["videos", "shorts"], "maxVideosPerChannel": 0,
  "playlistUrls": ["https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi"],
  "videoUrls": ["https://www.youtube.com/watch?v=aircAruvnKk"],
  "fetchDetailsForListedVideos": false
}
```

### Example output (search result)

```json
{
  "type": "video", "videoId": "lIId8IDP6TU", "url": "https://www.youtube.com/watch?v=lIId8IDP6TU",
  "title": "Lecture 2 : Strings & Conditional Statements | Python Full Course",
  "description": "This lecture was made with a lot of love …",
  "channelName": "Shradha Khapra", "channelId": "UC1XBh-m27kkgwLAwu_SRJBg", "channelUrl": "https://www.youtube.com/@shradhaKD", "channelIsVerified": false,
  "publishedTimeText": "2 years ago", "publishedAt": "2024-08-19T14:10:45.184Z",
  "durationText": "55:41", "durationSeconds": 3341,
  "viewCountText": "6,255,142 views", "viewCount": 6255142,
  "thumbnailUrl": "https://i.ytimg.com/vi/lIId8IDP6TU/hq720.jpg", "isLive": false,
  "source": "search:python tutorial", "position": 1
}
```

Channel item:

```json
{ "type": "channel", "channelId": "UCYO_jab_esuFRV4b17AJtAw", "handle": "@3blue1brown", "title": "3Blue1Brown", "subscriberCount": 8550000, "videoCount": 242, "description": "…", "avatarUrl": "…", "rssUrl": "…" }
```

### Use cases

- **Market & competitor research** – what content ranks for your keywords, who the top channels are, which formats get views.
- **Influencer discovery** – channels by topic with subscriber and video counts.
- **Content monitoring** – schedule runs to catch new uploads of competitors (`searchUploadDate: today`).
- **Datasets for AI** – video metadata at scale; add transcripts and comments with our companion actors.
- **SEO & trend analysis** – titles, views and publish dates across thousands of videos.

### Notes

- `publishedAt` for listed videos is derived from YouTube's relative text ("2 years ago") and therefore approximate; detailed videos have the exact date.
- Channel Shorts provide title and views; use details for more fields.
- The actor runs without proxies and switches to Apify residential proxy automatically if YouTube rate-limits.

### Pricing

Pay per event: **$0.001 per listed item** (video/channel/playlist) and **$0.002 per detailed video**.

### Integrations

API, SDKs, schedules, webhooks; export JSON/CSV/Excel; Google Sheets, Make, Zapier, n8n; MCP tool for AI agents.

# Actor input Schema

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

Keywords to search on YouTube, one per line (e.g. `python tutorial`).

## `searchType` (type: `string`):

What to return for search queries.

## `searchSort` (type: `string`):

How search results are ordered.

## `searchUploadDate` (type: `string`):

Filter search results by upload date.

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

Search results to collect per query (0 = as many as YouTube returns, usually several hundred).

## `channelUrls` (type: `array`):

Channel URLs (`https://www.youtube.com/@3blue1brown`, `/channel/UC…`, `/c/name`) or handles (`@3blue1brown`). All videos of the Videos tab are scraped (optionally Shorts and live streams).

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

Which channel tabs to scrape.

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

0 = all videos.

## `playlistUrls` (type: `array`):

Playlist URLs or IDs – all videos are listed.

## `maxVideosPerPlaylist` (type: `integer`):

0 = all.

## `videoUrls` (type: `array`):

Videos to fetch full details for (exact view/like counts, publish date, description, tags, category, channel subscriber count).

## `fetchDetailsForListedVideos` (type: `boolean`):

Also fetch full details (likes, exact date, description, tags) for videos found via search, channels and playlists. One extra request per video.

## `concurrency` (type: `integer`):

Parallel requests.

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

Usually not needed; enable Apify Proxy if YouTube rate-limits your runs.

## Actor input object example

```json
{
  "searchQueries": [],
  "searchType": "video",
  "searchSort": "relevance",
  "searchUploadDate": "any",
  "maxResultsPerQuery": 50,
  "channelUrls": [],
  "channelTabs": [
    "videos"
  ],
  "maxVideosPerChannel": 100,
  "playlistUrls": [],
  "maxVideosPerPlaylist": 0,
  "videoUrls": [],
  "fetchDetailsForListedVideos": false,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Videos, channels and playlists stored in the default dataset (JSON/CSV/Excel via the dataset API).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("pulsedata/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pulsedata/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 '{}' |
apify call pulsedata/youtube-scraper --silent --output-dataset

```

## MCP server setup

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