Skip to main content
Install the official SDK and call /v1/* with typed namespaces. Requires Node ≥ 20.
Create the keyword that does the catching:

Authentication

Pass apiKey or set NEPHIA_API_KEY. Every request sends the x-api-key header.

Namespaces

Params use camelCase in TypeScript. The SDK converts them to snake_case on the wire, and responses come back as-is (camelCase JSON). client.keywords.create(), client.keywords.update() and both client.explore calls are the exception: their bodies travel camelCase, unconverted. A keyword is the one object you round-trip (read it, change a field, send it back), and that only works if the body’s keys are spelled the way the response spells them.

Mentions

Count instead of paging. Free, and the same numbers Insights shows:
Page with the cursor until it stops coming back:

Explore

Ask once, without creating a keyword. Price it, show the figure, then run the body you priced:

Keywords

resetSearches is worth reading. Changing what a search looks for (its terms, filters or market) starts that search over: its first poll records what currently matches without emitting it, and new results arrive from then on. The mentions caught before the change stay on the keyword. A new interval or webhook applies in place and resets nothing. The list names the searches that were started over; an empty list means none were.

Events, activity and AI answer runs

Three free reads sit beside listResults(), for code that speaks the webhook or has no endpoint to receive one:
In Python the same three are client.keywords.events(), client.keywords.activity() and client.keywords.ai_answer_runs(). See Webhooks: Replay events and AI answers.

Command line

The same package ships a nephia binary: one command per /v1 operation, for a shell, a cron job or a coding agent. No install needed with npx, no configuration file: the key comes from NEPHIA_API_KEY or --api-key.
The grammar is nephia <group> <command> [positionals] [--flag value].... Path parameters are positionals in order, query parameters are flags (group_by is --group-by), and a body is -f body.json, -f - for stdin, or --body '{...}', sent as written. --since also takes a duration: 30m, 24h, 7d. nephia --help and nephia <group> --help list every command. Without a terminal on stdout, the output is the /v1 response body as JSON, unchanged; on a terminal, a short table (--json or --table to choose). Errors are one line on stderr, and the exit code says what happened: A command that spends credits (keywords create, keywords update, explore run, analyses run, mentions similar, the Vinted reads, and --mode semantic) asks before it calls. Without a terminal it exits 3 and calls nothing, unless --yes is passed. keywords create, keywords update and explore run price themselves first with the free estimate and write with its token:
The package also carries an AGENTS.md for coding agents such as Claude Code or Codex: npx nephia agents prints it.

Webhook signatures

The X-Signature header is t=<unix>,v1=<hmac>; verify recomputes the HMAC over "<t>.<body>" with your account’s signing secret (dashboard → API Keys) and rejects timestamps older than 5 minutes (configurable via { toleranceSeconds }).

Errors & retries

Typed errors: AuthenticationError (401), InsufficientCreditsError (402), PermissionDeniedError (403), NotFoundError (404), ConflictError (409), RateLimitError (429, or 503 with code RATE_LIMITED), ServiceUnavailableError (other 503s), NephiaError (fallback). All expose status, code, body, and retryAfter. The client retries 429 / 502 / 503 / 504 and network failures (respects Retry-After, capped at 60s). It does not retry other 4xx or timeouts. Every POST carries an auto-generated Idempotency-Key reused across attempts, so retried creates can never duplicate a keyword or double-charge credits. Override it per request with { idempotencyKey }. Per-request options also accept signal, timeoutMs, and headers.

Next steps