YouTube Summarizer API
Overview
Section titled “Overview”The YouTube Summarizer API leverages advanced AI technology to generate intelligent summaries from YouTube video transcripts. Whether you need a brief overview, detailed analysis, bullet points, or key takeaways, this API delivers high-quality summaries in the video’s original language.
Base URL: https://youtube-summarizer-api1.p.rapidapi.com
Features
Section titled “Features”- Driven by advanced AI technology
- 4 summary types: Brief, Detailed, Bullet Points, Key Takeaways
- Automatic language detection and matching
- Maximum video duration: 1 hour (60 minutes) for all plans
- Fast processing with key rotation system
- Works with regular videos AND YouTube Shorts
- Comprehensive metadata and analytics
- Automatic fallback to English if needed
Authentication
Section titled “Authentication”All requests must include your RapidAPI key in the headers:
x-rapidapi-key: YOUR_RAPIDAPI_KEYx-rapidapi-host: youtube-summarizer-api1.p.rapidapi.comQuick Start Examples
Section titled “Quick Start Examples”Example 1: Long Video (15 min) - Brief Summary
Section titled “Example 1: Long Video (15 min) - Brief Summary”curl -X POST "https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=https://www.youtube.com/watch?v=z_bX3runikk&type=brief&language=en" \ -H "x-rapidapi-host: youtube-summarizer-api1.p.rapidapi.com" \ -H "x-rapidapi-key: YOUR_RAPIDAPI_KEY"Response:
{ "success": true, "video_id": "z_bX3runikk", "video_title": "Matthew McConaughey's Concerns Over AI", "video_duration": 914, "detected_language": "en", "language_name": "English", "summary_type": "brief", "summary": "In this Joe Rogan Experience episode, Matthew McConaughey discusses his concerns about artificial intelligence and its potential impact on humanity. He explores how AI might become our future governor or president, raising questions about human agency and control.", "processing_time_ms": 3421, "total_characters": 15409, "total_segments": 469, "was_truncated": false}Example 2: YouTube Short (34 sec) - Detailed Summary
Section titled “Example 2: YouTube Short (34 sec) - Detailed Summary”curl -X POST "https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=https://www.youtube.com/shorts/ivTdEQ6wseU&type=detailed&language=en" \ -H "x-rapidapi-host: youtube-summarizer-api1.p.rapidapi.com" \ -H "x-rapidapi-key: YOUR_RAPIDAPI_KEY"Response:
{ "success": true, "video_id": "ivTdEQ6wseU", "video_title": "Are We Living in a Simulation Within a Simulation?", "video_duration": 34, "detected_language": "en", "language_name": "English", "summary_type": "detailed", "summary": "This short video explores the fascinating concept of simulation theory...\n\nThe discussion delves into philosophical questions...\n\nThe video concludes with thought-provoking ideas about reality...", "processing_time_ms": 2847, "total_characters": 786, "total_segments": 22, "was_truncated": false}Example 3: Bullet Points Summary
Section titled “Example 3: Bullet Points Summary”curl -X POST "https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=https://www.youtube.com/watch?v=z_bX3runikk&type=bullet_points&language=en" \ -H "x-rapidapi-host: youtube-summarizer-api1.p.rapidapi.com" \ -H "x-rapidapi-key: YOUR_RAPIDAPI_KEY"Example 4: Key Takeaways
Section titled “Example 4: Key Takeaways”curl -X POST "https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=https://www.youtube.com/shorts/ivTdEQ6wseU&type=key_takeaways&language=en" \ -H "x-rapidapi-host: youtube-summarizer-api1.p.rapidapi.com" \ -H "x-rapidapi-key: YOUR_RAPIDAPI_KEY"Endpoints
Section titled “Endpoints”API Information
Section titled “API Information”GET /Get API information and usage instructions.
Response:
{ "name": "YouTube Summarizer API", "version": "1.0.0", "description": "Generate AI-Driven summaries from any YouTube video.", "endpoints": { "POST /summarize": "Generate summary from YouTube URL (use query parameters: ?url=VIDEO_URL&type=detailed&language=en)", "GET /health": "Health check" }, "summary_types": ["brief", "detailed", "bullet_points", "key_takeaways"], "example": { "method": "POST", "endpoint": "/summarize?url=https://www.youtube.com/watch?v=z_bX3runikk&type=detailed&language=en" }}Health Check
Section titled “Health Check”GET /healthCheck if the API is operational.
Response:
{ "status": "ok", "timestamp": 1704067200000}Generate Summary
Section titled “Generate Summary”POST /summarizeGenerate an AI-Driven summary from a YouTube video.
Query Parameters Required
All parameters must be sent as query parameters in the URL, not in the request body.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Full YouTube video URL |
type | string | No | Summary type: brief, detailed, bullet_points, key_takeaways (default: detailed) |
language | string | No | Preferred language code (default: en) |
Successful Response (200 OK):
{ "success": true, "video_id": "z_bX3runikk", "video_title": "Matthew McConaughey's Concerns Over AI", "video_duration": 914, "detected_language": "en", "language_name": "English", "summary_type": "detailed", "summary": "This video explores...", "processing_time_ms": 3421, "total_characters": 15409, "total_segments": 469, "was_truncated": false}Response Fields:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
video_id | string | YouTube video ID |
video_title | string | Title of the video |
video_duration | integer | Video duration in seconds |
detected_language | string | Detected language code |
language_name | string | Full language name |
summary_type | string | Type of summary generated |
summary | string | The AI-generated summary |
processing_time_ms | integer | Processing time in milliseconds |
total_characters | integer | Total characters in transcript |
total_segments | integer | Number of subtitle segments |
was_truncated | boolean | Whether transcript was truncated for length |
Summary Types
Section titled “Summary Types”2-3 sentences maximum - Quick overview of the main idea.
Best for:
- Quick content screening
- Social media posts
- Short descriptions
- Executive overviews
Example:
{ "type": "brief", "summary": "This video explores the fundamentals of machine learning, explaining how algorithms learn from data. It covers supervised and unsupervised learning methods with practical examples."}Detailed
Section titled “Detailed”5-8 paragraphs - Comprehensive analysis covering all aspects.
Includes:
- Main topic and purpose
- Key points and arguments
- Important details and examples
- Conclusions or final thoughts
Best for:
- Research and analysis
- Content review
- Learning and education
- Complete understanding
Bullet Points
Section titled “Bullet Points”8-12 key points - Organized, scannable format.
Best for:
- Quick reference
- Study notes
- Meeting summaries
- Action items
Key Takeaways
Section titled “Key Takeaways”5-7 main lessons - Actionable insights and important points.
Best for:
- Educational content
- Training materials
- Decision-making
- Knowledge retention
Supported YouTube URL Formats
Section titled “Supported YouTube URL Formats”The API accepts various YouTube URL formats:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://www.youtube.com/shorts/VIDEO_IDhttps://www.youtube.com/embed/VIDEO_IDhttps://www.youtube.com/v/VIDEO_ID
Language Support
Section titled “Language Support”The API automatically detects the video’s language and generates summaries in that same language.
Common Language Codes:
en- Englishes- Spanishfr- Frenchde- Germanit- Italianpt- Portugueseja- Japaneseko- Koreanzh- Chineseru- Russian
Error Responses
Section titled “Error Responses”400 Bad Request
Section titled “400 Bad Request”Missing URL:
{ "error": "URL is required as query parameter: ?url=VIDEO_URL&type=detailed&language=en"}Invalid YouTube URL:
{ "error": "Invalid YouTube URL"}Invalid Summary Type:
{ "error": "Invalid summary type. Valid types: brief, detailed, bullet_points, key_takeaways"}403 Forbidden
Section titled “403 Forbidden”Not from RapidAPI:
{ "error": "Forbidden - Access only through RapidAPI"}500 Internal Server Error
Section titled “500 Internal Server Error”No Captions Available:
{ "success": false, "error": "Could not fetch subtitles: No captions available for this video", "video_id": "z_bX3runikk", "suggestion": "Make sure the video has captions/subtitles enabled. Try with a popular video like: https://www.youtube.com/watch?v=z_bX3runikk"}Pricing Plans
Section titled “Pricing Plans”Perfect for personal projects
- Price: $2.99/month
- Monthly Requests: 100 (Hard Limit)
- Rate Limit: 5 requests/hour
- Summary Types: All
- Support: Community
Ideal for content creators
- Price: $9.99/month
- Monthly Requests: 1,000 (Hard Limit)
- Rate Limit: 20 requests/hour
- Summary Types: All
- Support: Email
Best for businesses and researchers
- Price: $39.99/month
- Monthly Requests: 5,000 (Hard Limit)
- Rate Limit: 50 requests/hour
- Summary Types: All
- Support: Priority Email
Enterprise-grade AI summaries
- Price: $119.99/month
- Monthly Requests: 20,000 (Hard Limit)
- Rate Limit: 100 requests/hour
- Summary Types: All
Best Practices
Section titled “Best Practices”1. Use Query Parameters
Section titled “1. Use Query Parameters”Always pass parameters in the URL as query parameters:
const videoUrl = 'https://www.youtube.com/watch?v=z_bX3runikk';const type = 'brief';const language = 'en';const apiUrl = `https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=${encodeURIComponent(videoUrl)}&type=${type}&language=${language}`;2. Cache Results
Section titled “2. Cache Results”Cache generated summaries to avoid redundant API calls for the same video.
3. Handle Errors Gracefully
Section titled “3. Handle Errors Gracefully”Always implement error handling for cases where summaries cannot be generated.
Code Examples
Section titled “Code Examples”JavaScript (Fetch)
Section titled “JavaScript (Fetch)”async function generateSummary(videoUrl, type = 'detailed', language = 'en') { const apiUrl = `https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=${encodeURIComponent(videoUrl)}&type=${type}&language=${language}`;
const response = await fetch(apiUrl, { method: 'POST', headers: { 'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY', 'x-rapidapi-host': 'youtube-summarizer-api1.p.rapidapi.com' } });
const data = await response.json();
if (data.success) { console.log(`Video: ${data.video_title}`); console.log(`Type: ${data.summary_type}`); console.log(`Language: ${data.language_name}`); return data.summary; } else { throw new Error(data.error); }}
generateSummary('https://www.youtube.com/watch?v=z_bX3runikk', 'brief') .then(summary => console.log(summary)) .catch(error => console.error(error));Python (Requests)
Section titled “Python (Requests)”import requestsfrom urllib.parse import urlencode, quote
def generate_summary(video_url, summary_type='detailed', language='en'): base_url = 'https://youtube-summarizer-api1.p.rapidapi.com/summarize' params = { 'url': video_url, 'type': summary_type, 'language': language }
headers = { 'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY', 'x-rapidapi-host': 'youtube-summarizer-api1.p.rapidapi.com' }
url = f"{base_url}?{urlencode(params, quote_via=quote)}" response = requests.post(url, headers=headers) data = response.json()
if data.get('success'): print(f"Video: {data['video_title']}") print(f"Type: {data['summary_type']}") print(f"Language: {data['language_name']}") return data['summary'] else: raise Exception(data.get('error', 'Unknown error'))
summary = generate_summary( 'https://www.youtube.com/watch?v=z_bX3runikk', summary_type='bullet_points')print(summary)Node.js (Axios)
Section titled “Node.js (Axios)”const axios = require('axios');
async function generateSummary(videoUrl, type = 'detailed', language = 'en') { try { const encodedUrl = encodeURIComponent(videoUrl); const url = `https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=${encodedUrl}&type=${type}&language=${language}`;
const response = await axios.post(url, null, { headers: { 'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY', 'x-rapidapi-host': 'youtube-summarizer-api1.p.rapidapi.com' } });
if (response.data.success) { console.log(`Video: ${response.data.video_title}`); console.log(`Type: ${response.data.summary_type}`); console.log(`Language: ${response.data.language_name}`); return response.data.summary; } } catch (error) { console.error('Error:', error.response?.data || error.message); throw error; }}
generateSummary( 'https://www.youtube.com/shorts/ivTdEQ6wseU', 'key_takeaways') .then(summary => console.log(summary)) .catch(console.error);<?php
function generateSummary($videoUrl, $type = 'detailed', $language = 'en') { $encodedUrl = urlencode($videoUrl); $url = "https://youtube-summarizer-api1.p.rapidapi.com/summarize?url={$encodedUrl}&type={$type}&language={$language}";
$headers = [ 'x-rapidapi-key: YOUR_RAPIDAPI_KEY', 'x-rapidapi-host: youtube-summarizer-api1.p.rapidapi.com' ];
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch); curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) { echo "Video: {$data['video_title']}\n"; echo "Type: {$data['summary_type']}\n"; echo "Language: {$data['language_name']}\n"; return $data['summary']; } else { throw new Exception($data['error']); }}
$summary = generateSummary('https://www.youtube.com/watch?v=z_bX3runikk', 'detailed');echo $summary;?>require 'net/http'require 'json'require 'uri'
def generate_summary(video_url, summary_type = 'detailed', language = 'en') encoded_url = URI.encode_www_form_component(video_url) url = URI("https://youtube-summarizer-api1.p.rapidapi.com/summarize?url=#{encoded_url}&type=#{summary_type}&language=#{language}")
http = Net::HTTP.new(url.host, url.port) http.use_ssl = true
request = Net::HTTP::Post.new(url) request['x-rapidapi-key'] = 'YOUR_RAPIDAPI_KEY' request['x-rapidapi-host'] = 'youtube-summarizer-api1.p.rapidapi.com'
response = http.request(request) data = JSON.parse(response.body)
if data['success'] puts "Video: #{data['video_title']}" puts "Type: #{data['summary_type']}" puts "Language: #{data['language_name']}" return data['summary'] else raise StandardError, data['error'] endend
summary = generate_summary('https://www.youtube.com/shorts/ivTdEQ6wseU', 'brief')puts summaryUse Cases
Section titled “Use Cases”Content Creators
Section titled “Content Creators”- Generate video descriptions
- Create social media posts
- Plan follow-up content
- Audience engagement insights
Researchers & Academics
Section titled “Researchers & Academics”- Analyze educational videos
- Extract key concepts
- Literature review assistance
- Quick content evaluation
Businesses
Section titled “Businesses”- Competitor analysis
- Market research
- Training material summaries
- Content curation
Educators
Section titled “Educators”- Create study guides
- Lesson planning
- Student resources
- Course material development
Q: Why do I need to use query parameters instead of request body?
A: All parameters must be passed in the URL as query parameters for the API to work correctly with RapidAPI’s infrastructure.
Q: How accurate are the summaries?
A: Summaries are generated using state-of-the-art AI technology, providing high accuracy based on the video’s transcript quality.
Q: Can I customize the summary length?
A: Each summary type has a predefined structure. Choose the type that best matches your needs: brief (shortest), detailed (longest), bullet_points, or key_takeaways.
Q: What happens if the video is in a language other than English?
A: The API automatically detects the language and generates summaries in the same language.
Q: Does it work with YouTube Shorts?
A: Yes! The API works with both regular YouTube videos and YouTube Shorts.
Q: What if the video has no captions?
A: The API requires captions/subtitles to function. Videos without captions will return an error.
Support
Section titled “Support”Need help? We’re here for you:
- Email: support@cliperly.com
Terms of Use
Section titled “Terms of Use”By using this API, you agree to:
- Use the service only through RapidAPI
- Not exceed your plan’s rate limits
- Comply with YouTube’s Terms of Service
- Use AI-generated summaries responsibly
Last updated: October 2025