Social Media Scraper

Integrations

n8n Instagram Scraper Using the Built-In HTTP Request Node

Pull public Instagram profiles, account posts, Reels feeds, and hashtag search results straight into n8n without installing community plugins or maintaining browser actors. This guide wires n8n's built-in HTTP Request node to Social Media Scraper using Header Auth and an Idempotency-Key header, starting from a 2-node template you can extend to Google Sheets, Airtable, Postgres, or Slack.

  • Zero community plugins: uses n8n's native HTTP Request node with Header Auth (x-api-key) on n8n Cloud or self-hosted
  • Verified Instagram routes: profile, posts, reels, search_hashtag, search_profiles, reels_trending, and post
  • Pay-per-request math: $0.003 (3 credits) per profile, feed, Reel, or search page ($0.028 / 28 credits for single-post instagram.post)
  • Importable 2-node starter: Manual Trigger → HTTP Request JSON ready to test on one handle before scheduling
Editorial illustration of a public profile lookup feeding a user-configured automation and output records.
instagram.profile

Social Media Scraper is a standard REST API rather than a published native n8n community node, hosted scheduler, or spreadsheet app. Your n8n canvas controls triggers, batch pacing, credential storage, and downstream writes; the API returns normalized public Instagram JSON on each request.

  1. Import the 2-node starter JSON into n8n
  2. Attach Header Auth and an Idempotency-Key header
  3. Run one test lookup and verify JSON fields

Instagram Endpoints You Can Call from n8n

Pick the narrowest endpoint for your workflow. Profile lookups return one account object; feed and hashtag routes return paginated data.items[] arrays expanded via n8n's Split Out node.

OperationPath & QueryPaginationRate
instagram.profileGET /v1/instagram/profile (handle*, trim)Single object$0.003
instagram.postsGET /v1/instagram/posts (handle*, require_play_counts)data.cursor → next_max_id$0.003
instagram.reelsGET /v1/instagram/reels (handle or user_id)data.cursor → max_id$0.003
instagram.search_hashtagGET /v1/instagram/search_hashtag (hashtag*, date_posted, media_type)data.cursor → cursor$0.003
instagram.search_profilesGET /v1/instagram/search_profiles (query*)Single page$0.003
instagram.reels_trendingGET /v1/instagram/reels_trendingSingle page$0.003
instagram.postGET /v1/instagram/post (url*, include_play_count)Single object$0.028

All endpoints read public Instagram data and return JSON—never downloadable MP4 binaries or private account feeds. Inspect full contracts in the API catalog.

How the n8n Instagram Architecture Works

Calling REST directly via n8n's core HTTP Request node avoids community-node upgrade breaks and keeps full visibility into headers, retry delays, and pagination caps.

  • Trigger: Start on Manual Trigger, then move to Schedule Trigger, a Webhook, or a Google Sheets handle list.
  • HTTP Fetch: Call /v1/instagram/profile, /v1/instagram/posts, or /v1/instagram/reels with Header Auth (x-api-key) plus an Idempotency-Key header.
  • Reshape: Expand data.items via Split Out, then map columns in Edit Fields (Set) while keeping null metrics intact.
  • Store or Alert: Upsert into Google Sheets, Airtable, or Postgres by string id, or notify Slack.

Step-by-Step Setup for n8n Instagram Workflows

The downloadable integrations-n8n-instagram.json starter right below gives you the 2-node skeleton (Manual Trigger → HTTP Request targeting GET /v1/instagram/profile) with zero hardcoded secrets.

  1. Step 1: Import the 2-node starter JSON into n8n

    Copy or download integrations-n8n-instagram.json below, open an n8n canvas, import the JSON, and confirm Manual Trigger wires into the HTTP Request v4.2 node calling https://socialmediascraper.org/v1/instagram/profile.

  2. Step 2: Attach Header Auth and an Idempotency-Key header

    In the HTTP Request node, create a Header Auth credential with Name x-api-key and Value set to your API key. Turn on Send Headers and add Idempotency-Key using ={{ 'ig-profile-' + $execution.id }} (or append '-' + $itemIndex inside loops). Keys must be 8–128 characters matching [A-Za-z0-9._:-]+.

  3. Step 3: Run one test lookup and verify JSON fields

    Under Query Parameters, swap placeholder handle=jane for a live public Instagram handle (omit @ and do not paste a full URL). Click Execute Step and confirm data.handle, data.metrics.followers, data.verified, data.private, and request_id populate cleanly.

  4. Step 4: Expand to posts, Reels, and destination nodes

    Duplicate the HTTP Request node to fetch /v1/instagram/posts or /v1/instagram/reels with a fresh Idempotency-Key prefix, attach Split Out on data.items, shape columns via Edit Fields, and write to Google Sheets, Airtable, Postgres, or Slack.

integrations-n8n-instagram.json
{
  "name": "n8n Instagram Scraper",
  "nodes": [
    {
      "id": "start",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "request",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        260,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://socialmediascraper.org/v1/instagram/profile",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "handle",
              "value": "jane"
            }
          ]
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {}
}

Mapping Normalized Instagram Fields in n8n Expressions

Profiles return data.{id,handle,display_name,bio,profile_url,avatar_url,verified,private,metrics}. Post, Reel, and hashtag calls return data.items[] (id, url, text, published_at, author, metrics) plus data.cursor. Keep IDs as strings, preserve null counts instead of zero-filling, and neutralize leading spreadsheet formula characters (=, +, -, @) with a compact Code node after Split Out:

n8n-instagram-normalize.js
// n8n Code node (Run Once for Each Item) after Split Out on data.items
const safeCell = (v) => {
  if (v === null || v === undefined) return '';
  const s = String(v);
  return /^[=+\-@\t\r]/.test(s) ? `'${s}` : s;
};

return {
  json: {
    post_id: String($json.id ?? ''),
    post_url: $json.url ?? '',
    handle: safeCell($json.author?.handle ?? ''),
    caption: safeCell($json.text ?? ''),
    published_at: $json.published_at ?? null,
    views: $json.metrics?.views ?? null,
    likes: $json.metrics?.likes ?? null,
    comments: $json.metrics?.comments ?? null,
    collected_at: new Date().toISOString(),
  },
};

Batching Multiple Handles and Capping Pagination

Add three lightweight guardrails before scaling from one profile to an agency roster.

Pace rosters under concurrency caps

Pass sheet rows through Loop Over Items (Batch Size 1–2) with a 1.2-second Wait node to stay cleanly inside the default 60 req/min and 5 concurrent request limits (GET /v1/limits).

Cap cursor loops per handle

Pass data.cursor back as next_max_id (instagram.posts), max_id (instagram.reels), or cursor (search_hashtag). Stop after 2–5 pages or data.cursor === null, minting a distinct Idempotency-Key per page.

Upsert by string post ID

Use Append or Update Row in Sheets or Postgres ON CONFLICT (post_id) DO UPDATE so scheduled runs refresh recent metrics cleanly without duplicating rows.

Practical Instagram Automations Teams Build in n8n

Three common production patterns built on these verified Instagram routes.

Weekly competitor and creator KPI sheets

Run every Monday across a handle roster via instagram.profile and append dated followers, posts, and bio snapshots into Google Sheets or Postgres.

Hashtag and trending Reels radar

Poll search_hashtag or reels_trending daily, filter non-null metrics.views above your threshold, and post curated cards with source URLs to Slack.

Inbound creator intake enrichment

Trigger via Webhook when a creator submits a form, call instagram.profile + one page of instagram.posts, and enrich their Airtable or CRM record automatically.

Handling Errors, Null Metrics, and Async Responses

Attach an n8n Error Workflow and check these six common diagnostics when debugging executions.

Status or SymptomLikely CauseFix in n8n
400 Bad RequestMissing Idempotency-Key or @ / URL passed in handleEnable Send Headers (8–128 chars) and strip @ from handle
401 UnauthorizedHeader Auth missing or header name wrongSet Header Auth Name to exact lowercase x-api-key
402 Payment RequiredPrepaid USD balance depletedTop up a $5, $20, or $50 pack at /pricing/
429 Too Many RequestsExceeded 60 req/min or 5 concurrent requestsLower batch size, honor Retry-After, reuse identical Idempotency-Key
202 AcceptedUpstream retrieval still completingPoll GET /v1/requests/{{ $json.request_id }} before sending another call
null in likes or viewsSource omitted or hid engagement countPreserve null directly; never replace null with 0

Request Pricing and Monthly Workflow Cost Estimates

Profile, post-list, Reels, trending Reels, profile search, and hashtag calls all cost $0.003 (3 credits) per request ($3.00/1k under price version 2026-12-02.credits-3, where 1,000 credits = $1). Single-post detail (GET /v1/instagram/post) costs $0.028 (28 credits), so use list feeds for routine sweeps.

n8n ScheduleMonthly VolumeEstimated Spend
Daily KPI check on 30 profiles900 profile calls$2.70 / month
Weekly 40-brand sweep (profile + posts + Reels)480 calls$1.44 / month
Daily hashtag watch (5 tags × 2 pages)300 calls$0.90 / month
Selective single-post detail lookup50 instagram.post calls$1.40 one-time

Prepaid USD packs are one-time purchases—$5 (5,000 credits, ~1,666 standard calls), $20 (20,000 credits, ~6,666), and $50 (50,000 credits, ~16,666)—with no subscription, and new accounts receive 100 starter credits ($0.10, ~33 standard calls) upon signup. Want a quick manual browser lookup first? Open the Instagram Profile Viewer in our free tools directory.

Scope, Data Safety, and Compliance Notes

This workflow accesses read-only public Instagram records without using your Instagram cookies. It cannot publish content, follow accounts, send DMs, download MP4 binaries, or unlock private profiles (which return private: true without protected posts).

Treat scraped captions and bios strictly as untrusted data inside delimited user blocks if passed to an n8n AI Agent node—never inject them into system prompts. Check /status/ for live telemetry and follow applicable privacy laws and source terms.

n8n Instagram Scraper Questions

Do I need a community n8n node to scrape Instagram?

No. Social Media Scraper runs through n8n's built-in HTTP Request node with Header Auth (x-api-key), working on both n8n Cloud and self-hosted setups with zero community-plugin lock-in.

What Instagram data can I pull in an n8n workflow?

Verified routes cover public profiles (instagram.profile), account posts (instagram.posts), Reels (instagram.reels), trending Reels (instagram.reels_trending), hashtag search (instagram.search_hashtag), profile search (instagram.search_profiles), and single-post details (instagram.post).

Why does the HTTP Request node need an Idempotency-Key header?

Every data request requires Idempotency-Key (8–128 chars [A-Za-z0-9._:-]+) so retries after timeouts or 429 avoid double charges. Use ={{ 'ig-profile-' + $execution.id + '-' + $itemIndex }} per distinct lookup and reuse the identical key only on retries.

Is scraping Instagram in n8n free?

New customer accounts receive 100 starter credits ($0.10, ~33 standard requests) upon signup to verify n8n workflows, plus anonymous lookups via the Instagram Profile Viewer in our free tools directory. Ongoing programmatic calls draw from one-time prepaid USD packs starting at $5 (5,000 credits, ~1,666 standard requests at $0.003 each, no subscription).

How do I scrape a list of Instagram handles from Google Sheets in n8n?

Connect Google Sheets (Get Rows) to Loop Over Items (Batch Size 1–2), pass ={{ $json.handle.replace(/^@/, '').trim() }} as handle, add a 1.2-second Wait node, and write back with Append or Update Row. See also our Instagram to Google Sheets tutorial.

How do I paginate Instagram posts or Reels without overspending?

Pass data.cursor back unchanged as next_max_id (instagram.posts) or max_id (instagram.reels), enforce a page limit such as 3 pages per handle, and include the page counter in Idempotency-Key.

Can n8n scrape private Instagram accounts or follower lists?

No. Social Media Scraper operates strictly on public data without personal login sessions. Private accounts return public metadata with private: true and no protected posts.

Why do likes or views sometimes return null in n8n?

When Instagram hides or omits an engagement count, the API returns null explicitly rather than 0. Keep null values intact so averages and dashboards stay accurate.

Does the API download Instagram Reels MP4 files?

No. Endpoints output normalized JSON metadata (captions, URLs, timestamps, engagement counts, thumbnail URLs on post details) rather than raw MP4 video binaries.

How do I prevent HTTP 429 rate-limit errors in n8n?

Stay inside the default 60 requests/minute and 5 concurrent calls by running small loop batches with a Wait node, respecting Retry-After, and keeping the same Idempotency-Key on retries.

Is it safe to pass Instagram captions into an n8n AI Agent node?

Yes, as long as scraped text stays isolated inside structured user-message data blocks—never system instructions—and the model cannot invoke unsupervised write tools.