Tutorial

How to Extract YouTube Transcripts in n8n

Wire Scavio's YouTube transcript endpoint into n8n so every YouTube URL in your workflow gets full transcript text.

n8n is the dominant self-hosted automation platform in 2026, and YouTube-transcript workflows are one of the most common community requests. This tutorial wires Scavio's transcript endpoint into an n8n HTTP Request node and adds transcripts to any workflow that touches a YouTube URL.

Prerequisites

  • n8n self-hosted or cloud
  • A Scavio API key
  • A YouTube URL source (RSS, manual, Airtable)

Walkthrough

Step 1: Add a Scavio credential in n8n

Settings > Credentials > New > Header Auth. Name=x-api-key, value=your key.

Text
Name: Scavio API Key
Header: x-api-key
Value: sk_live_...

Step 2: Add an HTTP Request node

POST to the Scavio transcript endpoint.

Text
URL: https://api.scavio.dev/api/v1/search
Method: POST
Auth: Scavio API Key (credential)
Body: { "platform": "youtube_transcript", "query": "{{ $json.video_url }}" }

Step 3: Parse the transcript

n8n's Set node extracts the transcript array.

JavaScript
// Set node expression
{{ $json.transcript.map(seg => seg.text).join(' ') }}

Step 4: Chain to an LLM node

Feed transcript to OpenAI or Anthropic node for summary.

Text
Prompt: Summarize this YouTube transcript in 5 bullets:
{{ $json.transcript_text }}

Step 5: Write back to destination

Airtable, Notion, or Slack.

Text
Airtable node > Update row > Fields: summary = {{ $json.summary }}

Python Example

Python
import os, requests

API_KEY = os.environ['SCAVIO_API_KEY']

def transcript(video_url):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'youtube_transcript', 'query': video_url})
    segs = r.json().get('transcript', [])
    return ' '.join(s['text'] for s in segs)

print(transcript('https://youtube.com/watch?v=dQw4w9WgXcQ')[:500])

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function transcript(videoUrl) {
  const r = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ platform: 'youtube_transcript', query: videoUrl })
  });
  const { transcript } = await r.json();
  return transcript.map(s => s.text).join(' ');
}

Expected Output

JSON
Full transcript text in n8n $json. Typical video: 30-second extraction. Cost per transcript: ~5 credits.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

n8n self-hosted or cloud. A Scavio API key. A YouTube URL source (RSS, manual, Airtable). A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Wire Scavio's YouTube transcript endpoint into n8n so every YouTube URL in your workflow gets full transcript text.