# YouTube Playlist Videos Scraper (bulk, lightweight) (`steadydata/youtube-playlist-videos`) Actor

Every video in a YouTube playlist in order: position, title, duration, publish date and thumbnail, plus the playlist title, owner and length. Paste playlist URLs or ids. Only delivered videos are charged.

- **URL**: https://apify.com/steadydata/youtube-playlist-videos.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.35 / 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 Playlist Videos Scraper (bulk, lightweight)

Get **every video in a YouTube playlist, in playlist order**: position, title, video id,
duration, publish date and thumbnail, with the playlist title, owner and total length on
every row. Paste playlist URLs or ids, up to 100 playlists per run. **You only pay for
videos that are actually delivered.**

### Why this scraper

- **Built on a lightweight route.** This actor asks YouTube's own internal API instead
  of loading the playlist page, and needs roughly 2 KB per video. That is where the low
  price comes from.
- **Only delivered videos are charged.** A playlist that is private, deleted or empty
  comes back as a clear error record at no cost.
- **A hard cost ceiling you control.** `maxVideosPerPlaylist` is the cap: one delivered
  video is one charged event.
- **Order is preserved.** Every row carries its `position`, so the playlist sequence
  survives the export. That matters for courses, series and album playlists.
- **Every input format works.** A playlist id, a `/playlist?list=...` URL, or a watch URL
  that happens to carry a `list=` parameter.

### Who this is for

Anyone who needs a playlist as a table: course and series catalogues, music and podcast
back catalogues, curated collections used as input for further processing. It pairs with
the video details and transcript scrapers from the same publisher: list the playlist,
then pull details or transcripts for those ids.

### Who this is not for

If you want to watch a playlist, YouTube does that better. This actor is for getting the
list out as data, and it earns its place from the first playlist that is too long to
copy by hand.

It returns public playlist and video metadata only. No comments, no commenter names, no
personal data.

### Input example

```json
{
    "playlists": [
        "https://www.youtube.com/playlist?list=PLBsP89CPrMeNm71T5gYC6jebm9vPbLBiP",
        "PLBsP89CPrMeNm71T5gYC6jebm9vPbLBiP"
    ],
    "maxVideosPerPlaylist": 100,
    "language": "en",
    "country": "US"
}
```

### Output example

```json
{
    "playlistId": "PLBsP89CPrMeNm71T5gYC6jebm9vPbLBiP",
    "playlistUrl": "https://www.youtube.com/playlist?list=PLBsP89CPrMeNm71T5gYC6jebm9vPbLBiP",
    "playlistTitle": "Reviews!",
    "playlistOwner": "Marques Brownlee",
    "playlistVideoCount": 325,
    "position": 1,
    "videoId": "Od6M0AXpcxQ",
    "url": "https://www.youtube.com/watch?v=Od6M0AXpcxQ",
    "title": "Google Pixel 11/Pro Review: Poker Face",
    "duration": "12:28",
    "durationSeconds": 748,
    "publishedText": "2 days ago",
    "thumbnailUrl": "https://i.ytimg.com/vi/Od6M0AXpcxQ/maxresdefault.jpg",
    "status": "ok"
}
```

A playlist that cannot be delivered produces an error record instead, and is **not**
charged:

```json
{
    "input": "PLdoesnotexist000000000000",
    "status": "error",
    "errorCode": "PLAYLIST_EMPTY",
    "error": "Playlist PLdoesnotexist000000000000 has no public videos, or does not exist"
}
```

Error codes: `INVALID_PLAYLIST`, `PLAYLIST_EMPTY`, `BLOCKED`.

### Pricing

Pay per event: one `video-listed` event per delivered video. No charge for playlists that
fail, no charge for empty playlists, no separate platform-usage surcharge.

### FAQ

**Why is there no view count?**
Because YouTube does not put one in a playlist listing, and inventing a number would be
worse than leaving it out. If you need view counts, feed the video ids from this actor
into the YouTube Video Details Scraper from the same publisher.

**Does it keep the playlist order?**
Yes. Every row has a `position` field, counted from 1 in playlist order.

**Can it handle very long playlists?**
Yes, it pages through them. Set `maxVideosPerPlaylist` to your limit; the ceiling is
5000 videos per playlist.

**Does it work on auto-generated playlists?**
Channel uploads (`UU...`) and liked-video style ids are accepted. Mix playlists
(`RD...`) are generated per viewer, so results there are not stable.

**Is personal data collected?**
No. Public playlist and video metadata only.

**What happens when YouTube changes something?**
Internal routes shift from time to time. The actor is monitored daily and fixed fast,
and while it is broken you are not charged, because only delivered videos cost anything.

# Actor input Schema

## `playlists` (type: `array`):

Playlist ids or any YouTube URL containing one, for example PLBsP89CPrMeNm71T5gYC6jebm9vPbLBiP or https://www.youtube.com/playlist?list=PL...

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

Stop after this many videos per playlist. This is your cost ceiling: one delivered video is one charged event.

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

Interface language for the texts YouTube returns, e.g. en, nl, de.

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

ISO country code used for the request, e.g. US, NL, DE.

## Actor input object example

```json
{
  "playlists": [
    "https://www.youtube.com/playlist?list=PLBsP89CPrMeNm71T5gYC6jebm9vPbLBiP"
  ],
  "maxVideosPerPlaylist": 100,
  "language": "en",
  "country": "US"
}
```

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

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

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

```

## MCP server setup

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

```

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/CH1YYTdniC3ABcoil/builds/YCkdEBD4Bv1F8ab9P/openapi.json
