Skip to main content
Unif bills in credits, and the unit is a verified hit — one row that a source actually returned and that passed verification. That follows directly from the waterfall. A request runs down the cascade until something verifies; the steps that missed cost nothing, and the steps never reached cost nothing. You are charged once, for the answer. Two consequences worth internalizing:
  • A request is not a unit. Paging with limit=100 costs exactly what paging with limit=25 does, because the cost is in the rows, not the calls.
  • A miss is free. A search matching nothing, an enrichment that resolves not_found, a cascade that exhausts without verifying — all zero.
This page covers the consumption model — how many credits a call consumes. Plan sizes and pricing live in your dashboard at app.unif.dev.

What costs what

Three rules follow from this, and they cover most of what you need to know:

You pay for hits

Cascade steps that miss, fail verification, or are never reached are all free. Exploratory queries are cheap to get wrong.

Rows, not requests

Page size does not change cost. Always use limit=100.

Narrow fields, lower rate

Setting fields on an enrich call halves the per-row cost.
A deep cascade is not more expensive than a shallow one. If a row is answered at step 05 rather than step 01 you pay the same single credit — the cost of breadth is carried by Unif, not passed through per attempt.

Reading the cost of a call

Every billable response carries the cost in its headers:
Batch endpoints also report it in the body, which is easier to log:
Log X-Unif-Credits-Charged next to X-Request-Id on every call. When usage jumps, the answer is already in your logs instead of requiring a reconstruction.

The ledger

GET /v1/usage is the balance; GET /v1/usage/events is the itemized ledger.
Every event carries its request_id, so a surprising line in the ledger traces back to the exact call that produced it — and to your own log line for it.
Issue a separate API key per service. The ledger then attributes spend by service without any work on your side — see Authentication.

Spending less

The largest avoidable cost is paging through a broad result set and discarding most of it client-side. A revenue floor or a tighter category turns 1,000 charged rows into 80.
fields halves the per-row rate and makes meta.completeness meaningful. There is no reason to request a full record you do not read.
Resolving the same URL every night charges for identity you already established. Store the shp_… ID once — see Identifiers.
A tracker charges per entity checked, the same as reading the list — but it only wakes your systems when something crossed a threshold, and it will not silently keep running against a list nobody looks at.
A daily tracker over 500 entities is 15,000 credits a month whether or not anyone acts on it. This is the most common source of unexplained spend.
Sandbox keys return fixture data and cost nothing. Integration tests should never touch live credits.

Running out

When a workspace exhausts its credits, billable calls return 402 with insufficient_credits. Free endpoints keep working, so GET /usage still answers and health checks stay green.
402 is not retryable. Retrying burns rate limit and changes nothing until credits are added or the period rolls over. Alert on it instead — and alert on credits_remaining falling below a threshold, well before it reaches zero.
Workspaces with overage enabled continue past the included allowance and are billed for the difference. overage_allowed on GET /usage tells you which mode you are in.