# Live-only court and registry searches

> One boolean on the live block you already send. The answer carries only what the courts, jails and registries returned at the moment of the request — no stored records — at the price of a live search.

- **HTML:** https://offendersearch.app/docs/guides/live-only-searches
- **Base URL (live):** https://api.offendersearch.app — live keys (`os_live_…`)
- **Base URL (sandbox):** https://sandbox.offendersearch.app — test keys (`os_test_…`), never billed
- **Authentication:** `X-API-Key` request header
- **OpenAPI:** https://offendersearch.app/openapi.json · https://offendersearch.app/openapi.yaml
- **Docs index for agents:** https://offendersearch.app/llms.txt

## What a live-only search API request returns

Both search APIs answer from the continuously updated records we hold by default, and a `live` block re-checks the jurisdictions you name at the source during the request, then merges what they return with the stored answer. `live.liveOnly` changes one thing: with `"liveOnly": true`, the stored records are left out. The answer carries only the records the live checks of **this** request returned, scored by the same matcher.

|  | Live search (`liveOnly` omitted or `false`) | Live-only search (`liveOnly: true`) |
| --- | --- | --- |
| `records` | Stored records plus live results; a live result supersedes the stored copy of the same record | Only records a live check returned in this request |
| `sourceStatus[]` | Sex offender: one row per registry searched, plus one row per live registry. Criminal: one row per live source | One row per source checked live |
| A live check that did not finish | Criminal: answered from stored records when they are in scope (`answeredFrom: "on_file"`) | Reported `incomplete`; never answered from stored records |
| `counts` | Over the merged answer | Over the live answer only |
| Response flag | — | `liveOnly: true` on the body (and on the async acknowledgement) |
| Price | Search price plus $0.02 per completed live source, $2.00 ceiling | The same |

The flag is off by default. A request that omits it, or sends `false` or `null`, is answered exactly as before, byte for byte.

## When CRAs and screening teams use live-only court checks

Consumer reporting agencies and in-house screening teams that run their own FCRA compliance program often want the record checked at the source at report time, and want the answer to contain only what the source returned. A live-only search is built for that: the response is a statement of what each named court, jail or registry answered during the request, with a status row for every one of them.

- A county court or statewide check ordered for a specific report, where the file should show what the source returned that day.
- A re-check before an adverse decision, run against the jurisdictions where a stored search found a record.
- A registry check at the time of a placement, admission or volunteer start.

Use the default (stored plus live) when you want every record we hold for the person as well as the live confirmation. Use the stored search alone for volume screening. How you use a result, and the procedures around it, remain yours: the API supports teams doing their own FCRA compliance and does not make a report compliant on its own.

## Live-only criminal court search request

Name the jurisdictions in `live.jurisdictions` with their public codes (`GET /v1/criminal/jurisdictions?live=true` lists the ones that can be checked live) and add `"liveOnly": true`. A `live.websites` entry works as it does on any live search.

**cURL**
```bash
curl -s https://api.offendersearch.app/v1/criminal/search \
  -H "X-API-Key: $OFFENDERSEARCH_KEY" -H "Content-Type: application/json" \
  -d '{"query": {"lastName": "Rivera", "firstName": "Jordan", "dob": "1988-04-12"},
       "live":  {"jurisdictions": ["TX-HARRIS", "TX-DOC"], "liveOnly": true}}'
```

**Python**
```python
import os, requests

BASE = "https://api.offendersearch.app"
H = {"X-API-Key": os.environ["OFFENDERSEARCH_KEY"]}

r = requests.post(BASE + "/v1/criminal/search", headers=H, timeout=90, json={
    "query": {"lastName": "Rivera", "firstName": "Jordan", "dob": "1988-04-12"},
    "live": {"jurisdictions": ["TX-HARRIS", "TX-DOC"], "liveOnly": True},
})
r.raise_for_status()
body = r.json()            # 200: the answer; 202: a job to poll (see below)
```

**JavaScript**
```javascript
const res = await fetch('https://api.offendersearch.app/v1/criminal/search', {
  method: 'POST',
  headers: { 'X-API-Key': process.env.OFFENDERSEARCH_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    query: { lastName: 'Rivera', firstName: 'Jordan', dob: '1988-04-12' },
    live: { jurisdictions: ['TX-HARRIS', 'TX-DOC'], liveOnly: true },
  }),
});
const body = await res.json();   // 200: the answer; 202: a job to poll (see below)
```

*Response (trimmed)*
```json
{
  "searchId": "crs_7f2a1c9e0b4d6a8f1e23",
  "status": "complete",
  "liveOnly": true,
  "counts": { "records": 1, "recordsReturned": 1, "sourcesQueried": 2, "sourcesComplete": 2, "sourcesIncomplete": 0 },
  "warnings": [],
  "sourceStatus": [
    { "code": "TX-HARRIS", "ok": true, "incomplete": false, "incompleteReason": null, "records": 1,
      "lastCheckedAt": "2026-11-29T15:04:11+00:00", "live": true },
    { "code": "TX-DOC", "ok": true, "incomplete": false, "incompleteReason": null, "records": 0,
      "lastCheckedAt": "2026-11-29T15:04:12+00:00", "live": true }
  ],
  "records": [ { "recordCategory": "court", "liveChecked": true, "liveResult": "confirmed_live", "matchState": "dob_match" } ],
  "usage": { "liveChecks": 2, "liveChargeUsd": 0.04, "capped": false, "display": "2 live checks · $0.04" },
  "meterEvents": [ { "kind": "criminal_call", "quantity": 1 },
                   { "kind": "criminal_live_source", "quantity": 2, "chargeCeilingUsd": 2.0 } ]
}
```

With `"scope": "matched"` instead of a list, the stored search still runs, but only to choose which jurisdictions to check; none of its records is returned. If it finds nothing, there is nothing to check and the request is refused with `422 no_live_sources`.

## Live-only sex offender registry search request

The same field on `POST /v1/search`. `live.jurisdictions` takes registry ids or two-letter codes; a two-letter code names that state's or territory's own registry.

```bash
curl -s https://api.offendersearch.app/v1/search \
  -H "X-API-Key: $OFFENDERSEARCH_KEY" -H "Content-Type: application/json" \
  -d '{"query": {"firstName": "Jordan", "lastName": "Rivera", "dob": "1988-04-12"},
       "live":  {"jurisdictions": ["TX", "OK"], "liveOnly": true}}'
```

*Response (trimmed)*
```json
{
  "searchId": "srch_4bd856ef486fc1bff31f8454",
  "status": "complete",
  "liveOnly": true,
  "counts": { "records": 0, "recordsReturned": 0, "sourcesQueried": 2, "sourcesComplete": 2, "sourcesIncomplete": 0, "sourcesSkippedByScope": 0 },
  "sourceStatus": [
    { "source": "TX", "status": "complete", "matched": 0, "fromCache": false, "incomplete": false, "incompleteReason": null },
    { "source": "OK", "status": "complete", "matched": 0, "fromCache": false, "incomplete": false, "incompleteReason": null }
  ],
  "records": [],
  "warnings": [],
  "usage": { "liveChecks": 2, "liveChargeUsd": 0.04, "capped": false, "display": "2 live checks · $0.04" },
  "meterEvents": [ { "kind": "live_source", "quantity": 2, "chargeCeilingUsd": 2.0 } ]
}
```

Every `sourceStatus` row is a live row (`fromCache: false`). This answer is a clear result for TX and OK: both checks completed and neither returned a match. `live.liveOnly` cannot be combined with `live.evidence`; send them as two requests.

## Reading sourceStatus and counts on a live-only answer

> **An empty answer is not always a clear one.** A live check can fail: the source is down, slow, or does not answer the request. A live-only answer has no stored records to fall back on, so a failed check leaves that jurisdiction **not determined**. Read `counts.sourcesIncomplete` before reading `records`.

| What you see | What it means | What to do |
| --- | --- | --- |
| `status: "complete"`, `counts.sourcesIncomplete: 0`, `records: []` | Every named source completed its check and returned no match. | Clear for the jurisdictions checked — and only those. |
| `status: "partial"`, `counts.sourcesIncomplete > 0`, `records: []` | At least one source did not finish. Its row has `incomplete: true` and an `incompleteReason`. | Not a clear result. Retry the incomplete jurisdictions, or report them as not determined. |
| Records present, `counts.sourcesIncomplete > 0` | Real live results from the sources that finished; the rest are not determined. | Review the records, and carry the incomplete jurisdictions with the outcome. |
| Records present, `counts.sourcesIncomplete: 0` | Every source finished; these are the records they returned. | Review each record (`matchState`, `matchConfidence`, `sources[].recordUrl`). |

`warnings[0]` begins `INCOMPLETE SEARCH:` and names the sources whenever one fell short. `incompleteReason` says whether a retry can help: `timeout` and `source_down` usually clear on a later attempt; `not_searched` means that source cannot be checked live in this request. A failed source is never billed.

*A decision function for either API*
```python
def live_only_outcome(body):
    if body.get("liveOnly") is not True:
        raise ValueError("the request did not run live-only")
    incomplete = [s.get("code") or s.get("source")
                  for s in body["sourceStatus"] if s.get("incomplete")]
    if body["records"]:
        return {"outcome": "review", "notDetermined": incomplete}
    if incomplete:
        return {"outcome": "not_determined", "notDetermined": incomplete}
    return {"outcome": "clear"}
```

## Sync and async live-only searches and polling

The sync and async rule is the one every live search follows: up to two sources that can answer inside the request run inline; more sources, or any source that can only be checked in the background, become a job. The job carries the flag, so its result is live-only too.

| Endpoint | Inline answer | Job acknowledgement | Poll |
| --- | --- | --- | --- |
| `POST /v1/criminal/search` | `200` with the answer | `202` with `searchId`, `status: "pending"`, `mode: "async"`, `liveSourcesRequested`, `poll`, `liveOnly: true` | `GET /v1/criminal/searches/{searchId}`; the answer is in `result` once `status` is `complete` |
| `POST /v1/search` | `200` with the answer | `200` with `status: "pending"`, `mode: "async"`, `liveSourcesRequested`, `poll`, `liveOnly: true` | `GET /v1/searches/{searchId}` until `status` is `complete` or `partial` |
| `POST /v1/searches` | — | `202` with `searchId`, `resultsUrl`, `liveOnly: true` | `GET /v1/searches/{searchId}` |

*Submit, then poll (criminal)*
```python
import time

def criminal_live_only(query, jurisdictions):
    r = requests.post(BASE + "/v1/criminal/search", headers=H, timeout=90,
                      json={"query": query, "live": {"jurisdictions": jurisdictions, "liveOnly": True}})
    r.raise_for_status()
    if r.status_code == 200:
        return r.json()
    poll = r.json()["poll"]                      # 202: the job carries liveOnly
    while True:
        time.sleep(3)
        job = requests.get(BASE + poll, headers=H, timeout=30).json()
        if job["status"] == "complete":
            return job["result"]                 # result.liveOnly is true
```

Keep the `searchId` from the first response before you do anything else. On the criminal API, `filters` and `locations` work with live checks of up to two sources; a live-only search that must run as a job is answered `422 filters_with_async_live` when they are sent, as on any live search.

## Live-only search billing

There is no separate price. A live-only search is billed exactly as the same live search without the flag:

- The search itself at the regular search price: one `call` on the sex offender API, one `criminal_call` on the criminal API.
- Plus **$0.02 per live source that completes** (`live_source` / `criminal_live_source`), to a **$2.00** ceiling per search. The ceiling is a price cap, not a source limit: every source you name is checked, and `usage.liveChecks` reports the true count.
- A live check that fails or does not finish is reported in `sourceStatus[]` and is **not billed**.

`usage` and `meterEvents[]` on the answer show what the search metered. Rates for plan accounts follow the plan. See [pricing](/pricing).

## Live-only search errors

| Status | Code | When |
| --- | --- | --- |
| `422` | `invalid_live` | `live.liveOnly` is not a JSON boolean (`"true"`, `1`), or `liveOnly` was sent at the top level instead of inside `live`. Sex offender only: combined with `live.evidence`. |
| `422` | `no_live_sources` | Nothing resolves to a live source: an empty `live.jurisdictions`, a `live` block with neither `jurisdictions` nor `scope`, `scope: "matched"` when the stored search found no records, or (criminal) every `live.websites` entry unsupported. |
| `422` | `filters_with_async_live` | Criminal: `filters` or `locations` with a live check that runs as a job. |

Body shapes follow each API: the criminal API answers `{"error": {"code", "message"}}`; the sex offender API answers `{"detail": {"code", "message"}}`, except a top-level `liveOnly`, which is a field-validation `detail[]` entry whose `type` is `invalid_live`. Nothing is searched or billed on any of these. Every other refusal is the same as on a live search: see [errors](/docs/errors) and [criminal errors](/docs/criminal/errors).

## Testing live-only searches in the sandbox

The sandbox (`https://sandbox.offendersearch.app`, an `os_test_` key) accepts the same field and answers the same way, deterministically: each named source returns its own sample people and nothing else, and nothing is billed. **Name Only** on `POST /v1/search` with `"jurisdictions": ["GA"]` returns one of its three sample records; **Possible Match** on `POST /v1/criminal/search` with `"jurisdictions": ["NV-SAMPLE"]` returns one of three. Name three sources to see the job and the poll. See [Sandbox](/docs/sandbox).

## Related

- [Regular vs. live searches](https://offendersearch.app/docs/guides/sex-offender/regular-vs-live)
- [Cached vs. live verification](https://offendersearch.app/docs/guides/criminal/cached-vs-live)
- [Regular and live search](https://offendersearch.app/docs/freshness)
- [Criminal search](https://offendersearch.app/docs/criminal/search)
- [Criminal async live jobs](https://offendersearch.app/docs/criminal/async)
- [Result completeness](https://offendersearch.app/docs/result-completeness)
