Criminal Records API · v1.0.0

Batch & CSV search

Up to 1000 cached lookups per call, JSON or CSV, row in and row out, with per-row fault isolation.

Livehttps://api.offendersearch.appSandboxhttps://sandbox.offendersearch.app

One row in, one result out

Bulk cached lookups: each row runs through the same cached engine as POST /v1/criminal/search, so results are identical to running them individually, and every result carries the same Record schema and the same envelope — counts, warnings, pagination, labelled status. Live verification is not offered in batch — there is no live block on a batch row, and a batch never fans out to a live source, so every row is cache-only and every status is complete, error or, rarely, not_run (see below) — never partial.

  • Three accepted body shapes. A bare JSON array of query objects, a JSON envelope { "queries": [...], ...defaults } whose non-queries keys apply to every row, or a text/csv body whose header row names query fields.
  • Input order is preserved. Each result carries its 0-based index, so you can zip results back onto your own rows without matching on identity.
  • Rows are fault-isolated. A row that fails validation is returned with status: "error" in place and never aborts the rest of the batch — and is not billed.
  • 1000 rows per call. A larger batch returns 413 batch_too_large; a batch of zero rows is a 422 empty_batch.
Each row is billed as one call. A 1,000-row batch is 1,000 calls — meterEvents carries one criminal_call (quantity: 1) for each row that ran. A row that fails validation is not metered, so meterEvents can hold fewer entries than count.

The JSON form

Post either a bare array of query objects, or an envelope { "queries": [...], ...defaults } whose non-queries keys are batch-wide defaults applied to every row. A per-row value overrides the default for that row — so nameStrategy: "prefix" at the envelope level applies to all rows unless a row sets its own. Each query object is flat — the fields from a query, not wrapped in { "query": … }.

Bare array
POST /v1/criminal/batch
curl -X POST https://api.offendersearch.app/v1/criminal/batch \
  -H "X-API-Key: $OFFENDERSEARCH_KEY" \
  -H "Content-Type: application/json" \
  -d '[
        { "lastName": "Hamilton", "state": "TX" },
        { "firstName": "Alex", "state": "TX" }
      ]'
Envelope with batch-wide defaults
queries + defaults
{
  "queries": [
    { "lastName": "Hamilton", "state": "TX" },
    { "lastName": "Example",  "state": "IL", "firstName": "Chris" }
  ],
  "include": ["sourceData"],
  "nameStrategy": "prefix"
}

The CSV form

Post a text/csv body whose header row names query fields, one query per line. Empty cells are dropped, a UTF-8 BOM is handled, and common spellings of a header (First Name, DOB, Zip Code) name their field. Unknown columns are ignored, so you can post a CSV export unchanged — a caseRef or note column is dropped rather than rejected. The endpoint still requires lastName per row.

Request — a two-row CSV, second row has no surname
POST /v1/criminal/batch (text/csv)
curl -X POST https://api.offendersearch.app/v1/criminal/batch \
  -H "X-API-Key: $OFFENDERSEARCH_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary $'firstName,lastName,state,caseRef\nAlex,Hamilton,TX,FILE-0142\nJordan,,IL,FILE-0143\n'
Response — one envelope per row, in order
200 OK
{
  "count": 2,
  "results": [
    { "index": 0, "status": "complete",
      "counts": { "records": 12, "recordsReturned": 12, "sourcesQueried": 0,
                  "sourcesComplete": 0, "sourcesIncomplete": 0, "candidatesCapped": false,
                  "duplicatesFolded": 0, "exclusionsIncluded": false,
                  "sourcesOnFile": 44, "sourcesPending": 27 },
      "warnings": [], "page": 1, "perPage": 50, "totalPages": 1,
      "sourceStatus": [], "cappedOmittedSources": [], "omittedFields": ["sourceData"],
      "records": [ "… 12 records …" ],
      "proof": { "status": "none" },
      "coverage": { "scope": { "state": "TX", "county": null },
                    "sourcesOnFile": 44, "sourcesPending": 27, "pendingSources": [ "…" ] },
      "legal": { "notice": "Not a consumer report. …" } },
    { "index": 1, "status": "error",
      "error": "a lastName predicate is required — an unbounded query returns a lottery, not an answer",
      "counts": { "records": 0, "recordsReturned": 0, "sourcesQueried": 0,
                  "sourcesComplete": 0, "sourcesIncomplete": 0, "candidatesCapped": false,
                  "sourcesOnFile": 0, "sourcesPending": 0 },
      "records": [] }
  ],
  "meterEvents": [ { "kind": "criminal_call", "quantity": 1, "chargeCeilingUsd": null } ]
}
Read each row’s own result. Row 0 ran and carries a full envelope with its own counts, exactly as a single search does — the unknown caseRef column was ignored. Row 1 has no surname, so it is status: "error" with the reason in place, and it is not billed: meterEvents holds one criminal_call, for the one row that ran, even though count is 2.

Guardrails & unbounded rows

A batch is one HTTP call, but each row is a full search and each row is validated on its own. The whole-batch guardrails are size limits; the per-row guardrail is the same surname requirement as a single search.

LimitValueOver-limit behaviour
Max rows1000413 batch_too_large
Zero rows—422 empty_batch
Unparseable body / no CSV header—422 bad_batch
An unbounded row surfaces as status: "error", not a lottery. A row with no lastName would be an unbounded query, so the row is returned with status: "error", its index in place, zeroed counts, an empty records, and an error string — and it is not billed. The rest of the batch still runs. A bad row is a row you can fix and resubmit, never a failure that costs you the whole call.

Screening a list of people in a batch

A file of applicants or renters — first, middle and last name, full date of birth and a current address per row — is the common bulk shape. Send it as it is; each row is read the way such a row means it.

  • A full dob reads the surname exactly. Without a nameStrategy, a row with a full date of birth uses exact, so “Lee” is not also read as LEEDS or LEEPER.
  • The address ranks; it does not filter. With a full dob, address, city, zipcode and the state sent with them are a residence hint (residenceMode: "prefer"): records where the person lives sort first and say so in residenceMatch, and the person’s records in other states, or on a record with no published address, still come back. Send residenceMode: "filter" to restrict to the residence instead.
  • Each row says how strong its best match is. matchSummary.bestMatch is dob_match, year_or_age_match_same_state, year_or_age_match, name_only or clear, with counts per tier, distinct people (peopleByTier) and the same-name records dropped because their date of birth contradicts yours. Records come back best tier first; each carries matchTier and a personGroup shared by the same person across sources.
  • Name-only records are optional. dobPolicy: "require" drops every name_only record (no birth evidence, or only an uncorroborated year or age in another state); matchStates: ["dob_match"] keeps only full-date matches. The default keeps every record, labelled.
  • middleName breaks ties. An agreeing middle name ranks a record higher; a conflicting one ranks it lower. It never removes a record.
  • Spreadsheet input is read as meant. CSV headers such as First Name, last_name, DOB, Zip Code or Street Address name the fields; MM/DD/YYYY dates are read as dates; a one-line "123 Main St, Springfield, IL 62701, USA" is split into its parts. A row that cannot be read is status: "error" with an errorCode, and the rest of the file still runs.
  • Every row runs. A row the service could not reach in time is resent automatically. In the rare case some still could not run, they come back status: "not_run" (not billed) and are listed in unfinished[] to resend. Batches of 100–200 rows answer fastest.

Criminal batch API request and response fields

POST/v1/criminal/batchAuth: X-API-Key

Run up to 1,000 cached searches in one request, one result per row in input order. Each row that runs bills one criminal_call. Live verification is not available in a batch.

Request

Body · application/json

Three forms are accepted: this envelope, a bare JSON array of Query objects, or text/csv with a header row of Query field names and one query per line.

FieldTypeDescription
queries
required
array of QueryThe rows, one Query object each, at most 1,000. A row that fails validation returns status: "error" and the others still run.
include
optional
array of string
one of "sourceData", "coverage", "exclusions"
Applied to every row, as on a search.
page
optional · default 1
integerPage applied to each row's result.
perPage
optional · default 50
integerPage size applied to each row's result. An integer from 1 to 200; a row with any other value comes back as an error row naming perPage.
nameStrategy
optional
string
one of "prefix", "exact"
Surname strategy applied to every row that does not set its own.
state
optional
stringAny Query field can be given here as a default; state is the common one.

Response

200 · application/json

The batch ran. Rows that failed validation are reported in place.

FieldTypeDescription
count
integerNumber of entries in results[], equal to the number of input rows.
results
array of BatchRowOne result per row.
meterEvents
array of MeterEventOne criminal_call per row that ran. Rows that failed validation are not billed.
unfinished
array of objectPresent only when some rows could not be run in time (status: "not_run"): each row's index and the query it was sent with. Resend exactly these rows to complete the file; rows that ran are not repeated or re-billed. Rare: the API itself resends them for up to 14 minutes before answering.
unfinished[].index
integerThe row's position in your input.
unfinished[].query
objectThe row as it was sent, with the batch-wide defaults applied.
Errors
StatusCodeWhen
401—Missing or invalid X-API-Key. Body: GatewayError.
402—Free trial used up, or no active subscription. Body: GatewayError.
413batch_too_largeMore than 1,000 rows.
422bad_batchThe body is not valid JSON, not an array or {queries: [...]}, or a CSV without a header row.
422empty_batchNo rows.
422query_too_broadThe name and filters match more stored records than one search can read in full within its time budget. Refused rather than answered partially; the body also carries detail, saying what to add (a first name or a state). In a batch, that row comes back as an error row instead.
503unavailableCriminal Search could not be reached. Retry with backoff.
504upstream_timeoutCriminal Search took longer than 65 seconds to answer. Retry, or narrow the query.

The BatchRow object — one row's result

One row's result. A row that ran is the search envelope without searchId, meterEvents, usage and resolution, plus index. A row that failed validation carries only index, status: "error", error, zeroed counts and records: [].

Returned or accepted by POST /v1/criminal/batch.

FieldTypeDescription
index
integer0-based position of the row in your input.
status
string
one of "complete", "partial", "error", "not_run"
complete; error when the row failed validation or was refused; not_run when the batch could not reach the row in time — nothing was searched or billed, and the row is listed in unfinished[] to resend. Batch rows run cached only, so partial does not occur.
error
stringPresent only on status: "error": the row's validation message.
errorCode
stringPresent only on status: "error": the machine-readable code, the same one a single search answers for that query (guard_unbounded_query, invalid_dob, query_too_broad, …).
Example "guard_unbounded_query"
counts
CountsTotals for this row.
warnings
array of stringAs on a search. A batch row runs cached, so it is [].
page
integerThe page returned for this row.
perPage
integerThe perPage for this row, echoed back. A row never carries more than 200 records.
totalPages
integerPages at this perPage.
sourceStatus
array of SourceStatus[] on every batch row, which runs cached.
cappedOmittedSources
array of string[]; present for envelope parity.
omittedFields
array of string
one of "sourceData"
As on a search.
records
array of CriminalRecordThis row's matched records.
proof
objectAlways {"status": "none"}.
proof.status
string
one of "none"
Always "none".
coverage
SearchCoverageCoverage for this row's state or county.
legal
LegalThe not-a-consumer-report notice.
matchSummary
MatchSummaryThis row's identity picture over every record: read bestMatch for the row's verdict without paging.

The MatchSummary object — one answer's identity picture

Counted over every record of one search or batch row, not one page, so a bulk caller reads each row's verdict without paging and can measure match quality from aggregates.

Returned or accepted by POST /v1/criminal/search, GET /v1/criminal/searches/{searchId}, POST /v1/criminal/batch.

FieldTypeDescription
bestMatch
string
one of "dob_match", "year_or_age_match_same_state", "year_or_age_match", "name_only", "clear"
The strongest matchTier among the records, or clear when no record matched. Only dob_match confirms a full date of birth; name_only means every record is present on the name alone.
byTier
objectRecords per matchTier; every tier is always listed.
Example {"dob_match":2,"year_or_age_match_same_state":0,"year_or_age_match":1,"name_only":14}
byMatchState
objectRecords per matchState; only the states that occurred are listed.
Example {"dob_match":2,"year_match":1,"no_dob_age_year":14}
peopleByTier
objectDistinct people per matchTier, counting records that share a personGroup once: the same person found by several sources is one person here.
Example {"dob_match":1,"year_or_age_match_same_state":0,"year_or_age_match":1,"name_only":14}
dobContradictedDropped
integerSame-name records dropped because their birth evidence contradicts the query (a different full date or birth year, or an inconsistent age). Never served.
dobPolicyDropped
integerRecords dropped by dobPolicy: "require" (matchTier: "name_only").
middleNameConflicts
integerServed records whose published middle name conflicts with middleName.
byVerdict
objectServed records per identity.verdict: very_likely, likely, possible, unlikely, very_unlikely.
Example {"very_likely":1,"likely":0,"possible":2,"unlikely":0,"very_unlikely":3}

Test criminal batch search in the sandbox

POST /v1/criminal/batch runs on the sandbox with a test key (os_test_…). Send the criminal test names as rows: each row gets the same answer it gets from POST /v1/criminal/search, in input order, never billed.

Base URL
https://sandbox.offendersearch.app Not https://api.offendersearch.app, which takes live keys only.
Test key
In the dashboard, Developers → API keys → Create test key. Test keys begin os_test_; send yours in the X-API-Key header.
POST /v1/criminal/batch
curl -X POST "https://sandbox.offendersearch.app/v1/criminal/batch" \
  -H "X-API-Key: $OFFENDERSEARCH_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '[
      {
        "firstName": "Clear",
        "lastName": "Record"
      },
      {
        "firstName": "Felony",
        "lastName": "Record",
        "dob": "1975-06-15"
      }
    ]'

Try it here

Pick a scenario, edit the request, and run it against the sandbox from this page. The explorer accepts os_test_ keys only and never reaches the live host, so nothing here is billed; the “production” code it copies is for your own backend with a live key.

Create a test key under Dashboard → API keys. Live keys are refused here.
Copy this request as code

Sandbox code uses your test key. Production code calls the live host and is billed per call; run it from your backend with an os_live_… key.

curl -X POST https://sandbox.offendersearch.app/v1/criminal/batch \
  -H "X-API-Key: $OFFENDERSEARCH_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '[ { "firstName": "Clear", "lastName": "Record" }, { "firstName": "Felony", "lastName": "Record", "dob": "1975-06-15" } ]'

Product overview