Skip to content

YouTube Timestamps Generator API

The YouTube Timestamps Generator API uses advanced AI technology to automatically create chapter timestamps for YouTube videos. The AI analyzes video transcripts to identify natural topic changes and major sections, generating timestamps with descriptive titles and descriptions in the video’s original language.

Base URL: https://youtube-timestamps-generator-api.p.rapidapi.com

  • AI-Driven timestamp generation using advanced technology
  • Intelligent topic detection and segmentation
  • Descriptive titles and descriptions for each chapter
  • Automatic language detection and matching
  • Maximum video duration: 1 hour (60 minutes) for all plans
  • Fast processing with optimized AI prompts
  • Works with regular videos AND YouTube Shorts
  • YouTube-ready description format
  • Multiple API key rotation for reliability

All requests must include your RapidAPI key in the headers:

Terminal window
x-rapidapi-key: YOUR_RAPIDAPI_KEY
x-rapidapi-host: youtube-timestamps-generator-api.p.rapidapi.com

Terminal window
curl -X POST "https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url=https://www.youtube.com/watch?v=z_bX3runikk" \
-H "x-rapidapi-host: youtube-timestamps-generator-api.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",
"processing_time_ms": 48515,
"timestamps": [
{
"time": "0:00",
"seconds": 0,
"title": "AI as a Potential Governor/President",
"description": "Joe Rogan introduces the idea of advanced AI potentially taking over governance due to perceived human emotional volatility and past political scandals."
},
{
"time": "0:32",
"seconds": 32,
"title": "Human-AI Evolution: Integration vs. Obsolescence",
"description": "The discussion shifts to whether AI can improve human existence or if it will lead to humanity's obsolescence as the next step in evolution."
}
],
"youtube_description_format": "0:00 AI as a Potential Governor/President\n0:32 Human-AI Evolution: Integration vs. Obsolescence\n...",
"total_chapters": 9
}

Terminal window
curl -X POST "https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url=https://www.youtube.com/shorts/ivTdEQ6wseU" \
-H "x-rapidapi-host: youtube-timestamps-generator-api.p.rapidapi.com" \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY"

GET /

Get API information and usage instructions.

Response:

{
"name": "YouTube Timestamps Generator API",
"version": "1.0.0",
"description": "Generate Timestamps from any YouTube URL.",
"endpoints": {
"POST /generate": "Generate timestamps from YouTube URL (use query parameter: ?url=VIDEO_URL)",
"GET /health": "Health check"
},
"example": {
"method": "POST",
"endpoint": "/generate?url=https://www.youtube.com/watch?v=z_bX3runikk"
}
}

GET /health

Check if the API is operational.

Response:

{
"status": "ok",
"timestamp": 1704067200000
}

POST /generate

Generate AI-Driven chapter timestamps 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:

ParameterTypeRequiredDescription
urlstringYesFull YouTube video URL

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",
"processing_time_ms": 4567,
"timestamps": [
{
"time": "0:00",
"seconds": 0,
"title": "Introduction",
"description": "Opening scene"
}
],
"youtube_description_format": "0:00 Introduction\n...",
"total_chapters": 8
}

Response Fields:

FieldTypeDescription
successbooleanWhether the request was successful
video_idstringYouTube video ID
video_titlestringTitle of the video
video_durationintegerVideo duration in seconds
detected_languagestringDetected language code
language_namestringFull language name
processing_time_msintegerProcessing time in milliseconds
timestampsarrayArray of timestamp objects
youtube_description_formatstringReady-to-paste YouTube description format
total_chaptersintegerNumber of chapters generated

The API accepts various YouTube URL formats:

  • https://www.youtube.com/watch?v=VIDEO_ID
  • https://youtu.be/VIDEO_ID
  • https://www.youtube.com/shorts/VIDEO_ID
  • https://www.youtube.com/embed/VIDEO_ID
  • https://www.youtube.com/v/VIDEO_ID

Common language codes:

  • en - English
  • es - Spanish
  • fr - French
  • de - German
  • it - Italian
  • pt - Portuguese
  • ja - Japanese
  • ko - Korean
  • zh - Chinese
  • ru - Russian

Missing URL:

{
"error": "URL is required as query parameter: ?url=VIDEO_URL"
}

Invalid YouTube URL:

{
"error": "Invalid YouTube URL"
}

Not from RapidAPI:

{
"error": "Forbidden - Access only through RapidAPI"
}

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."
}

  • Price: $1.99/month
  • Monthly Requests: 100 (Hard Limit)
  • Rate Limit: 10 requests/hour
  • Price: $7.99/month
  • Monthly Requests: 1,000 (Hard Limit)
  • Rate Limit: 40 requests/hour
  • Price: $24.99/month
  • Monthly Requests: 5,000 (Hard Limit)
  • Rate Limit: 80 requests/hour
  • Price: $99.99/month
  • Monthly Requests: 20,000 (Hard Limit)
  • Rate Limit: 150 requests/hour

Always pass parameters in the URL as query parameters:

const videoUrl = 'https://www.youtube.com/watch?v=z_bX3runikk';
const apiUrl = `https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url=${encodeURIComponent(videoUrl)}`;

The youtube_description_format field provides timestamps in YouTube’s required format. Simply copy and paste into your video description.


async function generateTimestamps(videoUrl) {
const apiUrl = `https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url=${encodeURIComponent(videoUrl)}`;
const response = await fetch(apiUrl, {
method: 'POST',
headers: {
'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
'x-rapidapi-host': 'youtube-timestamps-generator-api.p.rapidapi.com'
}
});
const data = await response.json();
if (data.success) {
console.log(`Generated ${data.total_chapters} chapters`);
console.log(data.youtube_description_format);
return data;
} else {
throw new Error(data.error);
}
}
generateTimestamps('https://www.youtube.com/watch?v=z_bX3runikk')
.then(result => console.log(result.timestamps))
.catch(error => console.error(error));
import requests
from urllib.parse import urlencode, quote
def generate_timestamps(video_url):
base_url = 'https://youtube-timestamps-generator-api.p.rapidapi.com/generate'
params = {'url': video_url}
headers = {
'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
'x-rapidapi-host': 'youtube-timestamps-generator-api.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"Generated {data['total_chapters']} chapters")
print(data['youtube_description_format'])
return data
else:
raise Exception(data.get('error'))
result = generate_timestamps('https://www.youtube.com/watch?v=z_bX3runikk')
const axios = require('axios');
async function generateTimestamps(videoUrl) {
const encodedUrl = encodeURIComponent(videoUrl);
const url = `https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url=${encodedUrl}`;
const response = await axios.post(url, null, {
headers: {
'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
'x-rapidapi-host': 'youtube-timestamps-generator-api.p.rapidapi.com'
}
});
if (response.data.success) {
console.log(`Generated ${response.data.total_chapters} chapters`);
return response.data;
}
}
generateTimestamps('https://www.youtube.com/shorts/ivTdEQ6wseU')
.then(result => console.log(result.youtube_description_format))
.catch(console.error);
<?php
function generateTimestamps($videoUrl) {
$encodedUrl = urlencode($videoUrl);
$url = "https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url={$encodedUrl}";
$headers = [
'x-rapidapi-key: YOUR_RAPIDAPI_KEY',
'x-rapidapi-host: youtube-timestamps-generator-api.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 "Generated {$data['total_chapters']} chapters\n";
echo $data['youtube_description_format'];
return $data;
} else {
throw new Exception($data['error']);
}
}
$result = generateTimestamps('https://www.youtube.com/watch?v=z_bX3runikk');
?>
require 'net/http'
require 'json'
require 'uri'
def generate_timestamps(video_url)
encoded_url = URI.encode_www_form_component(video_url)
url = URI("https://youtube-timestamps-generator-api.p.rapidapi.com/generate?url=#{encoded_url}")
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-timestamps-generator-api.p.rapidapi.com'
response = http.request(request)
data = JSON.parse(response.body)
if data['success']
puts "Generated #{data['total_chapters']} chapters"
puts data['youtube_description_format']
return data
else
raise StandardError, data['error']
end
end
result = generate_timestamps('https://www.youtube.com/watch?v=z_bX3runikk')

Need help?


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 timestamps responsibly

Last updated: October 2025