GET
/
youtube
/
video
import { Supadata } from '@supadata/js';

const supadata = new Supadata({
apiKey: 'YOUR_API_KEY',
});
const video = await supadata.youtube.video({
id: 'https://youtu.be/dQw4w9WgXcQ', // can be id or url
});
console.log(video.title);
{
  "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"
  ]
}

Authorizations

x-api-key
string
header
required

Query Parameters

id
string
required

YouTube video URL or ID. See supported URL formats.

Examples:

"https://www.youtube.com/watch?v=dQw4w9WgXcQ"

"dQw4w9WgXcQ"

Response

200
application/json

Successfully fetched video metadata

The response is of type object.