# YouTube Playlist Scraper - Videos, Durations & Views (`scrapesage/youtube-playlist-scraper`) Actor

Extract videos from any public YouTube playlist: title, video ID, watch URL, channel, duration in seconds, view count, upload age and playlist position, plus a summary row per playlist. Up to 200 videos - YouTube's own logged-out limit. Independent tool, not affiliated with Google LLC.

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

## Pricing

from $0.28 / 1,000 playlist 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.
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?

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 Playlist Scraper - Videos, Durations & Views

> **Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Google LLC or any of its subsidiaries. All trademarks mentioned are the property of their respective owners. "YouTube" is referenced only to describe the publicly available website this Actor collects data from.

Extract the videos from any public YouTube playlist and export them to JSON, CSV or Excel: playlist position, title, video ID, watch URL, channel, **duration in seconds**, view count, upload age and thumbnail - plus a summary row with the playlist's own title, owner and totals.

YouTube serves 100 videos per page and this Actor pages through **the whole playlist - up to YouTube's own 5,000-item maximum**. No login, no API key, no YouTube Data API quota.

### What you get

| | |
|---|---|
| **Playlist order preserved** | Every row carries its `position`, so the export is the playlist, not a bag of videos |
| **Numbers, not strings** | `durationSeconds` and `viewCount` are parsed for you, alongside the raw `2:32` / `234K views` text |
| **Past the first page** | Full pagination - every video in the playlist, up to YouTube's own 5,000-item maximum |
| **Playlist summary** | One `playlist` row per playlist: title, description, owner channel and ID, total video and view counts |
| **Any playlist reference** | A playlist URL, any watch URL carrying `list=`, or a bare ID (`PL...`, `UU...`, `OLAK...`) |
| **Bulk import** | Paste hundreds of playlists, or link a `.txt` / `.csv` / Google Sheet / Drive file |
| **Filters that cost nothing** | Title keyword and min/max duration are applied before billing - filtered rows are **never charged** |
| **Monitor mode** | Remembers what it has seen, so a scheduled run returns only videos newly added to the playlist |

### Use cases

- **Course and tutorial libraries** - export a whole training playlist with durations, then total the run-time.
- **Channel's full back-catalogue** - point it at a channel's `UU...` uploads playlist to walk every upload, not just the recent ones.
- **Content audits** - find every video in a playlist over 20 minutes, or every one whose title mentions a product.
- **Watch-list building** - hand a downstream tool a clean, ordered list of video IDs.
- **Monitoring** - schedule it with **Monitor mode** to be told only when a playlist gains a video.
- **LLM pipelines** - a clean ordered manifest of video IDs to feed a transcript or summarisation step.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) - the free plan is enough to try this Actor.
2. Open the **YouTube Playlist Scraper** and paste one or more **playlist references** - a playlist URL, any watch URL carrying `list=`, or a bare ID (`PL...`, `UU...`, `OLAK...`).
3. Set **Max videos per playlist** if you want a cap, then click **Start**.
4. **Export** as JSON, CSV, Excel, XML or RSS - or pull results programmatically through the [Apify API](https://docs.apify.com/api/v2).

To walk a channel's whole upload history, take its channel ID and swap the leading `UC` for `UU` - that is the channel's uploads playlist.

### Input

One playlist:

```json
{ "playlistUrls": ["https://www.youtube.com/playlist?list=PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb"] }
```

A channel's most recent uploads (a channel's uploads playlist is its channel ID with `UC` swapped for `UU`):

```json
{ "playlistUrls": ["UULA_DiR1FfKNvjuUpBHmylQ"], "maxVideosPerPlaylist": 1000 }
```

Long-form videos only, matching a keyword:

```json
{
  "playlistUrls": ["UULA_DiR1FfKNvjuUpBHmylQ"],
  "containsText": "space",
  "minDurationSeconds": 60,
  "maxVideosPerPlaylist": 1000
}
```

Just the playlist headers, for a library audit:

```json
{ "playlistUrls": ["PL...", "PL...", "PL..."], "includeVideos": false }
```

Bulk - paste a block, or link a file, into **Import playlists from a file**:

```
UULA_DiR1FfKNvjuUpBHmylQ
PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb
https://www.youtube.com/playlist?list=PL590L5WQmH8dpP0RyH5pCfIaDEdt9nk7r
```

### Output

A `playlistVideo` row:

```json
{
  "type": "playlistVideo",
  "playlistId": "UULA_DiR1FfKNvjuUpBHmylQ",
  "playlistTitle": "Uploads from NASA",
  "playlistOwner": "NASA",
  "position": 1,
  "videoId": "90Kgw_SvK4w",
  "title": "What It Takes",
  "videoUrl": "https://www.youtube.com/watch?v=90Kgw_SvK4w&list=UULA_DiR1FfKNvjuUpBHmylQ",
  "channel": "NASA",
  "durationText": "2:32",
  "durationSeconds": 152,
  "viewsText": "234K views",
  "viewCount": 234000,
  "publishedText": "2 days ago",
  "thumbnail": "https://i.ytimg.com/vi/90Kgw_SvK4w/hqdefault.jpg"
}
```

A `playlist` row:

```json
{
  "type": "playlist",
  "playlistId": "UULA_DiR1FfKNvjuUpBHmylQ",
  "playlistTitle": "Uploads from NASA",
  "playlistOwner": "NASA",
  "playlistOwnerId": "UCLA_DiR1FfKNvjuUpBHmylQ",
  "videoCountText": "6,176 videos",
  "videoCount": 6176,
  "viewsText": "1,911,811 views",
  "viewCount": 1911811,
  "videosReturned": 1000
}
```

Three dataset views ship with the Actor: **Videos**, **Durations & views** and **Playlist summary**.

### Good to know

- **Depth is limited only by YouTube's own 5,000-item playlist maximum.** Every run reports both `videoCount` (what the playlist holds) and `videosReturned` (what you asked for and got), so a capped run is never ambiguous.
- **The whole back-catalogue, not the first two pages.** YouTube's own logged-out pagination gives out after a couple of pages. This Actor addresses each page directly by offset instead, so a channel's entire uploads playlist stays reachable.
- **Public playlists only.** Private, unlisted-without-the-link and deleted playlists are not readable; the run says so by name and charges nothing for them.
- **YouTube hides unavailable entries.** Deleted and private videos inside a playlist are removed by YouTube itself, so `videoCount` from the header can exceed the rows returned. Both numbers are in the output (`videoCount` vs `videosReturned`) so the gap is visible rather than silent.
- **`viewCount` is rounded by YouTube** on video rows (`234K views` → `234000`). The playlist-level `viewCount` is exact. Both raw strings are kept.
- **`publishedText` is relative** (`2 days ago`) because that is what YouTube publishes on a playlist page - there is no absolute upload date on this surface.
- **`description` is often empty** on auto-generated playlists such as a channel's uploads; user-made playlists usually have one.
- Duration is absent for a live stream or premiere that has not finished; those rows carry `durationSeconds: null`.

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

This Actor uses Apify's **pay-per-event** pricing: you are charged only for the results it delivers, with no monthly rental and no start fee. The events it can charge are:

- **Playlist video scraped** - Charged once per video written to your dataset - playlist position, title, video ID, watch URL, channel, duration in seconds, view count and upload age. Videos removed by your filters, videos already seen in monitor mode, and playlists that are not public are never charged.
- **Playlist summary** - Charged once per playlist when the summary row is switched on - title, description, owner channel, total video and view counts and the thumbnail. Turn off 'Include a playlist summary row' to skip it entirely.

The current price of each event is shown on the **Pricing** tab of this page. Set a maximum total charge on the run if you want a hard cap on spend, and use the input limits to control how much the Actor fetches.

### Automate & schedule

Run this Actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** - start runs, fetch datasets and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** - official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** - run it hourly, daily or weekly and keep your dataset current.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** - trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/youtube-playlist-scraper').call({
    "playlistUrls": [
        "https://www.youtube.com/playlist?list=PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb"
    ],
    "maxVideosPerPlaylist": 1000,
    "includePlaylistSummary": true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} records`);
```

### Integrate with any app

Connect the dataset to thousands of apps - no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** - multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** - push new records straight into your CRM or spreadsheet.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** - get notified when a scheduled run finds something new.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** - auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** - pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** - trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. You can call this Actor from Claude, ChatGPT or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** - describe the data you need and let the assistant run this Actor for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Related Actors in the same category:

- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** - Channels, Videos & Creator Leads
- **[Instagram Reels Scraper](https://apify.com/scrapesage/instagram-reels-scraper)** - Plays, Views & Analytics
- **[TikTok Scraper](https://apify.com/scrapesage/tiktok-scraper)** - Profiles, Videos, Stats & Creator Leads
- **[Bilibili Scraper](https://apify.com/scrapesage/bilibili-scraper)** - Videos, Trending, Comments & Creator Leads
- **[Douban Scraper](https://apify.com/scrapesage/douban-scraper)** - Movies, TV, Books, Music & Reviews

### Tips

- **A channel's uploads playlist** is its channel ID with `UC` swapped for `UU` - the simplest way to export a full back-catalogue in one run.
- **Audit a library cheaply.** Set `includeVideos` to false to pull just the playlist headers - title, owner, video and view totals - across hundreds of playlists.
- **Filter before you pay.** `containsText` and the min/max duration filters are applied before billing, so a keyword or long-form-only export costs only what it returns.
- **Total the run-time** by summing `durationSeconds` - it is already parsed, so no `2:32` string maths.
- **Watch a playlist** with monitor mode on a [Schedule](https://docs.apify.com/platform/schedules) and you are charged only for videos newly added.

### FAQ

**How is this Actor billed?** Pay-per-event: you pay only for the results it delivers, with no monthly rental and no start fee. The per-event price is shown on the Pricing tab.

**Can I schedule it and get results automatically?** Yes - create a [Schedule](https://docs.apify.com/platform/schedules) and add a [webhook](https://docs.apify.com/platform/integrations/webhooks) or an integration (Google Sheets, Slack, Make, Zapier) to push each run's dataset wherever you need it.

**Which export formats are available?** Every run's dataset can be downloaded as JSON, CSV, Excel (XLSX), XML, HTML or RSS from the Apify Console or the API.

**Can I run it from code or an AI agent?** Yes - through the [Apify API](https://docs.apify.com/api/v2) and client libraries, or from Claude, ChatGPT and other assistants via the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

**Is it legal to scrape YouTube?** This Actor collects publicly available data only. You are responsible for using the output in compliance with applicable laws (including data-protection law where personal data is involved) and the source's terms. See the **Disclaimer** below.

**Is this an official YouTube tool?** No. It is an independent, third-party Actor with no affiliation to, endorsement by or sponsorship from Google LLC. See the **Disclaimer** below.

### Disclaimer

**This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Google LLC or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.**

"YouTube" and any related marks are the property of their respective owners and are used here only in a descriptive, nominative sense - to identify the publicly accessible website from which this Actor collects data. This Actor is not an official YouTube product, is not authorised or certified by Google LLC, and does not distribute YouTube software. It collects only publicly available information; you are responsible for ensuring your use of that data complies with applicable laws, regulations and the terms of the source website.

### Need help?

Open an issue on the Actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome - this Actor is actively maintained.

# Actor input Schema

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

The playlists to extract. Accepts a full YouTube playlist URL, any watch URL carrying `list=`, or a bare playlist ID (`PL...`, `UU...`, `OLAK...`). One per row.

## `urlsFromFile` (type: `string`):

Bulk import. Paste a block of playlist URLs or IDs (one per line), **or** paste a single link to a `.txt` / `.csv` / Google Sheet / Google Drive / Apify key-value-store file holding them. Blank lines, `#` comments, quotes and extra CSV columns are ignored.

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

How many videos to read from each playlist, newest position first. YouTube's own hard limit for a playlist is 5,000 items, and this Actor can now reach all of them - the old 200-video cap is gone.

## `containsText` (type: `string`):

Keep only videos whose title contains this text (case-insensitive). Filtered rows are **never charged**.

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

Keep only videos at least this long, in seconds. `0` disables it. Useful for dropping Shorts (under 60 s).

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

Keep only videos no longer than this, in seconds. `0` disables it.

## `includeVideos` (type: `boolean`):

On by default: one row per video, in playlist order.

## `includePlaylistSummary` (type: `boolean`):

Adds one `playlist` row per playlist: title, description, owner, total video and view counts, and the thumbnail. Charged as `playlist`.

## `outputFields` (type: `array`):

Trim the export to just these columns. Leave empty for every field.

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

YouTube interface language, e.g. `en`, `es`, `de`. Affects the "2 days ago" and view-count wording.

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

Two-letter country YouTube should serve, e.g. `US`, `GB`, `IN`.

## `monitorMode` (type: `boolean`):

Remembers videos between runs and emits only ones it has not seen. Pair with an Apify Schedule to watch a playlist for additions.

## `monitorStoreName` (type: `string`):

Named key-value store holding the remembered videos. Use a different name per tracked playlist set.

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

How many playlists to read in parallel.

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

Apify Proxy is used by default. Datacenter proxy is enough for YouTube playlists.

## Actor input object example

```json
{
  "playlistUrls": [
    "https://www.youtube.com/playlist?list=PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb"
  ],
  "maxVideosPerPlaylist": 200,
  "minDurationSeconds": 0,
  "maxDurationSeconds": 0,
  "includeVideos": true,
  "includePlaylistSummary": true,
  "language": "en",
  "country": "US",
  "monitorMode": false,
  "monitorStoreName": "youtube-playlist-monitor",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every video and playlist summary collected in this run.

# 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 = {
    "playlistUrls": [
        "https://www.youtube.com/playlist?list=PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/youtube-playlist-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 = { "playlistUrls": ["https://www.youtube.com/playlist?list=PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/youtube-playlist-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 '{
  "playlistUrls": [
    "https://www.youtube.com/playlist?list=PLbpi6ZahtOH6Blw3RGYpWkSByi_T7Rygb"
  ]
}' |
apify call scrapesage/youtube-playlist-scraper --silent --output-dataset

```

## MCP server setup

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