API Documentation
Complete reference guide for the YouTube Data Extraction API. Learn how to integrate, authenticate, and make requests to extract video information and transcripts.
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' \
--header 'Authorization: Bearer YOUR_API_KEY'
https://api.vcyon.com
Video Information
Endpoint URL
GET /v1/youtube/video
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
videoId | string | Required | YouTube video identifier. Supports multiple formats for flexibility. Example: UF8uR6Z6KLc Supported Formats:
|
Request Examples
Using video ID:
curl --location 'https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc' \
--header 'Authorization: Bearer YOUR_API_KEY'
Video Transcript
Endpoint URL
GET /v1/youtube/transcript
Parameters
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' \
--header 'Authorization: Bearer YOUR_API_KEY'
Get Spanish transcript:
curl --location 'https://api.vcyon.com/v1/youtube/transcript?videoId=UF8uR6Z6KLc&language=es' \
--header 'Authorization: Bearer YOUR_API_KEY'
Channel Information
Endpoint URL
GET /v1/youtube/channel
Parameters
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_U4JriQ Supported Formats:
|
Request Examples
Using channel ID:
curl --location 'https://api.vcyon.com/v1/youtube/channel?id=UCBJycsmduvYEL83R_U4JriQ' \
--header 'Authorization: Bearer YOUR_API_KEY'
Using channel handle:
curl --location 'https://api.vcyon.com/v1/youtube/channel?id=mkbhd' \
--header 'Authorization: Bearer YOUR_API_KEY'
Channel Videos
Endpoint URL
GET /v1/youtube/channel/videos
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Optional | YouTube channel Identifier Example: UCBJycsmduvYEL83R_U4JriQ Supported Formats:
|
Request Examples
Using channel ID:
curl --location 'https://api.vcyon.com/v1/youtube/channel/videos?id=UCBJycsmduvYEL83R_U4JriQ' \
--header 'Authorization: Bearer YOUR_API_KEY'
Using channel handle:
curl --location 'https://api.vcyon.com/v1/youtube/channel/videos?id=mkbhd' \
--header 'Authorization: Bearer YOUR_API_KEY'
Playlist Information
Endpoint URL
GET /v1/youtube/playlist
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Required | YouTube playlist identifier. Supports multiple URL formats. Example: PLrAXtmRdnEQy4Qy9RMhfmIh2dpqy6_9UH Supported Formats:
|
Request Examples
Get playlist info with default limit:
curl --location 'https://api.vcyon.com/v1/youtube/playlist?id=PLrAXtmRdnEQy4Qy9RMhfmIh2dpqy6_9UH' \
--header 'Authorization: Bearer YOUR_API_KEY'
Get playlist with custom limit:
curl --location 'https://api.vcyon.com/v1/youtube/playlist?id=PLrAXtmRdnEQy4Qy9RMhfmIh2dpqy6_9UH&limit=20' \
--header 'Authorization: Bearer YOUR_API_KEY'
Playlist Videos
Endpoint URL
GET /v1/youtube/playlist/videos
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Required | YouTube playlist identifier. Supports multiple URL formats. Example: PLrAXtmRdnEQy4Qy9RMhfmIh2dpqy6_9UH Supported Formats:
|
Request Examples
Get playlist videos with default limit:
curl --location 'https://api.vcyon.com/v1/youtube/playlist/videos?id=PLrAXtmRdnEQy4Qy9RMhfmIh2dpqy6_9UH' \
--header 'Authorization: Bearer YOUR_API_KEY'
Get playlist videos with custom limit:
curl --location 'https://api.vcyon.com/v1/youtube/playlist/videos?id=PLrAXtmRdnEQy4Qy9RMhfmIh2dpqy6_9UH&' \
--header 'Authorization: Bearer YOUR_API_KEY'
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;
}
interface CaptionDataPayload {
videoId: string;
language: string;
translatedLanguage?: string;
captions: CaptionSegment[];
}
interface CaptionSegment {
start: number;
end: number;
text: string;
}
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 |