Skip to main content
Integrations

n8n

n8n-nodes-kaer is an n8n community node for Kaer Search. It searches the web from a workflow, or from an AI Agent node as a tool, and returns ranked results with titles, URLs and snippets. On the Deep lane, results also carry the page's main text.

Package
n8n-nodes-kaer on npm
Operation
Search: Search the web (POST /v1/search)
Price
Each search is billed like POST /v1/search, see Search pricing

#Before you begin

  • A key with the search scope. See Authentication.
  • Search open on your account: add a card in Billing, which comes with 1,000 free web searches, or make a first top-up of $5 or more. Until then a search returns 403 tier_required.
  • A self-hosted n8n instance where you can install community nodes. n8n Cloud lists a community node only after n8n has verified it.

#Install the node

  1. In n8n, open Settings > Community nodes.
  2. Select Install.
  3. Enter n8n-nodes-kaer and confirm.

To install it by hand on self-hosted n8n, install the package in the folder n8n loads community nodes from, then restart n8n:

Shell
cd ~/.n8n/nodes
npm install --omit=peer n8n-nodes-kaer

--omit=peer stops npm installing n8n-workflow, which n8n already provides; n8n's own installer leaves it out too. Without the flag, npm also tries to build a native module that the official n8n Docker image can't compile, and the install fails.

For Docker and queue mode, follow manual installation in the n8n docs, keeping --omit=peer on the install command.

#Add your key

  1. In the Kaer dashboard, open Keys, create a key and tick the search scope. The node needs no other scope.
  2. Copy the key straight away: it starts with kaer_live_ and is shown only once.
  3. In n8n, create a Kaer API credential and paste the key into API Key.
  4. Leave Base URL as https://api.kaer.ai/v1.

When you save the credential, n8n tests it with GET /v1/me. That call is free and only reads the calling key, so the test never runs or bills a search. Any valid key passes, whatever its scopes.

#Set the parameters

ParameterDescription
QueryWhat to search for, 1 to 512 characters.
LaneHow Kaer runs the search. Default: Auto. See Choose a lane.
Number of Results1 to 25. Default: 5. The Deep lane may return fewer.
SimplifyOn (default): one item per result. Off: the full API response as one item.
OptionsDomain filters, paging and the result fields to keep. See the next table.

Each input item runs its own search, so you can feed the node a list of queries.

OptionDescription
Include DomainsOnly return results from these hosts or their subdomains, up to 20. Separate hosts with commas, for example gov.uk, bbc.co.uk, or use an expression that returns an array. A pasted address such as https://www.gov.uk/guidance is reduced to its host, www.gov.uk.
Exclude DomainsNever return results from these hosts or their subdomains, up to 20. Same format as Include Domains.
OffsetResults to skip before this page. Only the Web and Fast lanes page; the others return their first page and say so in warnings. Wins over Page when it is above 0.
PageThe page of results to return, counting from 1, in pages of Number of Results. Web and Fast lanes only.
FieldsResult fields to keep: Title, URL, Snippet, Source, Published Date, Text, Text Truncated, Text Source. Left empty, Simplify keeps Title, URL, Snippet, Published Date and Text; with Simplify off, every field comes back.

#Choose a lane

LaneWhat it doesPer queryTimeout
WebKaer's own index alone. Fastest and cheapest.$0.00056 s
FastKaer's index racing the live web.$0.00112 s
DeepEvery lane, re-ranked. Results carry the page's main text, up to 4,000 characters, when the page could be read.$0.00340 s
AutoKaer picks a lane for each query and bills the lane that served it.As served40 s

Failed searches, including ones that run past their timeout, are not charged.

#Read the output

With Simplify on, the node returns one item per result:

JSON
{
  "title": "Energy price cap explained",
  "url": "https://example.org/price-cap",
  "snippet": "What the cap is and how it is set.",
  "published_date": null
}

published_date is null when the page has no known date. On the Deep lane each item also has text, the page's main text. If you pick Fields, each item has exactly those fields. When Kaer returns an instant answer (a sum, a conversion, the time), warnings or both, every item from that search carries them too.

With Simplify on, a search with no results returns no items, so an instant answer that came without results is dropped; turn Simplify off to keep it, or turn on Always Output Data in the node settings if the next node should still run. With Simplify off, the node returns the Search response as one item, including served_lane, answer, warnings, kaer.request_id and kaer.cost_usd.

#Use it as an AI Agent tool

In an AI Agent node, add a tool, search for Kaer and pick Search the web. To let the model write the query, select the sparkle button next to Query, or set it to {{ $fromAI('query', 'What to search for') }}. Leave Simplify on so the agent gets short, flat results.

#Handle errors

The node reports the API's own message, with the error code, the HTTP status, the request ID and a suggested fix. Before sending, it checks the query length and the number of hosts in each domain list. Quote the request ID (req_…) to [email protected] if you need help.

StatusCodeWhat it means
401invalid_api_keyThe key is malformed, unknown, revoked or expired.
402insufficient_creditsYour balance cannot cover the call's hold. Free credit never pays for mail.
403tier_requiredYour tier does not include this service yet.
403insufficient_scopeThe key does not have the endpoint's scope.
429rate_limit_exceededToo many requests this minute for the key or the account, or too many invalid keys from your address.
429too_many_concurrent_searchesYour account already has its maximum of searches in flight: your tier's figure, or your search plan's when that is higher.
502search_failedThe search service failed. Nothing was charged.
504search_timeoutSearch ran out of time. Nothing was charged.

With Continue On Fail on, a failed item becomes an output item with error and description, and the other items still run. An error from the API adds code, httpCode, requestId and, when the API sent a Retry-After header, retryAfterSeconds. A timeout or a network failure adds only code: request_timeout or network_unreachable. For 429 you can also turn on Retry On Fail in the node settings.

An example workflow runs two queries on the Fast lane, limited to UK government sites. Import it with Import from File, then pick your Kaer API credential on the Kaer node.