# YouTube Playlist Videos Scraper (`pellucid_bird/youtube-playlist-videos-scraper`) Actor

The smart choice for YouTube playlist audits and curated video libraries. Export public playlist positions, titles, channel links, durations and source view labels to JSON or CSV. Retain repeated entries and review collection coverage.

- **URL**: https://apify.com/pellucid_bird/youtube-playlist-videos-scraper.md
- **Developed by:** [O M](https://apify.com/pellucid_bird) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.07 / 1,000 playlist video occurrence saveds

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 Playlist Videos Scraper

Export the videos in a public YouTube playlist with their original positions, titles, channel links and available durations. Keep repeated videos as separate playlist entries, filter by title or duration, and download structured JSON or CSV for content research, course catalogs and playlist monitoring.

Use this Actor when you already have a playlist URL or ID and need its **ordered video membership**. Each result represents one video occurrence in one playlist. A video appearing at two different positions produces two results.

### Quick start

Paste one or more public playlist URLs or IDs, choose a result limit, and run the Actor. The example below requests up to 20 entries from Google's public Search Stories playlist:

```json
{
  "playlistUrls": ["PLBCF2DAC6FFB574DE"],
  "maxItems": 20,
  "maxItemsPerPlaylist": 20,
  "maxEstimatedCostUsd": 0.1
}
```

Open **Dataset → Export** for JSON, CSV, Excel or XML. The **OUTPUT** record reports saved rows, source notices and the stopping reason for every playlist.

### Example result

This excerpt comes from a real public response recorded on November 12, 2026. Counts and relative age labels change over time. The full record is in `examples/video.json`.

```json
{
  "playlistId": "PLBCF2DAC6FFB574DE",
  "playlistTitle": "Google Search Stories",
  "position": 1,
  "videoId": "GvgqDSnpRQM",
  "title": "Andrew Willis, Skatepark Engineer",
  "url": "https://www.youtube.com/watch?v=GvgqDSnpRQM",
  "durationSeconds": 90,
  "viewCountText": "2.6M views",
  "publishedText": "13 years ago"
}
```

### What you get

| Field                                        | Meaning                                                               |
| -------------------------------------------- | --------------------------------------------------------------------- |
| `playlistId`, `playlistUrl`, `playlistTitle` | Requested playlist and source title when available                    |
| `sourceIndex`, `position`                    | The source's zero-based occurrence index and its one-based equivalent |
| `rank`                                       | Saved result order within this playlist after filters; starts at 1    |
| `videoId`, `url`, `playlistVideoUrl`         | Video identity, canonical video link and playlist occurrence link     |
| `title`, `channel`                           | Source video title and available channel ID, name and link            |
| `durationSeconds`, `durationText`            | Parsed duration and the original label; unavailable values are null   |
| `viewCountText`, `publishedText`             | Original display labels, such as “2.6M views” or “13 years ago”       |
| `scrapedAt`                                  | Time the source response was collected                                |

Rounded view labels stay as text. Relative upload labels are not converted into invented dates. Repeated input URLs for the same playlist merge; the same video in different playlists remains a separate result for each playlist.

### Pricing

**$0.018 per started run + $0.069 per 1,000 saved playlist entries. Apify platform resources used during the run are included.** Each saved occurrence costs $0.000069; repeated videos at different positions count separately.

| Saved entries in one run | Total charge |
| ------------------------ | -----------: |
| 0                        |       $0.018 |
| 10                       |     $0.01869 |
| 100                      |      $0.0249 |
| 150                      |     $0.02835 |
| 500                      |      $0.0525 |

The startup fee applies even when a playlist is unavailable or no entries match your filters. Result fees apply only to rows saved to the dataset. These examples cover one run; separate runs each have a startup fee. Dataset exports or API usage after the run follow your Apify plan's rates.

Set Apify's **Maximum charge per run** to cap event charges. `maxEstimatedCostUsd` is an additional planning allowance and can stop collection earlier. A value of zero skips collection; it does not remove an active startup fee. To allow 500 saved entries, both limits need to cover at least $0.0525; a $0.10 allowance covers the example tariff. Limits are ceilings, not a promise that the source will supply that many entries. Check the Pricing tab for the active tariff before a production run.

### Filters and limits

- Accepts 1–5 public playlist URLs or IDs. Supported IDs start with `PL`, `UU` (channel uploads), `FL` or `OLAK5uy_`. A YouTube watch URL containing a `list` parameter also works.
- Saves up to **500 entries per run**, with a separate maximum per playlist. Playlists are processed in input order.
- Optional `titleContains` filters source titles case-insensitively. `minDurationSeconds` and `maxDurationSeconds` use inclusive duration bounds. Enable `includeUnknownDuration` to retain unknown durations when a duration filter is active.
- Reads at most **10 source pages per playlist**, within a five-minute run limit. Filtered playlists, slow responses and retries can exhaust the run’s resource allowance before these limits. The Actor may stop early even when additional matching entries exist; check the coverage report.
- Collects publicly visible entries without signing in. Private playlists, Watch Later, liked-video lists and automatically generated mixes are unsupported. Source restrictions, consent pages, unavailable videos or rate limits can prevent collection.
- Provides playlist listing metadata. It does not fetch video files, subtitles, comments or video detail pages. Fields unavailable in the listing remain null.

A playlist can change while it is being collected. The Actor stops if it detects conflicting membership at a confirmed source position. The source's order is retained; there is no guarantee of an atomic snapshot across pages.

### Understand coverage

Read `OUTPUT.playlists` together with the dataset:

| Report field       | Meaning                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
| `savedRows`        | Confirmed saved occurrences for that playlist                                                                 |
| `sourceEnded`      | The visible listing was exhausted; this does not include hidden or inaccessible entries                       |
| `reason`           | Why collection stopped, such as `SOURCE_ENDED`, `ITEM_LIMIT`, `GLOBAL_LIMIT`, `PAGE_LIMIT` or `RUNTIME_LIMIT` |
| `notices`          | Original source messages, including notices about hidden unavailable videos                                   |
| `unavailableCount` | Hidden count only when explicitly recognized in the source notice; otherwise null                             |
| `excluded`         | Counts of entries omitted by filters or recognized unavailable placeholders                                   |

Source indices can contain gaps. Missing and hidden positions are not filled with invented records. In the recorded Google example, the source displayed 10 video entries and explicitly reported 3 hidden unavailable videos; only the 10 visible entries were returned.

Use schedules to collect later snapshots and compare `(playlistId, sourceIndex, videoId)` across runs. For precise exports and workflow integrations, use the dataset API, Apify schedules and webhooks. Retain `OUTPUT` to distinguish a source ending from a cap or interruption.

### API and AI workflow integration

Input: public YouTube playlist IDs or URLs. Output: ordered playlist video occurrences with source position, video title, video and channel links, duration, source labels and a coverage report. Suitable tasks include playlist-to-spreadsheet exports, course or music playlist inventories, repeated snapshot comparisons and content-library indexing.

For an AI assistant or automation, pass `playlistUrls`, `maxItems` and optional filters. Read dataset rows and `OUTPUT.playlists`; check `sourceEnded`, `reason` and `notices` before interpreting the result as complete. For persistent tracking, use the video ID together with the playlist identity and observed position.

### Recovery and support

Confirmed output is retained after a source interruption. A compatible resumed run reconciles its saved cursor and dataset before continuing. If a dataset write cannot be confirmed, automatic continuation stops to avoid duplicate output and result events. Start a fresh run when changing input.

When reporting a problem, include the run URL, playlist URL, input limits and relevant `OUTPUT` stopping reason. Avoid sharing login credentials; this Actor has no login input.

# Actor input Schema

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

1–5 public YouTube playlists. PL, UU uploads, FL and OLAK5uy\_ IDs are supported. Watch URLs with a list parameter also work. Exact duplicate inputs merge. Private lists and generated mixes are excluded.

## `maxItems` (type: `integer`):

Maximum saved playlist occurrences across all inputs. A repeated video at two positions counts as two results. The source or spending allowance may return fewer.

## `maxItemsPerPlaylist` (type: `integer`):

Maximum delivered occurrences for each playlist, within the total result limit.

## `titleContains` (type: `string`):

Case-insensitive substring in the source title. Filtering happens while reading up to 10 source pages per playlist; it does not search the whole YouTube catalog.

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

Keep videos with a parsed duration at least this long.

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

Keep videos with a parsed duration at most this long.

## `includeUnknownDuration` (type: `boolean`):

When a duration filter is active, also keep entries whose duration is unavailable, such as some live videos.

## `requestTimeoutSecs` (type: `integer`):

Time allowed for each request. A transient network or HTTP 5xx failure may receive one bounded retry. HTTP 403 and 429 are not retried.

## `maxEstimatedCostUsd` (type: `number`):

Additional planning allowance. Zero skips collection and new rows; an active startup fee still applies. Use Apify Maximum charge per run to cap event fees. Platform resources are included in the event price.

## Actor input object example

```json
{
  "playlistUrls": [
    "PLBCF2DAC6FFB574DE"
  ],
  "maxItems": 20,
  "maxItemsPerPlaylist": 20,
  "includeUnknownDuration": false,
  "requestTimeoutSecs": 15,
  "maxEstimatedCostUsd": 0.1
}
```

# Actor output Schema

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

No description

## `report` (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 = {
    "playlistUrls": [
        "PLBCF2DAC6FFB574DE"
    ],
    "maxItems": 20,
    "maxItemsPerPlaylist": 20,
    "includeUnknownDuration": false,
    "requestTimeoutSecs": 15,
    "maxEstimatedCostUsd": 0.1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pellucid_bird/youtube-playlist-videos-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": ["PLBCF2DAC6FFB574DE"],
    "maxItems": 20,
    "maxItemsPerPlaylist": 20,
    "includeUnknownDuration": False,
    "requestTimeoutSecs": 15,
    "maxEstimatedCostUsd": 0.1,
}

# Run the Actor and wait for it to finish
run = client.actor("pellucid_bird/youtube-playlist-videos-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": [
    "PLBCF2DAC6FFB574DE"
  ],
  "maxItems": 20,
  "maxItemsPerPlaylist": 20,
  "includeUnknownDuration": false,
  "requestTimeoutSecs": 15,
  "maxEstimatedCostUsd": 0.1
}' |
apify call pellucid_bird/youtube-playlist-videos-scraper --silent --output-dataset

```

## MCP server setup

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