YepAPI
YouTube API

YouTube Metadata

Get live view and like counts for a YouTube video in real-time.

POST/v1/youtube/metadata
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/youtube/metadata', {
  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.viewCount, data.likeCount);
curl -X POST https://api.yepapi.com/v1/youtube/metadata \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "dQw4w9WgXcQ"}'

Request Body

ParameterTypeRequiredDescriptionDefault
idstringYesYouTube video ID

Response

{
  "ok": true,
  "data": {
    "id": "dQw4w9WgXcQ",
    "viewCount": "1762287921",
    "viewCountText": "1,762,287,921 views",
    "likeCount": 18936262,
    "likeCountText": "18M"
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.idstringYouTube video identifier
data.viewCountstringExact total view count as a numeric string
data.viewCountTextstringFormatted view count with commas (e.g. 1,762,287,921 views)
data.likeCountnumberExact total number of likes
data.likeCountTextstringAbbreviated like count (e.g. 18M)

On this page