Offendersearch
Criminal API Reference

Errors & status codes

Every status code, the stable error envelope, and why a 200 can still be an incomplete live search.

Base URL https://api.offendersearch.app

The error shape

Criminal endpoints return errors as a single, consistent nested object across every endpoint: a stable error.code you switch on and a human-readable error.message you can surface. One handler covers the whole product. Branch on code, render message code is a stable machine token; message may be reworded.

422 Unprocessable Entity
{
  "error": {
    "code": "guard_unbounded_query",
    "message": "a lastName predicate is required — an unbounded query returns a lottery, not an answer"
  }
}

A 200 can still describe an incomplete live search: read status and counts, never records alone.

Status codes

Statuserror.codeWhen you’ll see it
200A cached search, or a synchronous live search, completed. A cached search is always complete; a live search may report unfinished sources in counts.
202A live search fanned out to more than two sources; poll GET /v1/criminal/searches/{searchId} for the result.
400no_report_inputA report request with neither a searchId nor an inline query.
401unauthenticatedThe X-API-Key header is missing or malformed.
404not_foundNo search or record carries the id you asked for, or it belongs to another account.
413batch_too_largeA batch of more than 1000 rows.
422guard_unbounded_queryquery.lastName is missing — an unbounded query is declined rather than answered with a lottery.
422prefix_too_shortAn explicit name-prefix search below the three-character floor.
422no_live_sourcesA live request (carrying no website inputs) that resolved to no sources.
422no_websiteA resolve call with neither website nor websites.
422bad_batch / empty_batchAn unparseable batch body or a CSV with no header row, or zero queries in the batch.

There is no request rate limit today. No endpoint returns 429, and no Retry-After header is emitted. Apply your own client-side concurrency control — a cached search over a common surname can return up to 200 records per page and many pages.

Two errors, verbatim

Unauthenticated
401 Unauthorized
{
  "error": {
    "code": "unauthenticated",
    "message": "the X-API-Key header is missing or malformed"
  }
}
Declined query
422 Unprocessable Entity
{
  "error": {
    "code": "guard_unbounded_query",
    "message": "a lastName predicate is required — an unbounded query returns a lottery, not an answer"
  }
}
422 is a deliberate contract, not a failure. A query with nothing to narrow on cannot return the same full result twice, so it is declined with a sentence you can show a user rather than answered with a subset that would read as the whole answer.