# n8n (/docs/n8n)



n8n [#n8n]

You can call SocialCrawl from any [n8n](https://n8n.io) workflow today using the built-in **HTTP Request** node: one GET request with your key in the `x-api-key` header returns structured data from any of 48 platforms. A dedicated SocialCrawl community node is built and coming to the n8n registry, which will turn every endpoint into a point-and-click operation.

How do I use SocialCrawl in n8n right now? [#how-do-i-use-socialcrawl-in-n8n-right-now]

Add an **HTTP Request** node and configure it:

* **Method:** `GET`
* **URL:** `https://www.socialcrawl.dev/v1/tiktok/profile` (swap in any platform and resource)
* **Query parameters:** the endpoint's inputs, for example `handle` = `charlidamelio`
* **Headers:** `x-api-key` = your key (store it in an n8n credential, not inline)

The node returns the full SocialCrawl envelope, so the downstream nodes can read `data`, `credits_used`, and `credits_remaining` directly:

```json
{
  "success": true,
  "platform": "tiktok",
  "endpoint": "/v1/tiktok/profile",
  "data": {
    "author": { "username": "charlidamelio", "followers": 155000000 },
    "computed": { "engagement_rate": 0.082, "language": "en" }
  },
  "credits_used": 1,
  "credits_remaining": 99,
  "request_id": "req-abc123",
  "cached": false
}
```

Because every platform returns the same envelope, one HTTP Request node handles TikTok, Instagram, YouTube, LinkedIn, Amazon, and the rest, only the URL and query parameters change. To validate your key without spending anything, point the node at `GET /v1/credits/balance`, which is always free.

Errors use the same envelope with `success: false`, so branch on it rather than assuming `data` is there:

```json
{
  "success": false,
  "error": {
    "type": "NOT_FOUND",
    "message": "Profile not found for handle 'nosuchuser'.",
    "status": 404,
    "doc_url": "https://www.socialcrawl.dev/docs/errors#not-found"
  },
  "credits_used": 0,
  "credits_remaining": 99,
  "request_id": "req-abc123"
}
```

Add an **IF** node on `{{ $json.success }}` and route the false branch somewhere you will see it. `error.type` is machine-readable and `error.doc_url` links to the exact fix. On a `429` or `503`, honour the `Retry-After` response header before retrying — see [Rate limits](/docs/rate-limits) and [Errors](/docs/errors).

How do I store my API key securely in n8n? [#how-do-i-store-my-api-key-securely-in-n8n]

Create a **Header Auth** credential: set the header name to `x-api-key` and the value to your key (it looks like `sc_...`). Attach that credential to the HTTP Request node so the key never appears in the workflow JSON or execution logs. Get a key at [socialcrawl.dev](https://www.socialcrawl.dev) under Dashboard → API Keys; new accounts start with 100 free credits.

Is there a dedicated SocialCrawl node? [#is-there-a-dedicated-socialcrawl-node]

Yes, and it is built. `n8n-nodes-socialcrawl` exposes one **Resource** per platform and one **Operation** per endpoint, generated from the SocialCrawl endpoint registry. The current build covers **39 platforms and 221 operations**; streaming (SSE) endpoints are excluded because n8n's declarative routing cannot model them. Regeneration is a manual step, so the node trails the REST API by a release or more. It is `usableAsTool`, so an n8n AI Agent can call any SocialCrawl endpoint it covers as a tool.

**It is not published yet** — neither on npm nor in the n8n community registry, so there is nothing to install today. Once it publishes, installation will be a two-click step:

1. In n8n, open **Settings → Community Nodes** and select **Install** (an instance owner has to enable community nodes first; verified install needs n8n v1.94.0+).
2. Enter the package name `n8n-nodes-socialcrawl` and install.

After that, add the **SocialCrawl** node, pick a **Resource** (a platform, or Universal Search), pick an **Operation** (an endpoint), and fill in the fields. Until then, the HTTP Request approach above is the supported path, and it covers every endpoint including the ones the node will never carry.

What does it cost? [#what-does-it-cost]

Credits are billed exactly as the REST API bills them — most endpoints are 1 credit, heavier ones 5 or 10, and composite or bundle endpoints carry their own price (for example `search/everywhere` is a flat 20). Cache hits cost 0 credits. See [Endpoint pricing](/docs/endpoint-pricing) for the exact figure per endpoint. Empty results and upstream errors are auto-refunded. See [Credits](/docs/credits) for how the ledger works, or [Pricing](/pricing) for credit packs.

Read `credits_used` and `credits_remaining` from the JSON envelope, or the `X-Credits-Used` and `X-Credits-Remaining` response headers. A [streamed response](/docs/streaming) has no envelope, so read its spend from the terminal `done` event instead.

Where to go next [#where-to-go-next]

* Browse the [platform directory](/platforms) to find the exact `/v1/{platform}/{resource}` path for your workflow.
* [Universal search](/docs/search) fans one query across 14 platforms (up to 17 sources) in a single request, ideal for a scheduled listening workflow.
* Refreshing hundreds of URLs on a schedule? [Batch endpoints](/docs/batch) do it in one request instead of one node execution per item.
* New to the API? Start with the [Quickstart](/docs/quickstart) and [Authentication](/docs/authentication).
* Building an agent instead of a workflow? See [Claude Code](/docs/claude-code), [LangChain](/docs/langchain), and [Vercel AI SDK](/docs/vercel-ai-sdk).
