docs
API Documentation
Complete reference for the YouTube data API: authentication, endpoints, parameters, and response shapes.
Getting Started
Free API Key
Get started with 100 free API calls. No credit card required.
Steps to get your API key:
- Sign up for a free account
- Navigate to the API Keys section in your dashboard
- Generate your first API key
- Copy and securely store your API key
curl --location 'https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc'https://api.vcyon.comVideo Information
Endpoint URL
GET /v1/youtube/videoParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
videoId | string | required | YouTube video identifier. Supports multiple formats for flexibility. Example: UF8uR6Z6KLcSupported Formats:
|
Request Examples
Using video ID:
curl --location 'https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc'Video Transcript
Endpoint URL
GET /v1/youtube/transcriptParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
videoId | string | required | YouTube video identifier in any supported format. Example: UF8uR6Z6KLc |
language | string | optional | Language code for the transcript (e.g., 'English', 'Japanese', 'Indonesia'). If not specified, returns the default language. Example: English |
Request Examples
Get default transcript:
curl --location 'https://api.vcyon.com/v1/youtube/transcript?videoId=UF8uR6Z6KLc'Get Italian transcript:
curl --location 'https://api.vcyon.com/v1/youtube/transcript?videoId=UF8uR6Z6KLc&language=Italian'Channel Information
Endpoint URL
GET /v1/youtube/channelParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | YouTube channel ID (starts with UC) or Channel handle (with or without @), e.g., @MrBeast or channel URL https://www.youtube.com/@MrBeast Example: UCBJycsmduvYEL83R_U4JriQSupported Formats:
|
Request Examples
Using channel ID:
curl --location 'https://api.vcyon.com/v1/youtube/channel?id=UCBJycsmduvYEL83R_U4JriQ'Using channel handle:
curl --location 'https://api.vcyon.com/v1/youtube/channel?id=@mkbhd'Channel Videos
Endpoint URL
GET /v1/youtube/channel/videosParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | optional | YouTube channel Identifier Example: UCBJycsmduvYEL83R_U4JriQSupported Formats:
|
Request Examples
Using channel ID:
curl --location 'https://api.vcyon.com/v1/youtube/channel/videos?id=UCBJycsmduvYEL83R_U4JriQ'Using channel handle:
curl --location 'https://api.vcyon.com/v1/youtube/channel/videos?id=@mkbhd'Playlist Information
Endpoint URL
GET /v1/youtube/playlistParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | YouTube playlist identifier. Supports multiple URL formats. Example: PLBsP89CPrMeO7uztAu6YxSB10cRMpjgiYSupported Formats:
|
Request Examples
Get playlist info:
curl --location 'https://api.vcyon.com/v1/youtube/playlist?id=PLBsP89CPrMeO7uztAu6YxSB10cRMpjgiY'Playlist Videos
Endpoint URL
GET /v1/youtube/playlist/videosParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | YouTube playlist identifier. Supports multiple URL formats. Example: PLBsP89CPrMeO7uztAu6YxSB10cRMpjgiYSupported Formats:
|
Request Examples
Get playlist videos:
curl --location 'https://api.vcyon.com/v1/youtube/playlist/videos?id=PLBsP89CPrMeO7uztAu6YxSB10cRMpjgiY'TypeScript Interfaces
interface ApiResponse<T> {
success: boolean;
data?: T;
error?: {
code: string;
message: string;
details?: any;
};
meta: {
timestamp: string;
requestId: string;
version: string;
};
}interface VideoInfo {
id: string;
title: string;
author: string;
description: string;
thumbnails: Thumbnail[];
category: string;
tags: string[];
duration: number;
channel: Channel;
viewCount: number;
likeCount: number;
isPrivate: boolean;
isUnlisted: boolean;
isFamilySafe: boolean;
publishDate: PublishDate;
transcriptLanguages: string[];
hasTranscripts: boolean;
captionLanguages: CaptionLanguage[];
hasCaptions: boolean;
captionTranslationLanguages: TranslationLanguage[];
}interface Thumbnail {
url: string;
width: number;
height: number;
}
interface Channel {
id: string;
name: string;
url: string;
}
interface PublishDate {
text: string;
date: string;
}
interface CaptionLanguage {
languageCode: string;
languageName: string;
}
interface TranslationLanguage {
languageCode: string;
languageName: string;
}interface ChannelInfo {
id: string;
title: string;
description: string;
url: string;
vanityUrl: string;
isFamilySafe: boolean;
keywords: string[];
avatars: Thumbnail[];
thumbnails: Thumbnail[];
tags: string[];
isUnlisted: boolean;
subscriberCount: number;
viewCount: number;
joinedDate: string;
videoCount?: number;
country?: string;
}interface PlaylistInfo {
id: string;
title: string;
description: string;
subtitle: string | null;
author: PlaylistAuthor;
videoCount: number;
viewCount: number;
lastUpdated: string | null;
}interface PlaylistAuthor {
id: string;
name: string;
url: string;
}interface TranscriptData {
language: string;
transcriptLanguages: string[];
hasTranscript: boolean;
segments: TranscriptSegment[];
}
interface TranscriptSegment {
start: number;
end: number;
text: string;
}/v1/youtube/comments endpoint.interface CommentAuthor {
id: string;
name: string;
thumbnail: string;
}
interface Comment {
id: string;
isPinned: boolean;
likeCount: number;
replyCount: number;
text: string;
publishedTime: string;
author: CommentAuthor;
}
interface CommentsResponse {
comments: Comment[];
}interface VideoListResponse {
videos: VideoListItem[];
pagination?: {
nextPageToken?: string;
totalResults?: number;
};
}
interface VideoListItem {
id: string;
title: string;
description: string;
thumbnails: Thumbnail[];
duration: number;
publishedAt: string;
viewCount?: number;
position?: number; // For playlist videos
}Error Handling
Status Code Reference
| Parameter | Type | Description |
|---|---|---|
200 | OK | Request successful |
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | API key lacks required permissions |
404 | Not Found | Video not found or unavailable |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server error occurred |
503 | Service Unavailable | Service temporarily unavailable |
Video Comments
Endpoint URL
GET /v1/youtube/commentsParameters
videoIdYouTube video identifier in any supported format (ID or URL).
UF8uR6Z6KLcsortSort order for comments. Must be one of 'TOP_COMMENTS' or 'NEWEST_FIRST'.
TOP_COMMENTSRequest Examples
Get top comments:
curl --location 'https://api.vcyon.com/v1/youtube/comments?videoId=UF8uR6Z6KLc&sort=TOP_COMMENTS'Get newest comments:
curl --location 'https://api.vcyon.com/v1/youtube/comments?videoId=UF8uR6Z6KLc&sort=NEWEST_FIRST'