scraper
Back to API docs

Overview

  • Overview

Discovery

  • POSTSearch
  • POSTHashtag

Content

  • POSTVideo
  • POSTChannel
  • POSTChannel Videos
  • POSTPlaylist

Details

  • POSTTranscript
  • POSTComments

YouTube Playlist

0.5 credits

Get videos from a YouTube playlist.

POST/api/v1/tools/youtube/playlist

Parameters

playlistIdstringrequired

YouTube playlist ID (e.g. "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf").

maxVideosnumber

Maximum number of videos to return. Defaults to 100.

fieldsstring[]

Fields to include per playlist video. Omit for defaults: videoId, title, channelName, duration, index. Use ["*"] for all fields. Available fields: videoId, title, channelName, duration, index, thumbnailUrl, thumbnails, durationSeconds. Playlist metadata is always returned.

Response Schema

dataobject

YouTube playlist result

playlistIdstring

Playlist ID

titlestring

Playlist title

descriptionstring

Playlist description

authorstring

Playlist author name

videoCountnumber

Total videos in the playlist

viewCountnumber

Total playlist view count

lastUpdatedstring

When the playlist was last updated

totalDurationSecondsnumber

Sum of all video durations in seconds

videosobject[]

Array of playlist video objects.

countnumber

Number of videos returned

truncatedboolean

True if results were cut short. Only present when truncation occurred.

metaobject

Request metadata

toolstring

Tool name (youtube-playlist)

creditsUsednumber

Credits consumed (1)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/youtube/playlist \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"playlistId": "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf",
"maxVideos": 50
}'

Response Example

{
"data": {
"playlistId": "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf",
"title": "JavaScript Crash Course",
"description": "Learn JS from scratch.",
"author": "Traversy Media",
"videoCount": 12,
"viewCount": 450000,
"lastUpdated": "Updated 2 months ago",
"totalDurationSeconds": 14400,
"videos": [
{
"videoId": "hdI2bqOjy3c",
"title": "JavaScript Crash Course For Beginners",
"channelName": "Traversy Media",
"duration": "1:40:30",
"index": 0
}
],
"count": 1
},
"meta": {
"tool": "youtube-playlist",
"creditsUsed": 0.5,
"requestId": "req_abc123"
}
}