{"openapi":"3.1.0","info":{"title":"TranscriptYT YouTube Transcript API","version":"1.0.0","description":"YouTube Transcript API for developers. Get any public video's transcript as JSON, text, SRT, or VTT in 150+ languages, with AI transcription fallback. Full guide: https://transcript-yt.com/docs","contact":{"email":"aadit@techiseasy.co.in","url":"https://transcript-yt.com"},"termsOfService":"https://transcript-yt.com/terms"},"servers":[{"url":"https://transcript-yt.com"}],"externalDocs":{"url":"https://transcript-yt.com/docs"},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"paths":{"/v1/transcript":{"get":{"operationId":"getTranscript","summary":"Get a YouTube video transcript","description":"Returns the transcript of a public YouTube video. Costs 1 credit; videos with no captions are transcribed with AI speech-to-text at 1 credit per started minute of audio, for videos up to 9 hours long (paid plans and credit packs only; the Free plan reads captions only). Failed requests are not billed.","parameters":[{"name":"url","in":"query","required":true,"description":"A YouTube URL (watch, youtu.be, shorts, embed) or a bare 11-character video ID.","schema":{"type":"string","example":"5f3Pn-N6yLc"}},{"name":"language","in":"query","description":"BCP-47 code. Defaults to the original / English track. If the video has no track in this language, the original is machine-translated.","schema":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"}},{"name":"translate_to","in":"query","description":"BCP-47 target code (150+ languages). Machine-translates the selected track, keeping timings.","schema":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","text","srt","vtt","csv","md"],"default":"json"}},{"name":"includeSegments","in":"query","description":"Set false to return only full text (JSON format only).","schema":{"type":"boolean","default":true}},{"name":"timestamps","in":"query","description":"Prefix each line with [HH:MM:SS] in text and md output.","schema":{"type":"boolean","default":false}},{"name":"paragraphs","in":"query","description":"Merge segments into paragraph-length chunks.","schema":{"type":"boolean","default":false}},{"name":"chunkSize","in":"query","description":"Max characters per paragraph when paragraphs=true.","schema":{"type":"integer","minimum":50,"maximum":10000}},{"name":"captionType","in":"query","description":"Restrict to uploaded (manual) or auto-generated (auto) captions.","schema":{"type":"string","enum":["any","manual","auto"],"default":"any"}},{"name":"originalLanguage","in":"query","description":"Prefer captions in the spoken language over English when no language is given.","schema":{"type":"boolean","default":false}},{"name":"mode","in":"query","description":"auto: captions, AI fallback. captions: never AI. ai: transcribe audio even if captions exist.","schema":{"type":"string","enum":["auto","captions","ai"],"default":"auto"}},{"name":"startTime","in":"query","description":"Seconds; return only the transcript from here on.","schema":{"type":"number","minimum":0}},{"name":"endTime","in":"query","description":"Seconds; return only the transcript before this.","schema":{"type":"number","minimum":0}},{"name":"search","in":"query","description":"Return only lines containing this text (case-insensitive).","schema":{"type":"string"}}],"responses":{"200":{"description":"Transcript. JSON by default; text/plain, text/vtt, text/csv, or text/markdown for other formats.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix seconds when the window resets."},"X-Credits-Charged":{"schema":{"type":"integer"}},"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Cache":{"schema":{"type":"string","enum":["HIT","MISS"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcript"}},"text/plain":{"schema":{"type":"string"}},"text/vtt":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"INVALID_REQUEST or INVALID_VIDEO","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutOfCredits"}}}},"404":{"description":"VIDEO_UNAVAILABLE, NO_CAPTIONS, or LANGUAGE_NOT_AVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"UPSTREAM_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"BLOCKED (temporary, retry shortly) or SERVICE_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postTranscript","summary":"Get a YouTube video transcript (JSON body)","description":"Same as GET /v1/transcript with parameters in a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"language":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"},"translate_to":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"},"format":{"type":"string","enum":["json","text","srt","vtt","csv","md"],"default":"json"},"includeSegments":{"type":"boolean","default":true},"timestamps":{"type":"boolean","default":false},"paragraphs":{"type":"boolean","default":false},"chunkSize":{"type":"integer","minimum":50,"maximum":10000},"captionType":{"type":"string","enum":["any","manual","auto"],"default":"any"},"originalLanguage":{"type":"boolean","default":false},"mode":{"type":"string","enum":["auto","captions","ai"],"default":"auto"},"startTime":{"type":"number","minimum":0},"endTime":{"type":"number","minimum":0},"search":{"type":"string"}}}}}},"responses":{"200":{"description":"Transcript. JSON by default; text/plain, text/vtt, text/csv, or text/markdown for other formats.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix seconds when the window resets."},"X-Credits-Charged":{"schema":{"type":"integer"}},"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Cache":{"schema":{"type":"string","enum":["HIT","MISS"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcript"}},"text/plain":{"schema":{"type":"string"}},"text/vtt":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"INVALID_REQUEST or INVALID_VIDEO","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutOfCredits"}}}},"404":{"description":"VIDEO_UNAVAILABLE, NO_CAPTIONS, or LANGUAGE_NOT_AVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"UPSTREAM_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"BLOCKED (temporary, retry shortly) or SERVICE_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transcripts":{"post":{"operationId":"postTranscripts","summary":"Get transcripts for many videos in one call","description":"Takes `urls` plus any /v1/transcript option. Batch size depends on the plan: 10 (Free), 25 (Micro), 50 (Starter), 200 (Growth), 500 (Scale). Each video is billed and rate-limited as a single request; failures are reported per item.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"maxItems":500,"description":"At most the plan's batch size"},"playlist":{"type":"string","description":"Playlist URL/ID or channel URL/@handle, instead of urls"},"limit":{"type":"integer","minimum":1,"maximum":500,"description":"Defaults to the plan's batch size"}},"additionalProperties":true}}}},"responses":{"200":{"description":"Per-video results","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"succeeded":{"type":"integer"},"failed":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"ok":{"type":"boolean"},"cached":{"type":"boolean"},"status":{"type":"integer"},"transcript":{"$ref":"#/components/schemas/Transcript"},"body":{"type":"string"},"error":{"$ref":"#/components/schemas/Error"}}}}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/search":{"get":{"operationId":"searchYoutube","summary":"Search YouTube for videos","description":"Free on paid plans and credit packs; the Free plan gets 10 a day, then 1 credit each. Pass `channel` to search within one channel instead of all of YouTube.","parameters":[{"name":"q","in":"query","required":true,"description":"Search terms","schema":{"type":"string","maxLength":200}},{"name":"channel","in":"query","description":"Channel URL, ID, or @handle to search within","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Matching videos","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"channelId":{"type":["string","null"]},"videos":{"type":"array","items":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string"},"channelTitle":{"type":["string","null"]},"channelId":{"type":["string","null"]},"durationSeconds":{"type":["integer","null"]},"viewCount":{"type":["integer","null"]},"published":{"type":["string","null"]}}}},"truncated":{"type":"boolean"}}}}}},"400":{"description":"INVALID_REQUEST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/summary":{"get":{"operationId":"getSummary","summary":"Summarize a YouTube video","description":"Summary, key points, and timestamped study notes generated from the video's transcript, in the transcript's language. Costs 1 credit for the transcript (with the same AI-transcription fallback as /v1/transcript) plus the summary's AI cost: 1 credit for videos up to about 25 minutes and for cached summaries, about 1 more per further 45 minutes of speech. X-Credits-Charged shows the total. Failed requests are not billed.","parameters":[{"name":"url","in":"query","required":true,"description":"A YouTube URL (watch, youtu.be, shorts, embed) or a bare 11-character video ID.","schema":{"type":"string","example":"5f3Pn-N6yLc"}},{"name":"language","in":"query","description":"BCP-47 code selecting which caption track to summarize.","schema":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"}},{"name":"translate_to","in":"query","description":"BCP-47 target code. Summarizes a machine-translated transcript instead of the original.","schema":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"}}],"responses":{"200":{"description":"Summary","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix seconds when the window resets."},"X-Credits-Charged":{"schema":{"type":"integer"}},"X-Credits-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Summary"}}}},"400":{"description":"INVALID_REQUEST or INVALID_VIDEO","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutOfCredits"}}}},"404":{"description":"VIDEO_UNAVAILABLE, NO_CAPTIONS, or LANGUAGE_NOT_AVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"UPSTREAM_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"SERVICE_UNAVAILABLE: summaries disabled, or BLOCKED (temporary, retry shortly)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postSummary","summary":"Summarize a YouTube video (JSON body)","description":"Same as GET /v1/summary with parameters in a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"language":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"},"translate_to":{"type":"string","pattern":"^[A-Za-z0-9-]{2,16}$"}}}}}},"responses":{"200":{"description":"Summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Summary"}}}},"400":{"description":"INVALID_REQUEST or INVALID_VIDEO","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutOfCredits"}}}},"404":{"description":"VIDEO_UNAVAILABLE, NO_CAPTIONS, or LANGUAGE_NOT_AVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"UPSTREAM_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"SERVICE_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/playlist":{"get":{"operationId":"getPlaylist","summary":"List the videos in a playlist or channel","description":"Free on paid plans and credit packs; the Free plan gets 10 a day, then 1 credit each. Channels return their uploads, newest first.","parameters":[{"name":"url","in":"query","required":true,"description":"Playlist URL/ID or channel URL/@handle","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"Videos","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["playlist","channel"]},"id":{"type":"string"},"title":{"type":["string","null"]},"truncated":{"type":"boolean"},"videos":{"type":"array","items":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string"},"durationSeconds":{"type":["integer","null"]}}}}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"VIDEO_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/languages":{"get":{"operationId":"listLanguages","summary":"List a video's caption tracks","description":"Lists available caption tracks without downloading one. Free.","parameters":[{"name":"url","in":"query","required":true,"description":"A YouTube URL (watch, youtu.be, shorts, embed) or a bare 11-character video ID.","schema":{"type":"string","example":"5f3Pn-N6yLc"}}],"responses":{"200":{"description":"Caption tracks","content":{"application/json":{"schema":{"type":"object","properties":{"videoId":{"type":"string"},"languages":{"type":"array","items":{"type":"object","required":["languageCode","languageName","autoGenerated"],"properties":{"languageCode":{"type":"string","example":"en"},"languageName":{"type":"string","example":"English"},"autoGenerated":{"type":"boolean"}}}},"translationLanguages":{"type":"array","items":{"type":"object","properties":{"languageCode":{"type":"string"},"languageName":{"type":"string"}}}}}}}}},"400":{"description":"INVALID_VIDEO","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"VIDEO_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Get plan and remaining credits","description":"Free.","responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","example":"STARTER"},"credits_remaining":{"type":"integer"},"plan_credits":{"type":"object","properties":{"total":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"}}},"topup_credits":{"type":"object","properties":{"remaining":{"type":"integer"},"grants":{"type":"array","items":{"type":"object","properties":{"remaining":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"}}}}}},"period_resets_at":{"type":["string","null"],"format":"date-time"},"rate_limit_per_minute":{"type":"integer"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key, e.g. ts_live_..."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Segment":{"type":"object","required":["start","duration","end","timestamp","text"],"properties":{"start":{"type":"number","description":"Seconds"},"duration":{"type":"number","description":"Seconds"},"end":{"type":"number","description":"Seconds"},"timestamp":{"type":"string","description":"Readable start time, e.g. 1:23 or 1:02:03"},"text":{"type":"string"}}},"Transcript":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"channelId":{"type":["string","null"]},"durationSeconds":{"type":"number"},"language":{"type":"string","description":"Language delivered (the target when translated)."},"translated":{"type":"boolean"},"autoGenerated":{"type":"boolean"},"source":{"type":"string","enum":["captions","speech_to_text"]},"segments":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}},"text":{"type":"string"},"availableLanguages":{"type":"array","items":{"type":"object","required":["languageCode","languageName","autoGenerated"],"properties":{"languageCode":{"type":"string","example":"en"},"languageName":{"type":"string","example":"English"},"autoGenerated":{"type":"boolean"}}}}}},"Summary":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"language":{"type":"string"},"cached":{"type":"object","properties":{"transcript":{"type":"boolean"},"summary":{"type":"boolean"}}},"summary":{"type":"string","description":"2-4 sentence overview."},"keyPoints":{"type":"array","items":{"type":"string"}},"notes":{"type":"array","description":"Timestamped study notes, in video order.","items":{"type":"object","properties":{"start":{"type":"number","description":"Seconds"},"heading":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}}}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","INVALID_VIDEO","VIDEO_UNAVAILABLE","NO_CAPTIONS","LANGUAGE_NOT_AVAILABLE","BLOCKED","UPSTREAM_ERROR","UNAUTHORIZED","QUOTA_EXCEEDED","PLAN_REQUIRED","RATE_LIMITED","SERVICE_UNAVAILABLE","INTERNAL"]},"message":{"type":"string"}}}}},"OutOfCredits":{"type":"object","properties":{"error":{"type":"string","example":"Out of credits"},"plan":{"type":"string"},"credits_remaining":{"type":"integer"},"upgrade_url":{"type":"string"},"topup_url":{"type":"string"}}}}}}