Skip to content

Replacing a pile of n8n scraper nodes with one HTTP Request node

By Hayden Barnett · · 5 min read

Most n8n content workflows that touch social platforms end up looking the same. One community node for YouTube transcripts, a different one for TikTok, an HTTP node pointed at some scraper’s run-and-poll API for Instagram, a fourth thing for the Ad Library, each with its own credential, its own output shape and its own way of failing. Then one of them changes its response format on a Tuesday, the IF node downstream evaluates undefined as false, and the workflow keeps running green while writing empty rows to your sheet for a week.

The fix that has held up for me is to collapse all of it into one HTTP Request node that talks to one API with one header, and to make the request itself data. This post shows the exact node settings, a pasteable workflow, and the response shapes you’ll map downstream.

One credential

In n8n, create a Header Auth credential:

  • Name: x-api-key
  • Value: your Fetchproof key (it starts with fp_)

That is the only credential the workflow needs. Every endpoint below uses the same header.

The node, configured by hand

For a single platform, the HTTP Request node is plain:

  • Method: GET
  • URL: https://api.fetchproof.com followed by the path, here /v1/youtube/video/transcript
  • Authentication: Generic Credential Type, then Header Auth, then the credential above
  • Send Query Parameters: on
    • url = the video URL (map it from the previous node)
    • language = en (optional)
  • Response format: JSON (the default)

The equivalent curl, if you want to check a URL before wiring it in:

curl -s 'https://api.fetchproof.com/v1/youtube/video/transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVIDEO_ID' \
  --header "x-api-key: $FETCHPROOF_API_KEY"

The node, reused for every platform

The useful part is that every endpoint is a GET to https://api.fetchproof.com plus a path and a query string, with the same header. So instead of one node per platform, put the path and the parameters on the item and let one node read them.

A Code node builds the request list. One item per call:

// One item per request. The HTTP Request node reads path and query from each item.
return [
  { json: { path: '/v1/youtube/video/transcript', query: { url: 'https://www.youtube.com/watch?v=VIDEO_ID' } } },
  { json: { path: '/v3/tiktok/profile/videos', query: { handle: 'TIKTOK_HANDLE' } } },
  { json: { path: '/v1/tiktok/video/transcript', query: { url: 'https://www.tiktok.com/@TIKTOK_HANDLE/video/VIDEO_ID' } } },
  { json: { path: '/v1/instagram/user/reels', query: { handle: 'INSTAGRAM_HANDLE' } } },
  { json: { path: '/v1/facebook/adLibrary/search/ads', query: { query: 'running shoes', country: 'US', status: 'ACTIVE' } } },
];

In practice this list comes from a sheet or a database query, not a literal. The HTTP Request node then uses an expression for the URL and sends the item’s query object as the query string. Copy this and paste it straight onto the n8n canvas:

{
  "nodes": [
    {
      "parameters": {
        "url": "=https://api.fetchproof.com{{ $json.path }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "specifyQuery": "json",
        "jsonQuery": "={{ JSON.stringify($json.query) }}",
        "options": {
          "timeout": 90000,
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 1000
            }
          }
        }
      },
      "name": "Fetchproof",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [460, 300],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    }
  ],
  "connections": {}
}

After pasting, open the node and pick your Header Auth credential (the snippet doesn’t reference one, so nothing of yours is in it). A few choices in there are deliberate:

  • Batching at one request per second keeps a 200-item run from firing everything at once. You don’t need concurrency for a scheduled workflow, and sequential runs are easier to debug.
  • A 90-second timeout. Most calls return in a few seconds, but some upstream pages are slow. The API has its own timeout behind this, and a timed-out request costs nothing, so a generous client timeout just avoids n8n giving up first.
  • Retry on fail, then the error output. Transient upstream errors get three tries five seconds apart. Anything still failing goes to the node’s error output, where you can log it to a sheet instead of letting it silently drop.

What comes back

Every response shares an envelope: success, credits_remaining and credits_charged. The rest depends on the path. These are the fields worth mapping, from real responses (trimmed):

YouTube transcript (/v1/youtube/video/transcript):

{
  "success": true,
  "credits_charged": 1,
  "videoId": "<video id>",
  "type": "manual",
  "transcript": [
    { "text": "<caption line>", "startMs": "18640", "endMs": "21880", "startTimeText": "0:18" }
  ],
  "transcript_only_text": "<all caption text>",
  "language": "en"
}

TikTok profile videos (/v3/tiktok/profile/videos): 15 videos per page in aweme_list. Each has aweme_id, desc (the caption), create_time, url and a statistics object with play_count, digg_count (likes), comment_count, share_count and collect_count. For older videos, send max_cursor from the response while has_more is 1.

TikTok transcript (/v1/tiktok/video/transcript):

{
  "success": true,
  "credits_charged": 1,
  "id": "<video id>",
  "language": "en",
  "transcript": "WEBVTT\n\n00:00:00.060 --> 00:00:02.780\n<caption line>\n...",
  "transcript_with_timestamp": [
    { "start": 0.06, "end": 2.78, "text": "<caption line>" }
  ],
  "text": "<all caption text>"
}

Instagram reels (/v1/instagram/user/reels): items[].media with code, url, taken_at, play_count, like_count, comment_count, product_type (clips) and like_and_view_counts_disabled.

Meta Ad Library search (/v1/facebook/adLibrary/search/ads): searchResults[] with ad_archive_id, page_name, is_active, start_date_string, publisher_platform, and a snapshot holding body.text, title, cta_text, display_format, images, videos and cards. Also searchResultsCount and a cursor.

Normalising after the node

Because one node returns five shapes, add a Code node after it that turns each response into the row you actually store. Paired items let it see which request produced which response:

// Mode: Run Once for Each Item
const req = $('Requests').item.json;
const r = $json;

switch (req.path) {
  case '/v1/youtube/video/transcript':
    return { json: { source: 'youtube', id: r.videoId, text: r.transcript_only_text ?? null } };
  case '/v1/tiktok/video/transcript':
    return { json: { source: 'tiktok', id: r.id, text: r.text ?? null } };
  case '/v3/tiktok/profile/videos':
    return { json: { source: 'tiktok', videos: (r.aweme_list ?? []).map((v) => ({ id: v.aweme_id, url: v.url, plays: v.statistics?.play_count })) } };
  case '/v1/instagram/user/reels':
    return { json: { source: 'instagram', reels: (r.items ?? []).map(({ media }) => ({ url: media.url, plays: media.play_count })) } };
  case '/v1/facebook/adLibrary/search/ads':
    return { json: { source: 'meta_ads', ads: (r.searchResults ?? []).map((a) => ({ id: a.ad_archive_id, page: a.page_name, active: a.is_active, copy: a.snapshot?.body?.text })) } };
  default:
    return { json: { source: 'unknown', path: req.path } };
}

Rename Requests to whatever you called the Code node that built the list. Note the explicit ?? null: a video with no captions comes back with a null transcript, and you want a null in your sheet, not the string “undefined”.

Limits and costs, honestly

  • Instagram reels stop at 12. Signed out, Instagram shows the first 12 reels on a profile and nothing more. Passing max_id returns a 400. For a daily workflow that’s usually fine, since you only care about recent reels.
  • Captions only. Both transcript endpoints return the captions the platform already has. If a video has none, the transcript is null and that call costs 0 credits. Nothing here does speech-to-text on audio.
  • TikTok transcripts in the same call. If you’re already looking a TikTok video up with /v2/tiktok/video, add get_transcript=true to get its captions at no extra cost instead of making a second call.
  • Ad search cursors expire. On the Ad Library search, cursors from page 2 onward are tied to a short-lived session. If one has expired, the response says so; start again from page 1.
  • Upstream refusals. Platforms do push back sometimes. Those come back as errors (which the retry settings above handle) and aren’t charged.

Each call costs 1 credit by default. Errors, blocked or timed-out requests, invalid requests and cache hits cost nothing. A not-found or empty result is charged only where that operation’s published cost says so. Both transcript endpoints also take cache_max_age (for example 7d), and a cached response inside that window costs 0 credits, which helps when a workflow re-reads the same URLs.

The credits_remaining field on every response is worth wiring to an IF node: when it drops below a threshold, send yourself a message before the workflow runs dry. New accounts start with 100 free credits, which is plenty to build and test the workflow above. Pack sizes and prices are on the pricing page.

Where to go from here

The full endpoint reference lists every path and parameter you can drop into the path and query fields. The free tools run several of these endpoints in a browser with no key, which is the fastest way to see a real response before you build the workflow around it.

Try it with 100 free credits

Sign up with an email address, no card. Credits never expire. Errors, invalid requests and cache hits cost 0 credits, and each endpoint page lists exactly what it charges.