YepAPI
YouTube API

Video Details

Get full metadata for any YouTube video including title, views, likes, and formats.

POST/v1/youtube/video
$0.02/call

Usage

const res = await fetch('https://api.yepapi.com/v1/youtube/video', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ id: 'dQw4w9WgXcQ' }),
});
const { data } = await res.json();
console.log(data.title, data.viewCount);
curl -X POST https://api.yepapi.com/v1/youtube/video \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "dQw4w9WgXcQ"}'

Request Body

ParameterTypeRequiredDescriptionDefault
idstringYesYouTube video ID
geostringNoCountry code for geo-specific results

Response

{
  "ok": true,
  "data": {
    "status": "OK",
    "id": "dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
    "lengthSeconds": 213,
    "keywords": ["rick astley", "Never Gonna Give You Up", "rickroll"],
    "channelTitle": "Rick Astley",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "description": "The official video for \"Never Gonna Give You Up\" by Rick Astley...",
    "viewCount": 1762255485,
    "allowRatings": true,
    "isLiveContent": false,
    "isPrivate": false,
    "thumbnail": [
      { "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg", "width": 120, "height": 90 },
      { "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg", "width": 1920, "height": 1080 }
    ],
    "formats": [
      {
        "itag": 18,
        "mimeType": "video/mp4",
        "quality": "medium",
        "qualityLabel": "360p",
        "width": 640,
        "height": 360,
        "url": "https://redirector.googlevideo.com/videoplayback?..."
      }
    ],
    "adaptiveFormats": [
      {
        "itag": 313,
        "mimeType": "video/webm; codecs=\"vp9\"",
        "quality": "hd2160",
        "qualityLabel": "2160p",
        "width": 3840,
        "height": 2160,
        "fps": 25,
        "bitrate": 18076636,
        "contentLength": "358608461",
        "url": "https://redirector.googlevideo.com/videoplayback?..."
      }
    ],
    "captions": {
      "captionTracks": [
        { "languageCode": "en", "kind": "asr" }
      ]
    },
    "storyboards": [
      { "url": "https://...", "width": 48, "height": 27 }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.statusstringVideo status (e.g. OK, ERROR)
data.idstringYouTube video identifier
data.titlestringFull video title
data.lengthSecondsnumberVideo duration in seconds
data.keywordsstring[]Tags and keywords associated with the video
data.channelTitlestringName of the channel that uploaded the video
data.channelIdstringUnique identifier for the channel
data.descriptionstringFull video description text
data.viewCountnumberTotal number of views
data.allowRatingsbooleanWhether likes/dislikes are enabled
data.isLiveContentbooleanWhether this is a livestream
data.isPrivatebooleanWhether the video is private
data.thumbnailobject[]Thumbnail images at various resolutions
data.formatsobject[]Muxed (audio+video) streaming formats
data.formats[].itagnumberYouTube format identifier
data.formats[].mimeTypestringMIME type and codec info
data.formats[].qualitystringQuality level (e.g. medium, hd720)
data.formats[].qualityLabelstringHuman-readable quality (e.g. 360p)
data.formats[].urlstringDirect streaming URL
data.adaptiveFormatsobject[]Separate audio/video adaptive streaming formats
data.adaptiveFormats[].itagnumberYouTube format identifier
data.adaptiveFormats[].mimeTypestringMIME type and codec info
data.adaptiveFormats[].qualitystringQuality level (e.g. hd2160)
data.adaptiveFormats[].qualityLabelstringHuman-readable quality (e.g. 2160p)
data.adaptiveFormats[].widthnumberVideo width in pixels
data.adaptiveFormats[].heightnumberVideo height in pixels
data.adaptiveFormats[].fpsnumberFrames per second
data.adaptiveFormats[].bitratenumberPeak bitrate in bits per second
data.adaptiveFormats[].contentLengthstringFile size in bytes
data.adaptiveFormats[].urlstringDirect streaming URL
data.captionsobjectCaption/subtitle track information
data.storyboardsobject[]Storyboard sprite sheet images for seek preview

This endpoint costs 2¢ per call (6 quota units upstream) because it returns comprehensive video metadata including available formats.

On this page