> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# n8n

Use Scrapier in n8n with the n8n-nodes-scrapier community node, or with the built-in HTTP Request node.

There are two ways to use Scrapier in n8n: the **Scrapier community node** (easiest), or n8n's built-in **HTTP Request** node, which can call any endpoint.

## Scrapier community node

The package is [`n8n-nodes-scrapier`](https://www.npmjs.com/package/n8n-nodes-scrapier). Version 1.1.0 uses API v2: every scrape is synchronous, and one call returns one page of results.

1. In self-hosted n8n, open **Settings → Community Nodes → Install**.
2. Enter `n8n-nodes-scrapier` and install it.
3. Add a **Scrapier** node to a workflow and create a **Scrapier** credential with your API key from [app.scrapier.io/dashboard/api-keys](https://app.scrapier.io/dashboard/api-keys). n8n checks the key against `GET /api/v2/me` and shows your account email on the credential.

> **Note:** The node works on self-hosted n8n today. It will be available on n8n Cloud once it passes n8n's verification.

### What's in the node

- **Curated operations** for the most-used scrapers, plus **Custom Scrape**, which calls any endpoint in the [catalog](https://api.scrapier.io/api/v2/endpoints) by slug with a JSON parameter object.
- **One item per page**: each call outputs the page object (the results under an endpoint-specific key such as `results`, `products` or `posts`, plus `next_cursor`) as a single n8n item.
- **Cursor pagination**: most operations have an optional **Cursor** field. Set it to the previous page's `next_cursor`, e.g. `{{ $json.next_cursor }}` in a loop. Required inputs are ignored when a cursor is set, and `next_cursor` is `null` on the last page. See [Pagination](https://docs.scrapier.io/pagination.md).
- **Errors**: a failed call fails the node with the API's error message, or outputs `{ "error": "..." }` when **Continue On Fail** is on.
- **Pricing**: each successful call costs the endpoint's `cost_credit` (most endpoints cost 1 credit; see [Credits & pricing](https://docs.scrapier.io/credits-and-pricing.md)), however many results the page holds. Failed calls are free.

### Upgrading from 1.0.x

1.1.0 moved from API v1 to v2 and is a breaking change for some workflows:

- **Google Map Reviews** was removed (not available in v2).
- **Youtube Search** was replaced by **Youtube Search Full**.
- The **Webhook URL** option was removed, because v2 returns results directly.
- The **Split Rows Into Items** option was removed; output is one item per page.

## HTTP Request node

No install needed, and it can call every endpoint.

1. Add an **HTTP Request** node.
2. Create a credential of type **Header Auth** with name `X-API-Key` and your key as the value. Keeping the key in a credential keeps it out of the workflow JSON.
3. Set the method and URL for the endpoint, e.g. `GET https://api.scrapier.io/api/v2/google-maps/` with the query parameter `queries` = `coffee shops`. Keep the trailing slash.
4. Run it. The result is in the node's output under `data`.

For more pages, loop while `data.next_cursor` is set and send it as the `cursor` query parameter. You can also paste a cURL command from any [endpoint page](https://docs.scrapier.io/api-reference.md) into n8n's **Import cURL**:

```bash
curl -G "https://api.scrapier.io/api/v2/google-maps/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "queries=coffee shops"
```

Read each endpoint's parameters on its page, or from `GET https://api.scrapier.io/api/v2/endpoints`.
