Skip to main content

YouTube

Base URL: https://drain.lat/api/v1/youtube
Fetch a YouTube channel profile. Handle can be with or without @.
GET /api/v1/youtube/profile/:handle
handle
string
required
YouTube channel handle. Both MrBeast and @MrBeast are valid.
curl "https://drain.lat/api/v1/youtube/profile/MrBeast" \
  -H "x-api-key: YOUR_API_KEY"
id
string
YouTube channel ID.
username
string
Channel handle (with @).
displayName
string
Channel display name.
description
string
Channel description.
avatarUrl
string
Channel avatar URL.
country
string
Country code.
created
string
Channel creation date (ISO 8601).
subscribers
number
Subscriber count.
totalViews
number
Total view count.
videoCount
number
Total number of videos.
profileUrl
string
Link to the YouTube channel.
Response
{
  "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "username": "@MrBeast",
  "displayName": "MrBeast",
  "description": "SUBSCRIBE FOR A COOKIE",
  "avatarUrl": "https://yt3.googleusercontent.com/...",
  "country": "US",
  "created": "2012-02-19T21:23:10Z",
  "subscribers": 340000000,
  "totalViews": 65000000000,
  "videoCount": 812,
  "profileUrl": "https://www.youtube.com/@MrBeast",
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get the last 10 uploaded videos from a YouTube channel.
GET /api/v1/youtube/profile/:handle/videos
handle
string
required
YouTube channel handle.
curl "https://drain.lat/api/v1/youtube/profile/MrBeast/videos" \
  -H "x-api-key: YOUR_API_KEY"
handle
string
Channel handle.
videos
array
total
number
Number of videos returned.
Response
{
  "handle": "MrBeast",
  "videos": [
    {
      "id": "dQw4w9WgXcQ",
      "title": "I Spent 7 Days Buried Alive",
      "description": "This was insane...",
      "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
      "publishedAt": "2026-04-15T18:00:00Z",
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "total": 10,
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Fetch a YouTube channel by raw channel ID.
GET /api/v1/youtube/channel/:channelId
channelId
string
required
The YouTube channel ID (starts with UC).
curl "https://drain.lat/api/v1/youtube/channel/UCBcRF18a7Qf58cCRy5xuWwQ" \
  -H "x-api-key: YOUR_API_KEY"
id
string
Channel ID.
username
string
Channel handle (with @).
displayName
string
Channel display name.
description
string
Channel description.
avatarUrl
string
Channel avatar URL.
bannerUrl
string
Channel banner image URL.
country
string
Country code.
created
string
Channel creation date (ISO 8601).
subscribers
number
Subscriber count.
totalViews
number
Total view count.
videoCount
number
Total number of videos.
profileUrl
string
Link to the YouTube channel.
Response
{
  "id": "UCxxxxxx",
  "username": "@mkbhd",
  "displayName": "Marques Brownlee",
  "description": "Quality Tech Videos.",
  "avatarUrl": "https://...",
  "bannerUrl": "https://yt3.googleusercontent.com/banner/...",
  "country": "US",
  "created": "2009-03-21T00:00:00.000Z",
  "subscribers": 18500000,
  "totalViews": 4200000000,
  "videoCount": 1600,
  "profileUrl": "https://www.youtube.com/@mkbhd",
  "scrapedAt": "2026-05-08T10:00:00.000Z"
}
Get stats and metadata for a single YouTube video.
GET /api/v1/youtube/video/:videoId
videoId
string
required
The YouTube video ID (e.g. dQw4w9WgXcQ).
curl "https://drain.lat/api/v1/youtube/video/dQw4w9WgXcQ" \
  -H "x-api-key: YOUR_API_KEY"
id
string
Video ID.
title
string
Video title.
description
string
Video description.
channelId
string
Channel ID.
channelTitle
string
Channel name.
publishedAt
string
Publish date (ISO 8601).
thumbnailUrl
string
Thumbnail image URL.
tags
string[]
List of tags.
duration
string
Duration in ISO 8601 format (e.g. PT3M33S).
views
number
View count.
likes
number
Like count.
comments
number
Comment count.
url
string
Link to the video.
Response
{
  "id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up",
  "description": "The official video...",
  "channelId": "UCxxxxxx",
  "channelTitle": "Rick Astley",
  "publishedAt": "2009-10-25T06:57:33.000Z",
  "thumbnailUrl": "https://...",
  "tags": ["rick astley", "pop"],
  "duration": "PT3M33S",
  "views": 1400000000,
  "likes": 16000000,
  "comments": 2400000,
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "scrapedAt": "2026-05-08T10:00:00.000Z"
}