Skip to main content
POST
Compares one numeric field across a set of peers and returns the distribution and, for an entity or a value you give, its percentile. No polling.

What the peers are

Each entity’s current, public record; never a private record or a stored search. Fewer than 20 peers is refused. population:
  • looked_up: only entities someone has looked up.
  • partial: no validated, fresh coverage record for these peers; population_detail.reason says why.
  • complete: the whole population: a complete baseline, a dataset checked within its expected interval, and peers inside its declared scope.

Authentication

Requires x402 payment in the payment-signature header.

Request body

string
required
A data tool, for example vehicle_complaints. Any other name is refused before payment; the response lists the names that work.
string
required
The numeric field to compare. For vehicle_complaints: total, crashes, fires, injuries, deaths. For vehicle_recalls and place_disasters: total.
object
make and model_year for vehicle_complaints and vehicle_recalls, state for place_disasters. Case-insensitive. Up to 5. Without any, every recorded entity is a peer.
string
The entity key of a peer, to place its own value. At most one of key and value.
number
A value to place in the distribution.
string
Required when the attribute has facts from more than one source; the refusal lists them.

Response (200)

integer
Peers compared. Never fewer than 20.
number
The distribution; quartiles are interpolated.
string
When the newest peer fact was last seen
string
Which entities the source covers
string
looked_up, partial or complete
object
reason, plus the coverage record when there is one: dataset, state (healthy, check_overdue, publication_failed, source_unreachable, stuck_lease, delta_gap, disabled, unpublished), scope, historical_start (when recording started), published_at, source_version (the source’s own date)
number | null
Yours, or the entity’s own; null when you gave neither.
number | null
0 to 100: the share of peers below value plus half the share equal to it.
The response also repeats attribute, field, peers and source.
See Pricing for the price of a call.

Errors

Refused before any payment:
  • 400 invalid_input: the attribute cannot be benchmarked, or field or a peers filter is not one it declares.
  • 400 no_data: nothing is recorded for the attribute yet.
  • 400 invalid_request: wrong shape, both key and value, or more than 5 peer filters.
Found after the read, once payment is taken, and refunded automatically; the response carries request_id and receipt_id:
  • 400 too_few_peers: fewer than 20 peers (count, minimum, population). Widen peers.
  • 400 not_in_population: key is not a peer, or has no number in field.
  • 400 invalid_input with sources: source is missing.