Video & Channel

Use these endpoints to pull structured metadata for individual videos and YouTube channels, including subscriber counts, video IDs, descriptions, and stats.

Endpoints

Endpoint Purpose
GET /v1/youtube/video Title, description, duration, stats, and thumbnails for a video
GET /v1/youtube/channel Subscriber count, video count, and description for a channel
GET /v1/youtube/channel/videos Ordered list of video IDs published by a channel

REST API Examples

Get video info

curl "https://youtube.toolkitapi.io/v1/youtube/video?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
  -H "X-API-Key: YOUR_KEY"
const params = new URLSearchParams({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });
const resp = await fetch(`https://youtube.toolkitapi.io/v1/youtube/video?${params}`, {
  headers: { "X-API-Key": "YOUR_KEY" },
});
const data = await resp.json();
console.log(`${data.title} — ${data.view_count} views`);

Get channel info

curl "https://youtube.toolkitapi.io/v1/youtube/channel?url=https://www.youtube.com/@ToolkitAPI" \
  -H "X-API-Key: YOUR_KEY"

List channel videos

curl "https://youtube.toolkitapi.io/v1/youtube/channel/videos?channel_id=UCxxxxxx&limit=20" \
  -H "X-API-Key: YOUR_KEY"

Python SDK examples

Video metadata

from toolkitapi import Media

with Media(api_key="tk_...") as media:
    video = media.youtube_video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    print(video["title"], "—", video["viewCount"], "views")

Channel info

from toolkitapi import Media

with Media(api_key="tk_...") as media:
    channel = media.youtube_channel("@mkbhd")
    print(channel["title"], "—", channel["subscriberCount"], "subscribers")

Channel info by ID

from toolkitapi import Media

with Media(api_key="tk_...") as media:
    channel = media.youtube_channel("UCVHFbw7woebKtR1K6HNzFvQ")
    print(channel["videoCount"], "videos published")

List channel video IDs

from toolkitapi import Media

with Media(api_key="tk_...") as media:
    result = media.youtube_channel_videos("@mkbhd")
    print(f"{len(result['videoIds'])} video IDs")
    for vid_id in result["videoIds"][:5]:
        print(f"  https://www.youtube.com/watch?v={vid_id}")

Video response fields

Field Type Description
id string YouTube video ID
url string Canonical video URL
title string Video title
description string Full video description
duration integer Duration in seconds
viewCount integer Total view count
likeCount integer Total like count
commentCount integer Total comment count
channelId string Publishing channel ID
channelTitle string Publishing channel name
publishedAt string ISO 8601 publish timestamp
thumbnails object Thumbnail URLs by size (default, medium, high, maxres)
tags string[] Video tags
categoryId string YouTube category ID

Channel response fields

Field Type Description
id string Channel ID
title string Channel display name
description string Channel description
customUrl string Channel handle (e.g. @mkbhd)
subscriberCount integer Subscriber count
videoCount integer Total published videos
viewCount integer Lifetime channel view count
publishedAt string ISO 8601 channel creation date
thumbnails object Channel avatar URLs by size
country string Country code (nullable)

Channel videos response fields

Field Type Description
channelId string Channel ID
videoIds string[] Ordered list of video IDs
videoCount integer Number of IDs returned

Tips

  • The channel endpoint accepts a channel ID (UCxxxxxx), a @handle, or a full channel URL — no pre-processing required.
  • channel/videos returns recent videos ordered newest-first. Combine with the video endpoint to enrich each ID with full metadata.
  • Counts like viewCount, likeCount, and subscriberCount are periodically updated and may lag slightly behind YouTube's live display.

Jump straight to live tools

  • https://youtube.toolkitapi.io/tools/youtube/youtube-video/
  • https://youtube.toolkitapi.io/tools/youtube/youtube-channel/
  • https://youtube.toolkitapi.io/tools/youtube/youtube-channel-videos/