# YouTube Playlist Scraper (`datahamster/youtube-playlist-scraper`) Actor

YouTube playlist scraper: every video of any public playlist or channel uploads list, past 1,000 videos, with position, title, channel, duration, view count, upload age, Shorts/live flags and availability. No API key. Monitor mode returns videos added to and removed from each playlist.

- **URL**: https://apify.com/datahamster/youtube-playlist-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Videos, 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.80 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

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 Scraper

Get every video of any public YouTube playlist as one row per video: position, video ID, URL, title, channel, duration in seconds, view count as a number, upload age, thumbnail, Shorts/live flags and availability, plus the playlist's title, owner channel, video count, total views and last-updated date on every row. Paste playlist links, IDs or a channel URL (its whole uploads list). No API key, no login. Turn on monitor mode and each run returns only the videos added to or removed from your playlists since the last run.

**Try it:** the prefilled example returns 20 rows in about 4 seconds and costs about $0.020. Results cost $1 per 1,000.

Coverage limits: public and unlisted playlists only (private playlists and Watch Later need the owner's login). View counts are YouTube's rounded display ("774M views" becomes 774000000; small counts are exact, `viewCountExact` says which), and upload dates are YouTube's relative labels: `publishedAt` is filled only for labels of weeks or less, `publishedText` always. A Shorts-only list (`UUSH...`) gives its newest 100 Shorts.

### Why this one

- **Added and removed videos, per playlist.** Monitor mode returns only what changed since the last run: videos added (`event: "added"`) and videos removed or made private (`event: "removed"`, with the position they had), with an optional webhook or Telegram message. For course and curriculum tracking, competitor series, music charts. The most-used YouTube playlist actor in the Store has no monitor mode or change tracking in its input (its inputs are playlist URLs, a details switch, a per-playlist limit and a cache flag).
- **Numbers you can sort by.** `viewCount` and `durationSeconds` are integers and `publishedAt` is a timestamp where YouTube allows it, instead of one text field like "1.2M views • 3 years ago".
- **A channel is a playlist too.** Paste `youtube.com/@CNN`, a `/channel/UC...` link or a UC id and you get the channel's uploads list, newest first, past 1,000 videos (a test run on 05.11.2026 read the first 1,200 uploads of `@CNN` in 57 seconds, 12 requests, no proxy).
- **Shorts and live flags, unique videos across playlists.** `isShort`, `isLive`, `wasLive`, `isUpcoming` on every row (`isShort` is null for videos of 3 minutes or less that YouTube lists without saying); `dedupeVideos` turns a list of playlists into a list of unique videos.
- **Price:** $1 per 1,000 videos, no start fee.

### What you get

One row per playlist entry:

| playlistTitle | position | title | channelName | durationSeconds | viewCount | publishedText |
|---|---|---|---|---|---|---|
| Popular Music Videos | 1 | BELLAKEO (Video Oficial) - Peso Pluma, Anitta | Peso Pluma | 235 | 774,000,000 | 2 years ago |
| Popular Music Videos | 2 | Arcángel - FN8 ( Video Lyric ) | Arcangel | 650 | 32,000,000 | 2 years ago |
| Popular Music Videos | 3 | Becky G - POR EL CONTRARIO (Performance Video) ft. Ángela Ag | Becky G | 235 | 794,000,000 | 2 years ago |
| Uploads from CNN | 2 | Dems flip 8 more GOP seats today, expanding House majority | CNN | 650 | 30,000 | 16 minutes ago |
| Uploads from CNN | 1101 | Watch fall bloom from space | CNN | 59 | 26,000 | 3 weeks ago |
| Uploads from CNN | 8 | 'Tired of the fighting': Texas Gov-elect Hinojosa on new age | CNN | 731 | 13,000 | Streamed 2 hours ago |

A full row:

```json
{
  "id": "PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI:fOT0BUpITw8",
  "url": "https://www.youtube.com/watch?v=fOT0BUpITw8",
  "scrapedAt": "2026-11-05T22:30:26.520772Z",
  "playlistId": "PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI",
  "playlistUrl": "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI",
  "playlistTitle": "Popular Music Videos",
  "playlistDescription": null,
  "playlistChannelName": "Music",
  "playlistChannelId": "UC-9-kyTW8ZkZNDHQJ6FgpwQ",
  "playlistChannelUrl": "https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ",
  "playlistVideoCount": 182,
  "playlistViewCount": 1045675898,
  "playlistLastUpdated": "2026-07-17",
  "position": 1,
  "videoId": "fOT0BUpITw8",
  "title": "BELLAKEO (Video Oficial) - Peso Pluma, Anitta",
  "channelName": "Peso Pluma",
  "channelId": "UCzrM_068Odho89mTRrrxqbA",
  "channelUrl": "https://www.youtube.com/channel/UCzrM_068Odho89mTRrrxqbA",
  "durationText": "3:55",
  "durationSeconds": 235,
  "viewCount": 774000000,
  "viewCountText": "774M views",
  "viewCountExact": false,
  "publishedText": "2 years ago",
  "publishedAt": null,
  "thumbnailUrl": "https://i.ytimg.com/vi/fOT0BUpITw8/hqdefault.jpg",
  "isShort": false,
  "isLive": false,
  "isUpcoming": false,
  "wasLive": false,
  "availability": "public",
  "event": null
}
```

Fields: `playlistId`, `playlistUrl`, `playlistTitle`, `playlistDescription`, `playlistChannelName`, `playlistChannelId`, `playlistChannelUrl`, `playlistVideoCount` (null for a channel's uploads list, whose header shows a placeholder 20,000), `playlistViewCount`, `playlistLastUpdated`, `position` (1-based), `videoId`, `url`, `title`, `channelName`, `channelId`, `channelUrl` (the video's creator), `durationText`, `durationSeconds`, `viewCount`, `viewCountText`, `viewCountExact` (null when there is no count, e.g. a live stream's "watching"), `publishedText`, `publishedAt`, `thumbnailUrl`, `isShort`, `isLive`, `isUpcoming`, `wasLive`, `availability` (`public`, `deleted`, `private`, `unavailable`), `event` (monitor mode), `scrapedAt`.

### Input

| Field | Meaning | Default |
|---|---|---|
| `playlists` | Playlist links (`/playlist?list=`, watch links with `list=`), playlist IDs, channel URLs, UC ids or @handles | Popular Music Videos |
| `maxVideosPerPlaylist` | Videos to read from the top of each playlist, up to 20,000 | 1000 |
| `dedupeVideos` | Skip videos an earlier playlist of the run already returned (scrape mode) | false |
| `maxProxyTier` | Highest proxy tier to fall back to when YouTube refuses a request | residential |
| `maxItems` | Stop after this many rows in total | 1000 |
| `mode` | `scrape`, or `monitor` for added and removed videos only | `scrape` |

### Monitor mode

Set `mode` to `monitor`, list your playlists and schedule the task (daily works well). The first run records each playlist and returns nothing (no result charges). Every later run reads each playlist in full and returns:

- videos added since the last run, with `event: "added"` and all fields;
- videos removed since the last run (including ones made private or deleted, which YouTube drops from the list), with `event: "removed"`, the video ID, URL, title, channel and the position it had.

A video moving up or down is not reported. Videos are compared within the top `maxVideosPerPlaylist` of each playlist. For a playlist longer than that (a channel's uploads), entries that new videos pushed below the cut are not reported as removed, so a real removal right at the cut can go unreported; set the limit above the playlist's size to compare all of it. If a read stops early, that run reports no removals for that playlist, does not move its saved state, and the next run compares again. Early means: YouTube refused a page on every proxy tier; or a page came back empty before the count in the playlist header was reached and stayed empty when asked again through the next proxy tier; or fewer videos came back than the header count minus 2% (at least 3: the count includes hidden unavailable videos). A channel's uploads list shows a placeholder "20,000 videos", so there `playlistVideoCount` is null; an empty page before `maxVideosPerPlaylist` is reached is then asked again through the next proxy tier, and if it stays empty the read counts as stopped early. Each monitor run costs one `monitor-check` event ($0.005) plus $0.001 per returned video. Add `webhookUrl`, or `telegramBotToken` and `telegramChatId`, to get a message when something changed.

If a monitor run is killed and the next one ends with `overlapping_run`, wait for the killed run's timeout or start over with a new `monitorStateId`.

### Pricing

| Event | Price |
|---|---|
| result | $0.001 per video row ($1 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.001 per added or removed video in monitor mode |

Apify platform usage is billed to you separately; the actor runs without a proxy first and with 512 MB, so it is small. A playlist that does not exist pushes nothing and costs nothing.

### Limits

- Public and unlisted playlists only. Mixes (`RD...`), Watch Later and private playlists need a signed-in viewer.
- View counts on playlist pages are rounded by YouTube for counts of 1,000 and up. For exact views and likes per video, feed the video IDs to the YouTube Video Details Scraper.
- Upload dates are relative ("2 years ago"); only labels of weeks or less give `publishedAt`.
- YouTube hides some unavailable videos from playlist pages even when asked to show them; a video that disappears is reported as removed in monitor mode.
- The same video listed twice in one playlist gives one row, at its first position.
- If YouTube stops serving a playlist before the count in its header, even through the next proxy tier, the run keeps what it read and the run log warns (`incomplete` in the `ADAPTER_STATS` record lists those playlists).

### FAQ

**Can it read playlists with more than 100 videos?** Yes. It reads 100 per request and pages on, up to 20,000 per playlist.

**Can I get all videos of a channel?** Yes: paste the channel URL or @handle; the actor reads its uploads playlist.

**Why is `publishedAt` empty for older videos?** YouTube shows only "3 years ago" on playlist pages; a date from that would be off by up to a year, so the label stays in `publishedText`.

### Changelog

- 0.1: first release. Every video of public playlists at 100 per request with numeric views and durations, channel URL to uploads list, Shorts/live flags, dedupe across playlists, monitor mode for added and removed videos.

### Related actors

- [YouTube Video Details Scraper](https://apify.com/datahamster/youtube-video-details-scraper): exact views, likes, comments, tags and captions per video.
- [YouTube Search Scraper](https://apify.com/datahamster/youtube-search-scraper): videos, channels and playlists for a keyword.
- [YouTube Transcript Scraper](https://apify.com/datahamster/youtube-transcript-scraper): full transcripts of YouTube videos.
- [Spotify Playlist Scraper](https://apify.com/datahamster/spotify-playlist-scraper): every track of public Spotify playlists, with added and removed tracks.

***

If this actor saved you time, a short review on its Store page helps other people find it. Found a bug or need a field? Open a ticket on the **Issues** tab.

# Actor input Schema

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

Stop after this many rows in total across all playlists (you are charged only for pushed rows).

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

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

Public playlists to read: links ("https://www.youtube.com/playlist?list=PL..."), watch links with a list= parameter, or playlist IDs, one per line. A channel URL, UC id or @handle reads that channel's uploads list. The same playlist listed twice is read once.

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

Read at most this many videos of each playlist, from the top. 100 videos are read per request. In monitor mode added/removed videos are detected within this range, so set it above the playlist's size.

## `dedupeVideos` (type: `boolean`):

Skip a video that an earlier playlist of this run already returned, so a list of playlists gives a list of unique videos. Scrape mode only.

## `maxProxyTier` (type: `string`):

The actor starts without a proxy and climbs to datacenter, then residential proxies only if YouTube refuses a request. Set a lower cap to limit proxy costs.

## Actor input object example

```json
{
  "maxItems": 20,
  "mode": "scrape",
  "playlists": [
    "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"
  ],
  "maxVideosPerPlaylist": 1000,
  "dedupeVideos": false,
  "maxProxyTier": "residential"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "maxItems": 20,
    "playlists": [
        "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"
    ],
    "maxVideosPerPlaylist": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/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 = {
    "maxItems": 20,
    "playlists": ["https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"],
    "maxVideosPerPlaylist": 1000,
}

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

```

## MCP server setup

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