YouTube Playlist Scraper — All Videos, Views & Order avatar

YouTube Playlist Scraper — All Videos, Views & Order

Pricing

from $1.40 / 1,000 video delivereds

Go to Apify Store
YouTube Playlist Scraper — All Videos, Views & Order

YouTube Playlist Scraper — All Videos, Views & Order

Scrape every video in a YouTube playlist: title, views, duration and position in the list, plus the playlist's own title and totals. No API key, no quota.

Pricing

from $1.40 / 1,000 video delivereds

Rating

0.0

(0)

Developer

Dottti

Dottti

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 days ago

Last modified

Categories

Features

Limited permissions

Share

Scrape every video in a YouTube playlist, in order: title, views, duration and position, plus the playlist's own title and totals. No API key, no quota, no login.

Output

{
"playlistId": "PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj",
"playlistTitle": "Pop Music Playlist - Timeless Pop Songs",
"playlistVideoCount": 200,
"position": 1,
"videoId": "ekr2nIex040",
"url": "https://www.youtube.com/watch?v=ekr2nIex040",
"title": "ROSÉ & Bruno Mars - APT. (Official Music Video)",
"viewCount": 2600000000,
"viewCountText": "2.6B views",
"lengthText": "2:54",
"lengthSeconds": 174
}

Two details that matter

Position is order-of-appearance, and says so. YouTube does not publish an index field on playlist pages, so position is assigned from document order — meaning position within what was fetched. A test asserts that skipped rows do not consume a number, so positions are always contiguous.

Playlist IDs are validated, not assumed. A video ID is 11 characters with no prefix; a playlist ID starts with PL, UU, LL, FL, OL or RD. Passing a video ID by mistake is rejected rather than sent to a playlist page that does not exist. Any URL carrying list= also works, including a watch URL that happens to be playing from a playlist.

Blocked playlists are never charged

YouTube refuses some datacenter IPs with "Sign in to confirm you're not a bot", returned as a normal 200 page with no data. Billing for that would charge you for this Actor's IP being refused, so those rows are written with blocked: true and error: "blocked_by_youtube" and no event fires.

Set proxyConfiguration to Apify Proxy with RESIDENTIAL groups to avoid it.

Input

FieldWhat it does
playlistsPlaylist URLs or IDs. Any URL with list= works.
maxVideosPerPlaylistCap per playlist, and therefore on cost. One request returns about 100 videos.
includePlaylistInfoAttach playlist title, URL and totals to every row.
language / countryTwo-letter codes.

Example

{
"playlists": ["https://www.youtube.com/playlist?list=PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj"],
"maxVideosPerPlaylist": 200
}

Notes and limits

  • Public playlists only. Private and unlisted playlists are not accessible without a login, and are reported as empty rather than guessed at.
  • View counts are YouTube's displayed values, abbreviated for large numbers ("2.6B views"). Both the number and the original string are returned.
  • One request returns roughly 100 videos. Deeper paging is not performed, so a 500-video playlist returns its first 100.
  • playlistVideoCount is the playlist's own stated total, which may exceed the number of rows returned. The difference tells you what was not fetched.

Development

npm install
npm test
node src/main.js