Skip to content

How does the TubeTranscript REST API v1 work?

By TubeTranscript · Content updated

View as Markdown

The TubeTranscript REST API v1 exposes one synchronous endpoint, POST /api/v1/extract, that returns a YouTube video's timestamped transcript and optional AI features in a single JSON payload. It requires a Pro plan API key sent as a Bearer Token, and every response uses one envelope: success, data, error.

For a shorter introduction with curl, Python and JavaScript samples, read the YouTube transcript API overview.

Is there a Python SDK?

Yes: pip install tubetranscript (Python 3.9+, MIT). It wraps this endpoint with typed errors, waiting while audio transcription runs, and safe retries. It is also a drop-in for the youtube-transcript-api library: change from youtube_transcript_api import YouTubeTranscriptApi to from tubetranscript import YouTubeTranscriptApi, and fetch() falls back to this API only when YouTube blocks your server. Set your key in TUBETRANSCRIPT_API_KEY. Package page: pypi.org/project/tubetranscript.

from tubetranscript import TubeTranscript

with TubeTranscript() as client:  # reads TUBETRANSCRIPT_API_KEY
    result = client.transcript("https://www.youtube.com/watch?v=jNQXAC9IVRw", features=["hooks"])
print(result.source, result.text)

How do I call the extract endpoint?

Send POST https://tubetranscript.io/api/v1/extract with header Content-Type: application/json and a JSON body containing a YouTube url. The optional features array requests AI outputs. GET, PUT, PATCH and DELETE return 405 METHOD_NOT_ALLOWED. Set your HTTP client timeout to 300 seconds, because audio transcription can take minutes.

curl -X POST https://tubetranscript.io/api/v1/extract \
  -H "Authorization: Bearer $TUBETRANSCRIPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw", "features": ["hooks", "mindmap", "action_items"]}'
Property Value
Method POST
URL https://tubetranscript.io/api/v1/extract
Headers Authorization: Bearer <API_KEY>, Content-Type: application/json
Client timeout 300 s
Other methods GET, PUT, PATCH, DELETE → 405 METHOD_NOT_ALLOWED
Field Type Required Default Constraints
url string yes none Any YouTube video URL (watch, youtu.be, shorts, embed, live), or a TikTok, Instagram Reel/post or Facebook video/Reel link. Max 2,048 characters.
features string[] no [] (transcript only) Any of hooks, mindmap, action_items, each at most once.

How do I authenticate API requests?

Authenticate every request with the header Authorization: Bearer <API_KEY>. Only API keys belonging to a team on the Pro plan are accepted. A missing or unknown key returns 401 with MISSING_API_KEY or INVALID_API_KEY; a key whose team is not Pro returns 403 PLAN_UPGRADE_REQUIRED. Key handling rules are in Security & Rate Limits.

Authorization: Bearer <API_KEY>
Condition HTTP error.code Extra header
No Authorization header 401 MISSING_API_KEY WWW-Authenticate: Bearer
Malformed, unknown or revoked key 401 INVALID_API_KEY WWW-Authenticate: Bearer
Key's team not on Pro 403 PLAN_UPGRADE_REQUIRED none

What JSON does the endpoint return?

Every response, success or error, returns the same envelope: success (boolean), data (result object or null), and error (null or an object with code, message, optional details). On success, data holds video_id, source, language, the transcript as plain text plus timed chunks, and requested features. Responses carry Cache-Control: no-store.

{
  "success": true,
  "data": {
    "video_id": "jNQXAC9IVRw",
    "job_id": null,
    "source": "captions",
    "language": "en",
    "video_title": null,
    "channel_name": null,
    "transcript": {
      "text": "…",
      "chunks": [{ "start": 0, "duration": 4.2, "text": "…" }]
    },
    "features": {
      "hooks": [{ "start_time": "…", "end_time": "…", "hook_title": "…", "summary": "…" }],
      "mindmap": "mindmap\n  Root\n    Branch",
      "action_items": [{ "assignee": null, "task": "…", "deadline_mentioned": null }]
    }
  },
  "error": null
}
{ "success": false, "data": null, "error": { "code": "INVALID_INPUT", "message": "…" } }
Envelope field Type On success On error
success boolean true false
data object | null Result object null, except for 202 and 502
error object | null null { code, message, details? }
data field Type Notes
video_id string 11-character YouTube video ID parsed from url; for a TikTok, Instagram or Facebook link, an internal key for that link.
platform string youtube, tiktok, instagram or facebook.
job_id string | null Set when the transcript came from an extraction job.
source string captions, audio, media or existing_job.
language string | null Caption language code; set when source is captions.
video_title string | null Set when the transcript came from a job.
channel_name string | null Set when the transcript came from a job.
transcript.text string All chunk texts joined by blank lines (non-timestamped).
transcript.chunks array { start, duration, text }, start and duration in seconds.
features object Only the features requested in the body.

What does the source field mean?

The source field reports where the transcript came from. captions means the video's YouTube captions were fetched synchronously (Tier 1). audio means the audio was transcribed with AI transcription (Tier 2: enhanced on Pro and Enterprise when available, otherwise Whisper). media means a TikTok, Instagram or Facebook link was transcribed (one AI transcription from your allowance). existing_job means your team already had a completed or running job for the same video, so no new extraction ran.

source value Engine Typical latency job_id
existing_job Reused team job Instant, or waits for the running job Set
captions YouTube captions (Tier 1) Seconds Set when stored, else null
audio AI transcription (Tier 2) Minutes Set
media TikTok, Instagram or Facebook link transcription Seconds to minutes Set

Each chunk in transcript.chunks groups caption lines or speech into passages of roughly 15 to 30 seconds, cut at sentence ends where possible, so a chunk is longer than a single on-screen caption line.


How does TubeTranscript choose between captions and Whisper?

TubeTranscript picks the cheapest available transcript source automatically, in a fixed order. It first reuses your team's existing job for the video, then fetches YouTube captions (Tier 1, seconds), and falls back to AI audio transcription (Tier 2, minutes; enhanced on Pro and Enterprise when available, otherwise Whisper) only when the video has no captions. Callers never select the engine; the same request works for every video.

  1. Existing job: a completed or still-running job of your team for the same video (the call waits for a running one).
  2. Tier 1, captions: returned in seconds when the video has captions.
  3. Tier 2, AI transcription: audio transcription when no captions exist (enhanced on Pro and Enterprise when available, otherwise Whisper); can take minutes.

What happens when Whisper transcription takes too long?

A Tier 2 call waits up to about 280 seconds without features, or about 210 seconds with features, staying inside the 300-second timeout of Make and n8n. If Whisper is still running, the API returns 202 EXTRACTION_IN_PROGRESS with data.job_id and Retry-After: 60. Send the identical request again; it resumes the same job.

Request Maximum wait for Whisper Response if unfinished
Without features ~280 s 202 EXTRACTION_IN_PROGRESS, Retry-After: 60
With features ~210 s 202 EXTRACTION_IN_PROGRESS, Retry-After: 60

What are the API rate limits?

Pro allows 100 requests per 24 hours per team, shared by all its API keys and the web app, of which at most 30 may be transcribed from audio (Whisper) when a video has no captions. Enterprise allows 1,000 requests per 24 hours per team, of which at most 100 may use Whisper. Every call to /api/v1/extract counts once, regardless of how many features it requests. Each requested feature also spends one AI run from your team's shared allowance (Pro 15 a day, up to 10 an hour; Enterprise 60 a day, up to 30 an hour), checked for all features before any runs and charged only for features that return a result. Without enough runs left, no feature runs and the call returns the transcript in data with 429 QUOTA_EXCEEDED (error.details.upgrade_url links to a bigger plan when there is one). POST /api/jobs/{id}/export-actions spends one AI run per call, charged only when it returns action items. Remaining quota is reported in the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset response headers. Exceeding it returns 429 RATE_LIMIT_EXCEEDED with a Retry-After header. Details: Security & Rate Limits.

Tier Request Limit REST API v1 MCP Support Transcript Storage
Guest (no account) 5 transcripts / 24 h per client network (max 1 Whisper) No No Not published, no automatic expiry
Free account 15 transcripts / 24 h per team (max 3 Whisper) No No Not published, no automatic expiry
Pro 100 requests / 24 h per team (max 30 Whisper per team) Yes Yes (/api/mcp, /api/mcp/tools) Private to the team, no automatic expiry
Enterprise 1,000 requests / 24 h per team (max 100 Whisper per team) Yes Yes (/api/mcp, /api/mcp/tools) Private to the team, no automatic expiry
Response header Meaning
X-RateLimit-Limit Requests allowed per 24-hour sliding window.
X-RateLimit-Remaining Requests left in the current window.
X-RateLimit-Reset When the window resets.
Retry-After Seconds to wait; sent with 429.

Which error codes can the API return?

Errors use the standard envelope with success: false and a machine-readable error.code. Branch on error.code, not on the message text. Only 202 EXTRACTION_IN_PROGRESS, 502 FEATURES_FAILED and the AI-run errors (QUOTA_EXCEEDED, BUDGET_REACHED, BUSY, AI_DISABLED, QUOTA_UNAVAILABLE) include a non-null data: the first carries the job ID to retry, the others carry the transcript (and, for FEATURES_FAILED, every feature that succeeded).

HTTP error.code Meaning Action Retry
202 EXTRACTION_IN_PROGRESS Whisper still running. Resend the same request after Retry-After seconds. Yes
400 INVALID_JSON Body is not valid JSON. Fix the request body. No
400 INVALID_INPUT url or features is invalid. Fix the field named in message. No
401 MISSING_API_KEY No Authorization header. Send Authorization: Bearer <API_KEY>. No
401 INVALID_API_KEY Malformed, unknown or revoked key. Use a valid Pro key. No
403 PLAN_UPGRADE_REQUIRED Key's team is not on Pro. Upgrade the team to Pro. No
404 TRANSCRIPT_NOT_FOUND Video unavailable. Check the URL. No
405 METHOD_NOT_ALLOWED Method other than POST. Use POST. No
409 BUSY Another AI run of your team is working; data holds the transcript. Retry when it has finished. Yes
422 EXTRACTION_FAILED Video could not be transcribed (private, removed, no speech). Try another video. No
429 RATE_LIMIT_EXCEEDED 24-hour quota used up. Wait Retry-After seconds. Yes
429 QUOTA_EXCEEDED Not enough AI runs left for the features; data holds the transcript, no feature ran. Retry at the time in message, or request fewer. Yes
429 BUDGET_REACHED AI capacity for today is reached; data holds the transcript. Retry tomorrow. Yes
500 INTERNAL_ERROR Unexpected server error. Retry later. Yes
500 WORKER_ERROR Extraction worker error. Retry later. Yes
502 FEATURES_FAILED Some AI features failed; data holds the transcript and successful features, error.details lists failures. Retry for the failed features. Yes
503 WORKER_UNAVAILABLE Extraction service down or in maintenance. Retry later. Yes
503 RATE_LIMIT_UNAVAILABLE Quota store unreachable. Wait Retry-After seconds (60). Yes
503 AI_DISABLED, QUOTA_UNAVAILABLE AI features paused or AI-run counters unreachable; data holds the transcript. Retry later. Yes

Which AI features can I request?

The features array accepts three values: hooks (timestamped attention hooks with title and summary), mindmap (a Mermaid mindmap string), and action_items (tasks with assignee and mentioned deadline). Transcripts above 120,000 characters, roughly 2 hours of speech, are processed in segments and merged. An empty array returns the transcript only.

features value Output in data.features Item fields
hooks Array of hooks start_time, end_time, hook_title, summary
mindmap Mermaid mindmap string none
action_items Array of tasks assignee, task, deadline_mentioned

How do I call the creator tools?

POST /api/v1/creator/{tool} runs one creator tool on a video and answers in the same envelope as /api/v1/extract. It needs a Pro API key. Send exactly one of job_id (a completed job of your team, from /api/v1/extract or the MCP get_transcript) or url (a YouTube link; captions only, nothing is stored), plus optional options.

curl -X POST https://tubetranscript.io/api/v1/creator/generate_chapters \
  -H "Authorization: Bearer $TUBETRANSCRIPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "options": {"count": 8}}'
{tool} options data (besides tool, video_id)
generate_chapters style (short, descriptive, emoji), count (3-40) chapters (start, clock, title), text
generate_description tone (neutral, friendly, professional, energetic), cta, chapters description, tags, hashtags, chars
find_moments length (any, short, medium, long) moments (start, end, duration, hook, reason, quote, standalone, srt: the clip's subtitles timed from 0:00)
analyze_hook topic (for rewritten hooks) opening, hookType, parts, pace, rewrites
translate_subtitles target_languages (1-5 ISO codes), format (srt, vtt, txt), glossary outputs (language, name, text, untranslated, warnings), failed
summarize_video none text (Markdown: summary, key points linked to the second, quotes)

Times are taken from the transcript lines by code; the model never writes them. Every item is checked against the transcript, and items that fail are left out.

Limits. Each call counts once against the daily request limit and spends AI runs from one allowance shared by your team on the web, the API and MCP: Pro 15 AI runs a day, up to 10 an hour; Enterprise 60 AI runs a day, up to 30 an hour. Each new result is one run; translate_subtitles counts one run per language per 60,000 characters of transcript. A run is charged only when it returns a result: UNRELIABLE (too few results passed the checks) and provider errors are free, though model calls are capped at about 3 per run: Pro 30 an hour (45 a day), Enterprise 90 an hour (180 a day). A result already made for the same public video and transcript is returned free. One run per team at a time; a second one gets BUSY. A call with url looks the video up first, and link lookups are limited to 20 per hour (Pro) and 30 per hour (Enterprise) per team (QUOTA_EXCEEDED); calls with job_id do not count against it.

HTTP error.code
400 INVALID_JSON, INVALID_INPUT
404 UNKNOWN_TOOL, JOB_NOT_FOUND, TRANSCRIPT_NOT_FOUND
409 JOB_NOT_READY, BUSY (another run of your team is working)
413 VIDEO_TOO_LONG (over 120 minutes), TRANSCRIPT_TOO_LONG, FILE_TOO_LARGE
422 UNRELIABLE
429 RATE_LIMIT_EXCEEDED, QUOTA_EXCEEDED, BUDGET_REACHED
502 AI_* provider or validation errors
503 AI_DISABLED, QUOTA_UNAVAILABLE, WORKER_UNAVAILABLE

TikTok, Instagram and Facebook links

url also accepts a public TikTok video (tiktok.com/@user/video/…, vm.tiktok.com/…), an Instagram Reel or video post (instagram.com/reel/…, instagram.com/p/…) or a Facebook video or Reel (facebook.com/reel/…, facebook.com/watch/?v=…, facebook.com/<page>/videos/…). Short fb.watch links are not accepted.

  • The speech is transcribed, and each new link uses one AI transcription from your team's daily allowance. Over that allowance the response is 429 WHISPER_LIMIT. These links also have their own daily count (Pro 3, Enterprise 12 per team); over it the response is 429 MEDIA_LIMIT.
  • The response adds platform (youtube, tiktok, instagram or facebook). For these links video_id is an internal key, not a platform id.
  • A transcription still running at the time limit answers 202 EXTRACTION_IN_PROGRESS with the job_id. Send the same request again; it resumes that job and is not charged twice.
  • These transcripts are private to your team, like every Pro transcript.