Get YouTube transcripts in n8n
Use the n8n HTTP Request node to call the YouTube Transcribes API. This page shows the request, the response, the credit cost, the rate limit and the errors.
What this recipe does
The recipe sends one POST request to /api/v2/transcripts/ with your API key. The API returns the transcript as JSON. Later n8n nodes can then use the transcript.
Caption-based requests return the transcript in the same response. AI transcription works in a different way. The API answers with status 202 and a job ID. Your workflow then polls a second endpoint until the job ends.
Before you start
- Create an account and verify your email address. Sign up if you do not have an account yet. An account with an unverified email address cannot transcribe.
- Make sure your account has credits. See the credit cost section below.
- Create an API key. Sign in, open your profile and select Manage API keys. Enter a key name and select Create key. The page opens at
/profile/edit#api-keys. - Copy the key at once. The page shows the new key one time only.
The request
Send a POST request to https://youtubetranscribes.com/api/v2/transcripts/ with a JSON body. Send your API key in one of two headers. Both headers work in the same way.
Authorization: Api-Key YOUR_API_KEYX-API-Key: YOUR_API_KEY
Replace YOUR_API_KEY with your key. The n8n steps below keep the key in an n8n credential, so it never appears in the workflow.
Body fields
| Field | Required | Default | Description |
|---|---|---|---|
url | Yes | None | A YouTube URL or video ID. Maximum 500 characters. |
language | No | auto | A language code such as en, or auto. Maximum 10 characters. |
caption_type | No | auto | One of auto, subtitles, automatic_captions or ai_transcribe. |
download_format | No | json | One of json, srt, vtt or txt. This sets the format of transcripts in the response. |
The auto caption type uses manual subtitles first, then automatic captions. It never switches to AI transcription on its own. If the video has no captions, the API returns a 422 error so that you can choose AI transcription.
curl -X POST https://youtubetranscribes.com/api/v2/transcripts/ \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"caption_type": "auto",
"language": "en",
"download_format": "json"
}'The response
Check the HTTP status code first. Status 200 means the transcript is in the response body. Status 202 means an AI job is queued.
Status 200: transcript ready
used_credits shows the credits this request charged. available_credits shows your balance after the request. low_credit is null unless your balance is low. The example below is shortened to two segments.
{
"job_id": "01960000-0000-0000-0000-000000000000",
"created_at": "2026-11-24T21:07:49.440925Z",
"status": "completed",
"video_id": "jNQXAC9IVRw",
"type": "video",
"title": "Me at the zoo",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"language": "en",
"caption_type": "subtitles",
"used_credits": 1,
"available_credits": 9,
"download_format": "json",
"transcripts": [
{ "start": 1.2, "end": 5.318, "text": "All right, so here we are, in front of the\nelephants" },
{ "start": 5.318, "end": 7.974, "text": "the cool thing about these guys is that they\nhave really..." }
],
"low_credit": null
}Status 202: AI job queued
A new ai_transcribe request returns status 202 and charges nothing yet. poll_url is a path on the same host. The response also has a Location header with the full URL.
{
"job_id": "01960000-0000-0000-0000-000000000000",
"status": "pending",
"created_at": "2026-11-24T21:07:59.415468Z",
"video_id": "jNQXAC9IVRw",
"title": "Me at the zoo",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"language": "en",
"caption_type": "ai_transcribe",
"estimated_credits": 1,
"video_duration_seconds": 19,
"used_credits": 0,
"available_credits": 9,
"poll_url": "/api/v2/jobs/01960000-0000-0000-0000-000000000000/"
}Send a GET request to https://youtubetranscribes.com plus poll_url, with the same API key. The status field is pending, processing, downloading, converting or transcribing while the job runs. It ends as completed or failed. A completed job has a segments array. A failed job has an error string.
Poll slowly. Each successful poll with your API key counts toward the per-key rate limit in the next section. The API reference suggests a poll every 1 to 2 seconds. In n8n, poll every 5 seconds or slower to save your budget.
Credit cost and caching
- A transcript from captions costs 1 credit.
- AI transcription costs
max(1, ceil(duration_seconds / 60))credits. A video of about 10 minutes costs 10 credits. - A request is free only when the same account, which owns the API key, already completed that exact video, language and caption type.
- A transcript that another user cached still costs the full price for you.
- The API charges an AI job when the job completes. A failed AI job is not charged.
- The API checks your balance before it does the work. With too few credits, it returns the 402 error and does not charge you.
Rate limits
A new API key starts with a limit of 30 successful requests per minute. The limit window is one clock minute. Requests that return an error do not count.
When you go over the limit, the API returns status 429 and a Retry-After header. The header said 60 seconds in our checks.
{ "detail": "Request was throttled. Expected available in 60 seconds." }The n8n Retry On Fail setting allows 5 tries at most, with at most 5000 ms between tries. That is less than the 60 seconds that a 429 can last. So Retry On Fail alone does not clear a 429.
To process a list of videos, use a Loop Over Items node and a Wait node. At 30 requests per minute, wait at least 2 seconds for each item. Leave room for polling requests.
Errors
Most errors use this body: {"error": {"code": "...", "message": "...", "details": {...}}}. The 401 and 429 errors use {"detail": "..."} instead.
| Status | Code | Cause | What to do |
|---|---|---|---|
| 400 | VALIDATION_ERROR | A body field is missing or not valid. details lists each field. | Fix the body and send the request again. |
| 401 | None (detail only) | The key is wrong, not active or missing. The body says Invalid API key or Authentication credentials were not provided. | Check the header name and the key in your n8n credential. |
| 402 | INSUFFICIENT_CREDITS | Your balance is too low. details has available_credits and required_credits. An AI request also has reserved_credits. | Buy credits, then send the request again. |
| 422 | CAPTION_LANGUAGE_NOT_AVAILABLE | The video has no captions in that language. details can have available_languages. With auto, it also has suggest_ai_transcribe, estimated_credits and video_duration_seconds. | Pick a language from available_languages, or send caption_type ai_transcribe. |
| 429 | None (detail only), or AI_JOB_LIMIT_EXCEEDED | You went over the per-key limit. Or you have too many AI jobs in progress. | Wait, then send the request again. See the rate limits section. |
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits to extract transcript",
"details": { "available_credits": 0, "required_credits": 1 }
}
}{ "detail": "Invalid API key" }The API can return other errors, for example 404 for a video that does not exist. The API reference lists every response.
Build the workflow in n8n
- Open Credentials in n8n and create a credential of type Header Auth.
- Set Name to
Authorization. Set Value toApi-Key YOUR_API_KEY, with your own key. Save the credential. - Add a Manual Trigger node to test the workflow.
- Add an HTTP Request node and connect it to the trigger.
- Set Method to
POST. Set URL tohttps://youtubetranscribes.com/api/v2/transcripts/. - Set Authentication to Generic Credential Type. Set Generic Auth Type to Header Auth. Select your credential.
- Turn on Send Body. Set Body Content Type to JSON and Specify Body to Using JSON.
- Paste the JSON body from the curl example above. Replace the video URL with your own.
- Select Execute step. The output has the fields from the response section. Later nodes can read them with an expression such as
{{ $json.transcripts }}.
By default n8n stops the workflow when the API returns an error status. To handle the error body in your workflow, change the On Error setting in the node Settings tab.
Import the workflow JSON
Copy the JSON below. In n8n, paste it onto the workflow canvas, or save it as a file and use Import from File in the workflow menu. The JSON has no API key. After the import, open the HTTP Request node and select your Header Auth credential. We did not run this JSON in n8n. If a field differs, set the values by hand using the steps above.
{
"name": "YouTube transcript with YouTube Transcribes",
"nodes": [
{
"parameters": {},
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://youtubetranscribes.com/api/v2/transcripts/",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"caption_type\": \"auto\",\n \"language\": \"en\",\n \"download_format\": \"json\"\n}",
"options": {}
},
"name": "Get transcript",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
260,
0
]
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "Get transcript",
"type": "main",
"index": 0
}
]
]
}
}
}Scope of this page
This page documents n8n only. The workflow JSON follows the n8n workflow format, but we did not run it in n8n. If an n8n version shows a different field name, set the same values in the node by hand, using the steps above.