Get Playlist Videos
This endpoint returns a list of video IDs from a YouTube playlist.
Quick Start
Request
curl -X GET 'https://api.supadata.ai/v1/youtube/playlist/videos?id=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc&limit=20' \
-H 'x-api-key: YOUR_API_KEY'
Response
{
"videoIds": ["dQw4w9WgXcQ", "xvFZjo5PgG0"]
}
Specification
Endpoint
GET https://api.supadata.ai/v1/youtube/playlist/videos
Each request requires an x-api-key
header with your API key available after signing up. Find out more about Authentication.
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | YouTube playlist URL or ID. See Supported YouTube URL Formats. |
limit | number | No | Maximum number of video IDs to return. Default: 100. Max: 5000 |
Response Format
{
"videoIds": string[] // List of YouTube video IDs
}
Error Codes
The API returns HTTP status codes and error codes. See this page for more details.
Supported YouTube Identifiers
The universal id
parameter supports various YouTube URL and ID formats. See this page for more details.
Working with Playlist Videos
After retrieving the list of video IDs, you can:
- Get metadata for each video using the Video Metadata endpoint
- Get transcripts for each video using the Transcript endpoint
For large playlists, consider using the limit
parameter to control the number of results
returned.
Pricing
- 1 playlist videos request = 1 credit