Quick Start

Request

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

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

const video: YoutubeVideo = await supadata.youtube.video({
  id: 'dQw4w9WgXcQ', // can be url or video id
});

Response

{
  "id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
  "description": "The official music video for \"Never Gonna Give You Up\"...",
  "duration": 213,
  "channel": {
    "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "name": "Rick Astley"
  },
  "tags": ["Rick Astley", "Official Video", "Music"],
  "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "uploadDate": "2009-10-25T00:00:00.000Z",
  "viewCount": 1234567890,
  "likeCount": 12345678,
  "transcriptLanguages": ["en", "es", "fr"]
}

Specification

Endpoint

GET https://api.supadata.ai/v1/youtube/video 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 video URL or ID. See Supported YouTube URL Formats.

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 video metadata request = 1 credit