REST API FOR DEVELOPERS

YouTube Transcript API

Extract YouTube transcripts programmatically. Captions first, cached when available, with AI fallback and JSON responses built for apps.

# Quick start — get a transcript in one request
curl -X POST https://tubescript.cc/v1/transcript \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://youtube.com/watch?v=dQw4w9WgXcQ", "language": "en", "stream": false}'
QUICK ANSWERS

YouTube transcript API answers

The API facts developers usually need before reading the full reference.

01

Does TubeScript have a YouTube transcript API?

Yes. The Team plan includes API access for programmatic YouTube transcript extraction, with JSON responses, timestamps, metadata, and 100 API requests per day.

02

Does TubeScript use YouTube captions or AI first?

TubeScript checks YouTube captions first. Manual captions are preferred, then auto-generated captions. AI transcription is only used when no usable caption track is available.

03

How fast is TubeScript?

Cached transcripts are usually returned almost instantly. Fresh captioned videos typically finish in seconds. Videos without captions take longer because they require AI audio transcription.

04

Can TubeScript transcribe a video with no captions?

Yes, for many public videos. If YouTube does not provide usable captions, TubeScript can fall back to AI audio transcription. That path is slower than caption extraction and can fail for restricted, too-long, or temporary capacity-limited videos.

API OVERVIEW

Built for developers

The TubeScript API lets you extract transcripts from YouTube videos programmatically. Send a POST request with a YouTube URL, and receive a JSON response containing the full transcript text, individual timestamped segments, video metadata, and optional AI-generated outputs.

The API is designed for building content tools, research platforms, accessibility features, and internal applications that need YouTube transcript data. It handles caption extraction, cache lookups, AI fallback, and text formatting so your code does not have to.

Endpoint reference

POST/v1/transcript

Submit a YouTube URL for transcription. Returns the full transcript with timestamps and metadata.

Request Body

{ "url": "https://youtube.com/watch?v=VIDEO_ID", "language": "en", "stream": false }

Response

{ "success": true, "data": { "video_id": "dQw4w9WgXcQ", "video_title": "Video Title", "channel_name": "Channel Name", "video_duration": 212, "language": "en", "transcript_source": "youtube_auto", "word_count": 1847, "read_time_minutes": 8, "segments": [ { "start": 0.0, "duration": 4.2, "text": "First segment text" } ], "cached": false, "permalink": "https://tubescript.cc/transcript/dQw4w9WgXcQ" } }

Code examples

Python
import requests response = requests.post( "https://tubescript.cc/v1/transcript", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "url": "https://youtube.com/watch?v=dQw4w9WgXcQ", "language": "en", "stream": False } ) data = response.json() print(data["data"]["segments"][0]["text"])
JavaScript
const response = await fetch( "https://tubescript.cc/v1/transcript", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://youtube.com/watch?v=dQw4w9WgXcQ", language: "en", stream: false }) } ); const data = await response.json(); console.log(data.data.segments.map((segment) => segment.text).join(" "));
cURL
curl -X POST https://tubescript.cc/v1/transcript \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://youtube.com/watch?v=dQw4w9WgXcQ", "language": "en", "stream": false}'

Pricing and limits

PlanTeam — $24.99/month
Daily limit100 requests/day
No-caption AI fallbackUp to 1 hour
Response formatJSON
FallbackCaptions first, AI when needed
AuthenticationBearer token
Rate limit resetMidnight UTC
FAQ

API frequently asked questions

01

What format does the API return?

The API returns JSON with timestamped transcript segments, video metadata, caption source, word count, read time, cache status, and a public transcript permalink.

02

Is there a free tier for the API?

The API is available on the Team plan ($24.99/month) which includes 100 API requests per day. There is no free API tier, but you can use the web interface for free to test transcript quality before subscribing.

03

What authentication does the API use?

The API uses bearer token authentication. You'll receive an API key when you subscribe to the Team plan. Include it in the Authorization header of each request.

04

What are the rate limits?

The Team plan includes 100 API requests per day. Each request processes one YouTube video. Rate limits reset at midnight UTC. Contact us for custom enterprise limits.

05

Can I use the API for commercial purposes?

Yes. The Team plan license allows commercial use, including building products and internal tools on top of the TubeScript API. You may not resell raw API access to third parties.

06

How long does a request take?

Cached caption transcripts can return quickly. New videos depend on video length and caption availability; if no usable captions exist, TubeScript falls back to AI audio transcription.

07

Do long videos fail if they already have captions?

No. The strict long-video limit mainly applies to the no-caption AI fallback path. If a long public video has usable manual or auto captions, the API should use the caption track instead of processing the full audio through AI.

08

What does AI_FALLBACK_CAPACITY_EXHAUSTED mean?

It means the no-caption AI fallback path is temporarily out of Gemini capacity. Retry later with backoff. Captioned videos can still succeed because they do not need the AI fallback path.

Start building with the API

Get your API key today with the Team plan. 100 requests per day, JSON responses, cache-backed transcript reads, and AI summaries included.

View Pricing