Skip to content

YouTube Transcript API

The transcript (captions) of a video in one language, as `rows` of `start` and `duration` (seconds) and `text`, plus every caption language the video has (`languages`, each with code, name and whether it is auto-generated). Human-made captions are preferred over auto-generated ones in the same language. A video without captions returns empty `languages` and `rows`.

GEThttps://api.maviapi.com/v1/sites/youtube/transcript5 credits per call

Parameters

NameRequiredExampleDescription
video_idstring in queryOptionaldQw4w9WgXcQ11-character video id, or any youtube.com / youtu.be video URL
langstring in queryOptionalNonecaption language code such as en, de or pt-BR (a bare code like pt also matches pt-BR); one of the video's `languages`. Omit for the video's own default caption language.

Response fields

video_idstringe.g."dQw4w9WgXcQ"
titlestringe.g."Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)"
languagestringe.g."en"
language_namestringe.g."English"
is_auto_generatedbooleane.g.false
languagesobject[]3 fields
codestringe.g."en"
namestringe.g."English"
is_auto_generatedbooleane.g.false
rowsobject[]3 fields
startnumbere.g.1.36
durationnumbere.g.1.68
textstringe.g."[♪♪♪]"

Example request

Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.

cURL
curl 'https://api.maviapi.com/v1/sites/youtube/transcript' \
  -H "Authorization: Bearer $MAVI_KEY"

YouTube Transcript API questions

What you get, what it costs and how to call it.

What does the YouTube Transcript API return?

The transcript (captions) of a video in one language, as `rows` of `start` and `duration` (seconds) and `text`, plus every caption language the video has (`languages`, each with code, name and whether it is auto-generated). Human-made captions are preferred over auto-generated ones in the same language. A video without captions returns empty `languages` and `rows`. The response has video_id, title, language, language_name, is_auto_generated, languages and rows.

Which parameters does the YouTube Transcript API take?

Every parameter of GET /transcript is optional. You can pass video_id and lang.

How much does one YouTube Transcript API call cost?

One successful call costs 5 credits. A failed call costs nothing. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.

How do I call the YouTube Transcript API?

Send an HTTPS GET request to https://api.maviapi.com/v1/sites/youtube/transcript with your API key in the Authorization header, as in the example request on this page. Create a key on your API keys page, or try the endpoint first in the console with the free test key.

Is the YouTube Transcript API official?

No. It is an independent, hosted API from maviapi for the public data on youtube.com, and it is not made, endorsed or supported by YouTube. Its parameters and response fields are documented on this page.