Social Media Scraper

n8n HTTP Request workflow

YouTube Transcript Workflow in n8n

With Social Media Scraper and a standard n8n HTTP Request node, you can retrieve available caption text from a public YouTube video URL as structured JSON. Import the two-node starter workflow and authenticate with your API key to inspect data.text before adding downstream steps.

  1. Manual Trigger

    Start a manual run with the video URL configured in the HTTP Request node’s url query parameter.

  2. HTTP Request GET

    Call the youtube.transcript endpoint using an n8n Header Auth credential named x-api-key.

  3. Returned Transcript Text

    Read data.text and available language or source_url fields in the next n8n node.

Illustrative n8n flow from a manual trigger through a GET request to the returned transcript text field.

How to Set Up an n8n YouTube Transcript Workflow

Import the n8n YouTube transcript workflow JSON file to wire a Manual Trigger directly to an n8n HTTP Request node. Add your x-api-key credential, set the public video URL, and run the node to read data.text.

Import the n8n YouTube transcript workflow JSON

Download and import the JSON file into n8n to load an inactive Manual Trigger connected to a standard HTTP Request node.

Configure Header Auth on n8n HTTP Request

Create a Header Auth credential with header name x-api-key and your Social Media Scraper key, then select it inside the n8n HTTP Request node.

Set the video URL and run once

Enter a public YouTube link in the url query parameter, execute the node, and inspect data.text in the n8n output panel.

How Do You Import the Two-Node n8n JSON Template?

Import this JSON into n8n (inactive by default), select your x-api-key Header Auth credential on the HTTP Request node, replace the example URL, and run manually.

youtube-transcript-n8n.json
{
  "name": "YouTube Transcript n8n",
  "nodes": [
    {
      "parameters": {},
      "id": "manual",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://socialmediascraper.org/v1/youtube/transcript",
        "method": "GET",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.youtube.com/watch?v=bjVIDXPP7Uk"
            }
          ]
        },
        "options": {
          "timeout": 40000
        }
      },
      "id": "request",
      "name": "Fetch public data",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        300
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Fetch public data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false,
  "pinData": {}
}

Copy or download the request, Python script, or n8n workflow, then run it in your own environment with an active API key and balance.

How Do You Run the YouTube Transcript HTTP Request in n8n?

Configure the two-node starter (Manual Trigger -> HTTP Request) to query youtube.transcript for available captions before adding your own downstream nodes.

  1. Import the two-node transcript starter

    Import the workflow JSON into n8n to load a Manual Trigger connected directly to an HTTP Request node.

  2. Set Header Auth with header name x-api-key

    Choose Generic Credential Type and Header Auth on the HTTP Request node, setting the credential's Header Name to x-api-key so your Social Media Scraper API key stays out of the URL.

  3. Configure GET and the video URL query parameter

    Keep the request method set to GET on the sample youtube.transcript endpoint, enable Send Query Parameters, and pass a documented public YouTube url parameter.

  4. Execute manually and inspect Output JSON

    Run the workflow from the Manual Trigger and check the Output JSON panel for available caption text alongside optional language and source fields.

What Transcript Fields Can You Map into User-Added Nodes?

The two-node download ends at HTTP Request without spreadsheet or AI nodes. When you add an optional Edit Fields, Google Sheets, or LLM node, map these fields:

Transcript JSON FieldOptional Destination Field
data.textAvailable caption text in a user-added Edit Fields, notes, or prompt node
data.languageOptional caption language column in Google Sheets or metadata
data.source_urlOptional source YouTube video URL field for reference

How Do You Handle Transcript API Errors or Missing Captions?

400 Bad Request on video URL input

Ensure Send Query Parameters is enabled and confirm the url parameter contains a valid public YouTube video link accepted by youtube.transcript.

401 or 402 API key and balance responses

Confirm the Header Auth credential sets Header Name to x-api-key with an active API key and verify your Social Media Scraper account has available balance.

429 Rate Limit or videos without captions

Space out runs if you receive a 429 response, and handle empty or absent text fields when a video has no available captions (no ASR is performed).

This starter file ships with active set to false and includes two nodes only: Manual Trigger -> HTTP Request. Optional scheduling, Edit Fields, Google Sheets, or AI nodes must be added by you.

What Does the YouTube Transcript API Return in n8n?

Connecting the YouTube transcript API to n8n returns plain spoken text in data.text along with available language and source_url fields. The endpoint supplies clean text rather than SRT files, speaker labels, or built-in summaries.

Plain transcript string in data.text

Read data.text to get a continuous transcript string ready for downstream notes, databases, or prompt inputs.

Available language and source URL fields

Inspect returned language and source_url fields when present to record which caption track ran and link records to the video.

Plain text without timestamps

The response provides plain spoken text without speaker tags or guaranteed timecode segments, keeping downstream text mapping simple.

youtube.transcript JSON response schema
{
  "text": "string",
  "language": "string | null",
  "source_url": "string | null"
}
Example response field schema showing field names and data types returned by the endpoint, rather than a live query result.

Why Fetch Transcripts Before AI Video Summaries?

Separating transcript retrieval from AI video summaries lets you verify usable text exists before spending model tokens on an empty payload. You add and configure your own LLM or storage nodes after retrieval.

Verify text before AI video summaries

Confirm that data.text holds usable text before passing it to an LLM node for AI video summaries.

Tune prompts without repeat API calls

Pin the HTTP Request output in n8n while refining summary prompts or field mappings so you do not re-fetch the same video.

Keep service credentials isolated

Store your Social Media Scraper x-api-key in the HTTP Request credential while managing Notion, Sheets, or model keys in separate nodes.

Editorial illustration of a public video lookup feeding transcript text into a user-configured workflow.
Illustration of transcript retrieval and a downstream text workflow.

Who Uses This for Notes and Research Workflows?

Writers, analysts, and product researchers use this starter flow to build searchable video notes and repeatable research workflows. The template stops after fetching one video transcript so you can attach your own destinations.

Searchable video notes in Notion or Sheets

Add a Notion or Google Sheets node after retrieval to save searchable video notes alongside the video URL and retrieval date.

Research workflows with custom storage

Route transcript text into Postgres, Supabase, or a search index you maintain to support research workflows across talks and interviews.

Single-video start before playlist steps

Begin with one video URL; if you later add a playlist loop, use the documented playlist operation and budget each transcript call separately.

When Should You Stop or Branch Missing Transcripts?

Videos with disabled captions or access restrictions can return an HTTP error or an empty text field. Branch failures cleanly and confirm your API key and account balance before running requests.

Route empty data.text with an IF node

Check that data.text is non-empty on successful calls before continuing, and handle HTTP failures on a separate error branch.

Skip blind retries on uncaptioned videos

Inspect why a lookup returned no text instead of looping retries, since missing public captions will not appear on repeat calls.

Verify x-api-key and funded balance

Direct REST requests from n8n require a valid x-api-key header and funded account balance, whereas the browser extractor shares three anonymous lookups per network per UTC day.

How Should n8n Handle Transcript Requests?

Read the API documentation →

When Should You Test a Video URL in the Browser First?

Test a public YouTube video URL in the browser transcript extractor first to confirm available captions before wiring your n8n flow, or read the endpoint reference for optional parameters.