---
title: n8n
description: Use looot in n8n workflows with the n8n-nodes-looot community node. Install, credential, the five operations and a worked example.
sidebar:
  label: n8n
---

`n8n-nodes-looot` is a community node that puts looot in an n8n workflow. One looot account and one
prepaid balance cover 2,500+ data endpoints, such as email lookup, company data, search results and
news. The node searches the catalog, shows an endpoint's inputs and price, runs it and reads the run.

## Verification status

The node is submitted for n8n verification. It is **not verified yet**. Until n8n verifies it, n8n
Cloud users cannot install it from the node panel. Self-hosted n8n can install it today.

## Install

On self-hosted n8n:

1. Open **Settings**, then **Community Nodes**.
2. Click **Install**.
3. Enter `n8n-nodes-looot` and confirm.

The package is on [npm](https://www.npmjs.com/package/n8n-nodes-looot), version 0.1.2, published
with provenance from GitHub Actions.

The node sets `usableAsTool`, so an AI Agent node can call it as a tool. On self-hosted n8n, set
`N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` first.

## Credential

Create a **Looot API** credential with two fields.

| Field | Value |
|---|---|
| Agent Token | An agent token from looot.ai under Settings, **Agent tokens**. Tick `catalog.read`, `runs.read`, `runs.execute` and `usage.read`. |
| Base URL | `https://api.looot.ai`. Change it only if looot gave you another gateway address. |

n8n sends the token as `Authorization: Bearer <token>`. The credential test calls `GET /v1/balance`.
For more on tokens and scopes, see [Headless and CI](/connect/headless).

Top up the balance before your first paid run. See [Money](/money).

## Operations

Every operation returns the JSON answer of the looot REST API as the item's `json`.

### Search Catalog

Finds endpoints by what you want to do. Free. Calls `GET /v1/catalog/search`.

| Field | Meaning |
|---|---|
| Query | What you want to do, in plain words. Example: `find the work email of a person at a company`. |
| Limit | Maximum number of results. Default 50. |
| Filters | Optional. `Category`, `Max Price (Micros)` (millionths of a dollar), `Prefer` (`Balanced`, `Cheapest`, `Fastest` or `Reliable`) and `Provider`. Empty or zero filters are not sent. |

### Inspect Endpoint

Reads the exact inputs, output and price of an endpoint or a job. Free. Calls
`GET /v1/operations/{endpointId}`.

| Field | Meaning |
|---|---|
| Endpoint ID | An endpoint ID from a search answer, or a job written as `job:people.email.find`. |

### Run

Runs an endpoint or a job and spends prepaid credit. Calls `POST /v1/runs`.

| Field | Meaning |
|---|---|
| Endpoint ID | An endpoint ID, or `job:<job id>` such as `job:people.email.find`. |
| Input (JSON) | The input object. Use the exact field names that Inspect Endpoint lists. Default `{}`. |
| Idempotency Key | The same key with the same input never pays twice. If empty, the node uses `n8n-<execution id>-<item index>`. |
| Fallback | On by default. When the first provider finds nothing, looot tries the next provider of the same job. It only works with `job:` IDs and lookups. |
| Max Cost (USD) | Shown when Fallback is on. A cap for the whole fallback route. `0` means no extra cap. |
| Wait (Seconds) | How long to wait for the result before returning a run ID. Default 20. `0` returns at once. |

### Get Run

Reads one run: status, result and cost. Free. Calls `GET /v1/runs/{runId}`.

| Field | Meaning |
|---|---|
| Run ID | The run to read. |

### Balance

Reads the available credit and the top-up link. Free. Calls `GET /v1/balance`. It has no fields.

## Example flow

This flow finds a work email for each person in a list.

1. **Search Catalog.** Set Query to `find the work email of a person at a company`. Read the
   answer and pick the job. Here it is `job:people.email.find`.
2. **Inspect Endpoint.** Set Endpoint ID to `job:people.email.find`. The answer lists the input
   field names and the price. Copy the field names exactly.
3. **Run.** Set Endpoint ID to `job:people.email.find` and fill Input (JSON) with the fields from
   step 2, using expressions for the values from your input items. Leave Fallback on. Leave Wait at
   20.
4. **Get Run.** If a Run answer comes back with a run ID instead of a result because it took longer
   than Wait, add a Get Run node and set Run ID from that answer. Repeat later until the status is
   final.

Steps 1 and 2 are free, so you can do them once while you build the workflow and then remove them.
Only Run spends credit.

### Idempotency

The default key is `n8n-<execution id>-<item index>`. It stays the same when the node runs the same
item again in the same execution, for example with **Retry On Fail**, so looot does not charge twice
for the same input. To make your own rule, set Idempotency Key to a
value that is unique per real request, such as a record ID.

## Errors

If a request fails, the node stops the workflow with an n8n API error. With **Continue On Fail**
turned on, the item carries `{ "error": "<message>" }` and the workflow goes on.

## Links

- npm: [n8n-nodes-looot](https://www.npmjs.com/package/n8n-nodes-looot)
- Source: [github.com/loootai/n8n-nodes-looot](https://github.com/loootai/n8n-nodes-looot)
- Support: [walid@looot.ai](mailto:walid@looot.ai)
- Other packages: [Integrations](/integrations)

<Related />
