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

API Key Required
All API requests require authentication using an API key.

Free API Key

Get started with 100 free API calls. No credit card required.

Steps to get your API key:

  1. Sign up for a free account
  2. Navigate to the API Keys section in your dashboard
  3. Generate your first API key
  4. Copy and securely store your API key
Quick Start Example
curl --location 'https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Authentication

Bearer Token Authentication

All API requests must include your API key in the Authorization header using Bearer token format.

Header Format:

Authorization: Bearer YOUR_API_KEY

Security Best Practices

  • • Never expose your API key in client-side code
  • • Store API keys as environment variables
  • • Rotate API keys regularly
  • • Use different keys for different environments

API Endpoints

Get Video Information
GET
Retrieve comprehensive information about a YouTube video including metadata, statistics, and thumbnails.

Endpoint URL

GET /v1/youtube/video

Parameters

ParameterTypeRequiredDescription
videoIdstringRequiredYouTube video ID (11 characters)

Request Example

curl --location 'https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Response Schema

{
  "id": "string",
  "title": "string",
  "description": "string",
  "thumbnails": [
    {
      "url": "string",
      "width": number,
      "height": number
    }
  ],
  "category": "string",
  "tags": ["string"],
  "duration": number,
  "channel": {
    "id": "string",
    "name": "string",
    "url": "string"
  },
  "viewCount": number,
  "likeCount": number,
  "transcriptLanguages": ["string"]
}

Example Response

{
  "id": "UF8uR6Z6KLc",
  "title": "Steve Jobs' 2005 Stanford Commencement Address",
  "description": "Drawing from some of the most pivotal points in his life, Steve Jobs, chief executive officer and co-founder of Apple Computer and of Pixar Animation Studios, urged graduates to pursue their dreams and see the opportunities in life's setbacks -- including death itself -- at the university's 114th Commencement on June 12, 2005.",
  "thumbnails": [
    {
      "url": "https://i.ytimg.com/vi/UF8uR6Z6KLc/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgBvgKAAvABigIMCAAQARhlIE0oQDAP&rs=AOn4CLAX4nhj2ABzMcPq9QdA5upntyTmCQ",
      "width": 336,
      "height": 188
    }
  ],
  "category": "Education",
  "tags": [],
  "duration": 904,
  "channel": {
    "id": "UC-EnprmCZ3OXyAoG7vjVNCA",
    "name": "Stanford",
    "url": "http://www.youtube.com/@stanford"
  },
  "viewCount": 46713100,
  "likeCount": 536239,
  "transcriptLanguages": [
    "Arabic",
    "English (auto-generated)",
    "English - English",
    "Italian",
    "Japanese",
    "Khmer",
    "Portuguese (Brazil)",
    "Spanish - Spanish",
    "Spanish (Spain)"
  ]
}
Get Video Transcript
GET
Extract timestamped transcripts from YouTube videos with support for multiple languages.

Endpoint URL

GET /v1/youtube/transcript

Parameters

ParameterTypeRequiredDescription
videoIdstringRequiredYouTube video ID (11 characters)
languagestringOptionalLanguage name (e.g., ’English’, ’Japanese’, ’Spanish’)

Request Example

curl --location 'https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc&language=Japanese' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Response Schema

{
  "language": "string",
  "transcriptLanguages": ["string"],
  "segments": [
    {
      "start": number,
      "end": number,
      "text": "string"
    }
  ]
}

Example Response

{
  "language": "Japanese",
  "transcriptLanguages": [
    "Arabic",
    "English (auto-generated)",
    "English - English",
    "Italian",
    "Japanese",
    "Khmer",
    "Portuguese (Brazil)",
    "Spanish - Spanish",
    "Spanish (Spain)"
  ],
  "segments": [
    {
      "start": 6048,
      "end": 7049,
      "text": "スタンフォード大学\nwww.stanford.edu"
    },
    {
      "start": 7050,
      "end": 13031,
      "text": "アナウンス:この番組はスタンフォード大学の提供でお送りします"
    },
    {
      "start": 27003,
      "end": 32012,
      "text": "めっちゃ頭ええ大学の卒業式に呼んでもうて、ほんまおおきに"
    }
  ]
}

Code Examples

Implementation Examples
Ready-to-use code snippets in popular programming languages

Video Information

// Using fetch API
const response = await fetch('https://api.vcyon.com/v1/youtube/video?videoId=UF8uR6Z6KLc', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

const videoData = await response.json();
console.log(videoData);

// Using axios
import axios from 'axios';

const videoData = await axios.get('/v1/youtube/video', {
  params: { videoId: 'UF8uR6Z6KLc' },
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});

Transcript Extraction

// Using fetch API
const response = await fetch('https://api.vcyon.com/v1/youtube/transcript?videoId=UF8uR6Z6KLc&language=Japanese', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

const transcript = await response.json();
console.log(transcript);

// Using axios
import axios from 'axios';

const transcript = await axios.get('/v1/youtube/transcript', {
  params: { videoId: 'UF8uR6Z6KLc', language: 'Japanese' },
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});

Error Handling

HTTP Status Codes
CodeStatusDescription
200OKRequest successful
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenAPI key lacks required permissions
404Not FoundVideo not found or unavailable
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error occurred
503Service UnavailableService temporarily unavailable

Rate Limiting

Request Limits

Rate Limit Headers

Every API response includes rate limiting information in the headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1640995200

Rate Limit Exceeded

When you exceed your rate limit, you’ll receive a 429 status code. Implement exponential backoff in your retry logic.

Need Help?

Our support team is here to help you integrate and get the most out of the YouTube API.