YouTube API

YouTube Data API

Access video metadata, channel analytics, comments, search results, and trending content from YouTube — all through a single, reliable REST API. No quota management required.

17+

Endpoints

3

Data categories

99.9%

Uptime SLA

<500ms

Avg latency

What You Can Do With The YouTube API

17+ endpoints across 3 categories. All returning clean, structured JSON.

Video

Video endpoints for YouTube.

13 endpoints

Get video information

Get detailed information about a YouTube video, returning the full raw data (including playerResponse and initialData).

Get video comments

Get comments for a YouTube video. Supports paginated retrieval.

Get video sub comments

Get replies to a YouTube video comment. Usage: 1. First call /get_video_comments to get top-level comments 2. Find the reply_continuation_token field in a comment's response 3. Use that token with this endpoint to get the replies for that comment

General search with filters

Search YouTube with advanced filters. Supports filtering by upload time, video duration, content type, features, and sort order.

YouTube Shorts search

Dedicated search for YouTube Shorts (videos under 60 seconds), using the native YouTube API. Supports filters and sort options. The first request may return mixed content; use continuation_token for subsequent requests to get pure Shorts.

Get channel videos

Get a list of videos from a YouTube channel. Supports paginated retrieval; use continuation_token to get more videos.

Get video streams info

Get format information and playback URLs for all quality levels of a YouTube video. Returns both standard formats (audio+video merged) and adaptive formats (audio and video separate). Suitable for scenarios where all quality options need to be displayed. Features: Automatically returns decrypted playback URLs for all formats No additional calls to get_signed_stream_url required Retrieves all available quality links in a single request Notes: Playback URLs are time-limited (approximately 6 hours); use them promptly after retrieval HD video (720p+) typically requires downloading audio and video streams separately and merging them

Get related videos

Get recommended related content for a YouTube video (recommended video list). Similar to the related videos shown on the right side of the video playback page. Returns all recommended videos at once (typically 20-30 videos). Notes: Each video's recommendations are generated by the YouTube algorithm and may vary The recommended list typically contains 20-30 videos This endpoint does not support pagination; all recommended videos are returned at once

Get search suggestions

Get YouTube search suggestions (autocomplete). Similar to the suggestions shown when typing in the YouTube search box. Notes: Suggestions vary by language and region Typically returns 10-20 suggestions Response is very fast (< 1 second)

Search channels

Search YouTube channels. Returns only channel-type results (filters out videos, playlists, etc.). Supports paginated retrieval for more channels. Usage flow: 1. First request: pass only the keyword parameter 2. Retrieve the continuation_token from the response 3. Next request: pass continuation_token (keyword is optional) 4. Repeat steps 2-3 until has_more is false Notes: Each page typically returns 10-20 channels

Search video

Search for videos.

Search channel

Search for channels.

Get trending videos

Get trending videos.

Channel

Channel endpoints for YouTube.

4 endpoints

YouTube API Quick Start Guide

Every request returns real-time, accurate data directly from YouTube.

Request
curl -X GET \
  "https://api.keyapi.ai/youtube/video/info?video_id=dQw4w9WgXcQ" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response200 OK
{
  "message": "success",
  "code": 0,
  "data": {
    "id": "dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up",
    "channel": "Rick Astley",
    "views": 1400000000,
    "likes": 16000000,
    "comments": 2800000,
    "duration": "PT3M33S"
  }
}

Why Choose KeyAPI YouTube API

Built for scale, reliability, and developer experience.

Video Metadata at Scale

Pull titles, view counts, like ratios, duration, and publish dates for any public YouTube video — no quota management required.

Channel Analytics

Subscriber counts, upload frequency, top-performing videos, and playlist data for any public YouTube channel.

Comment Mining

Extract full comment threads and reply chains for sentiment analysis, audience research, and community intelligence.

Search & Trending Content

Access real-time YouTube search results and trending video feeds by region and category.

No YouTube API Quota

Bypass YouTube's strict daily quota limits entirely. Make as many requests as your plan allows without quota errors.

Shorts & Live Stream Support

Access YouTube Shorts metadata and live stream details alongside standard video data — all from one API.

YouTube API Use Cases

Creator & Channel Research

Analyze any YouTube channel's growth trajectory, upload frequency, and top-performing videos. Identify rising creators before they peak.

Video Intelligence

Pull video metadata, view counts, like ratios, and comment sentiment at scale. Power recommendation engines and content discovery tools.

Competitive Analysis

Benchmark your channel against competitors. Track subscriber growth, engagement rates, and content strategy across any public YouTube channel.

Audience & Comment Mining

Extract comment threads, analyze audience sentiment, and surface the most engaged viewers for any video or channel.

Frequently Asked Questions

Is the YouTube API official?

No, KeyAPI provides an unofficial YouTube API that lets you access YouTube data through our platform. We handle the complexities of data collection so you can focus on building your application.

How current is the data?

We provide real-time data from YouTube. When you make a request, we fetch the latest information available.

How do credits work?

Each API endpoint consumes credits. Most endpoints cost just 1 credit. All pricing is transparent in our API documentation with no hidden fees.

Can I use this for AI model training?

Yes. KeyAPI provides structured, AI-ready data ideal for training datasets, fine-tuning LLMs, and building AI pipelines. Our historical archives are particularly valuable for large-scale training workloads.

Start for free — no credit card required

Ready to unlock unified
social intelligence?

Register today and receive 100 free API calls to test our infrastructure.

Join the growing community of developers, AI builders, automation engineers, and global businesses who trust KeyAPI for reliable, scalable social media data access.