DEV Community

pantdeepakk5
pantdeepakk5

Posted on Originally published at getyoutubetranscript.com

How to get YouTube transcripts in n8n (and use them in an AI Agent)

If you want an n8n workflow to read what's actually said in a YouTube video (not just the title and description), you need a transcript. Here are two ways to get one: a built-in HTTP Request node hitting a REST API, or a community node that also plugs straight into an AI Agent as a tool.

Both need a free API key from GetYouTubeTranscript (100 credits, no card required). No Google API key or YouTube Data API quota involved.

Approach 1: HTTP Request node

If you don't want to install anything, n8n's built-in HTTP Request node can call the API directly, since it's a plain REST endpoint.

Get a key from the dashboard, then set it as an environment variable available to your n8n instance (don't hardcode it into the workflow JSON):

GETYOUTUBETRANSCRIPT_API_KEY=sk_live_...
Enter fullscreen mode Exit fullscreen mode

Configure the HTTP Request node like this:

GET https://getyoutubetranscript.com/api/v1/transcript?v={{ $json.videoId }}
Authorization: Bearer {{ $env.GETYOUTUBETRANSCRIPT_API_KEY }}
Enter fullscreen mode Exit fullscreen mode

Feed a video ID into the node's input and it returns the transcript, title, author, and thumbnail as JSON at $json.data.transcript.

There's a ready-to-import workflow for this on the GetYouTubeTranscript n8n guide if you'd rather not wire the node up by hand.

Processing more than a handful of videos

Feeding a list of video IDs straight into the HTTP Request node fires them all as fast as n8n can, which is fine for 5 videos and risky for 500 against a 60 req/min free-tier limit. Two built-in ways to pace it:

  • HTTP Request node → Add Option → Batching. Set Items per Batch and Batch Interval (ms). A batch size of 5 with a 5,000ms interval keeps you comfortably under a 60 req/min budget.
  • Split In Batches + Wait node. Strictly sequential, no parallel burst at all. Safer if you're close to the limit or a downstream API (an LLM summarizer, say) has its own throughput ceiling.

Also enable Continue On Fail on the HTTP Request node when processing a batch, since some videos will fail (private, no captions, a transient 429). Branch on the response with an IF node downstream instead of letting one bad video ID kill the whole run.

Approach 2: the community node

For a friendlier node UI (dropdowns instead of hand-built URLs) and AI Agent tool support, install n8n-nodes-getyoutubetranscript:

  1. Settings → Community Nodes
  2. Install a community node
  3. Enter n8n-nodes-getyoutubetranscript and confirm

(Self-hosted only — community nodes aren't available on n8n Cloud. If you're on self-hosted via npm, npm install n8n-nodes-getyoutubetranscript and restart the instance instead.)

The node adds one credential type (a single API key field, tested against the free /resolve endpoint on save, so testing it never spends a credit) and eight operations:

Operation Endpoint Cost
Get Transcript GET /transcript 1 credit
Search YouTube GET /search 1 credit
Resolve Channel GET /resolve Free
Get Channel Latest Videos GET /channel/latest Free
Search Channel Videos GET /channel/search 1 credit
List Channel Videos GET /channel/videos 1 credit
List Playlist Videos GET /playlist 1 credit
Get Credits GET /credits Free

Failed and rate-limited requests are never charged.

Using it as an AI Agent tool

Because it's a proper n8n node (not just an HTTP call), you can attach it directly to an AI Agent node as a tool. The agent decides when to call it, fills in the video URL itself, and reasons over whatever comes back:

AI Agent calling the GetYouTubeTranscript tool

That's useful for anything conversational: "summarize this video," "what does this channel's latest upload say about X," without you having to pre-wire which operation runs when.

Example workflow

The repo ships a ready-to-import workflow, summarize-youtube-video-with-ai.json: a Manual Trigger sets the video URL, the GetYouTubeTranscript node fetches the transcript, an HTTP Request node sends it to OpenAI's Chat Completions API to summarize, and a Set node formats the output. Import it via n8n's Import from File, then attach your GetYouTubeTranscript and OpenAI credentials.

Which one to use

HTTP Request node if you're on n8n Cloud (community nodes aren't supported there) or just need a quick one-off pull. The community node if you're self-hosted and want the dropdown UI, the extra operations (search, channels, playlists), or AI Agent tool support without hand-rolling the HTTP calls yourself.

Full API reference, error codes, and rate limits: getyoutubetranscript.com/docs.


Disclosure: I build GetYouTubeTranscript.

Top comments (0)