Quick Start

Request

import {
  Supadata,
  YoutubeChannel
} from '@supadata/js';

// Initialize the client
const supadata = new Supadata({
  apiKey: 'YOUR_API_KEY',
});

const channel: YoutubeChannel = await supadata.youtube.channel({
  id: 'https://youtube.com/@RickAstleyVEVO', // can be url, channel id, handle
});

Response

{
  "id": "PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc",
  "title": "My Favorite Videos",
  "description": "A collection of my favorite videos",
  "videoCount": 25,
  "viewCount": 1000000,
  "lastUpdated": "2023-01-01T00:00:00.000Z",
  "channel": {
    "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "name": "Rick Astley"
  }
}

Specification

Endpoint

GET https://api.supadata.ai/v1/youtube/playlist Each request requires an x-api-key header with your API key available after signing up. Get your API key here.

Query Parameters

ParameterTypeRequiredDescription
idstringYesYouTube playlist URL or ID. See Supported YouTube URL Formats.

Playlist Videos

You can also retrieve a list of video IDs from a playlist using the Playlist Videos endpoint.

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.

Pricing

  • 1 playlist metadata request = 1 credit