OffenderSearch
Developer guide · Node.js 18+ and TypeScript

Using a background check API in Node.js.

A fetch to /v1/criminal/search returns court, jail, prison and warrant records from 1,934 live jurisdictions; the same key on /v1/search covers 58 sex offender registries. Nothing to install on Node 18+, a sandbox key in minutes, and $0.45 a criminal call or $0.15 a registry call once the 25 free ones are used.

25 free calls · no card

Updated November 8, 2026 · API changelog

POST /v1/criminal/search · sandbox
// Node 18+ — fetch is built in.
const BASE = process.env.OFFENDERSEARCH_BASE ?? 'https://sandbox.offendersearch.app';

const res = await fetch(`${BASE}/v1/criminal/search`, {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.OFFENDERSEARCH_TEST_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "query": {
      "firstName": "Felony",
      "lastName": "Record",
      "dob": "1975-06-15"
    }
  }),
});
const body = await res.json();

console.log(res.headers.get('X-Offendersearch-Environment')); // "sandbox"
console.log(body.sandbox);                 // true
console.log(body.records[0]?.recordType);
One court case: a felony burglary conviction with case number, court, charges, plea, disposition and sentence. DOB-verified.Sandbox people are synthetic; production answers have the same shape.
01

Where the background check API key lives in a Node.js app

On the server, in an environment variable, and nowhere a browser can see it.

The first decision in a JavaScript integration is not which library to use; it is where the call runs. An API key in a React component, a Vue store or a React Native bundle is visible to anyone who opens the network tab, and a search is billed to whoever holds it. So the call lives in a route your front end talks to: an Express handler, a Next.js route handler, a Lambda, a Cloud Run service. Everything on this page assumes that, and the examples read the key from process.env, which node --env-file=.env fills on Node 20 and dotenv fills on 18.

With that settled, the first search is a single fetch. The function below posts a query to /v1/search, puts a 45-second ceiling on the request with AbortSignal.timeout, and reduces the answer to one of four words. The order of the checks is the point: an answer whose status is not complete, or whose counts.sourcesIncomplete is above zero, is incomplete and is never allowed to become clear. After that, a record with matchState === 'dob_match' is a match; any other record is review; no records is clear. “Exact Match” and “Clear Visitor” are the sandbox’s two documented people for exactly those two ends, and the hero block runs either with your own test key.

// Node 18+: fetch is built in. Run with:  node --env-file=.env first.mjs
const BASE = 'https://sandbox.offendersearch.app';      // os_test_ key. Live keys: https://api.offendersearch.app
const headers = { 'X-API-Key': process.env.OFFENDERSEARCH_TEST_KEY, 'Content-Type': 'application/json' };

export async function check(firstName, lastName, dob) {
  const res = await fetch(BASE + '/v1/search', {
    method: 'POST',
    headers,
    body: JSON.stringify({ query: { firstName, lastName, ...(dob && { dob }) } }),
    signal: AbortSignal.timeout(45_000),
  });
  if (!res.ok) throw new Error(res.status + ' ' + JSON.stringify((await res.json()).detail));
  const data = await res.json();
  if (data.status !== 'complete' || data.counts.sourcesIncomplete > 0) return 'incomplete';   // never "clear"
  const verified = data.records.filter((r) => r.matchState === 'dob_match');
  return verified.length ? 'match' : data.records.length ? 'review' : 'clear';
}

console.log(await check('Exact', 'Match', '1980-01-01'));   // match
console.log(await check('Clear', 'Visitor'));               // clear

Switching to production is a host and a key: https://api.offendersearch.app and an os_live_ key, with the same body and the same response shape. Keys, scopes and rotation are in API token example; the end-to-end service is the background check API tutorial.

02

TypeScript types for the background check API response

Interfaces for the registry record and the criminal record, taken from the captured answers, plus a typed fetch helper.

You do not need a package to get types. The interfaces below are the captured sandbox answers written as TypeScript: RegistryRecord for /v1/search and CriminalRecord for /v1/criminal/search, with the envelope around each. Two differences between the products are worth seeing in the types. A registry record’s dob is a string, while a criminal record’s is an object with date, birthYear and dobPrecision, because court and jail sources publish a year or nothing as often as a full date. And the criminal recordType is a union of five strings, so a switch on it is exhaustive: a jail_booking is an arrest, a court_case carries charges with dispositions, a doc_inmate is a prison record, a warrant is open until it is not.

MatchState is the field to branch on, and it includes null: when you send no date of birth there is nothing to verify, and the API says so rather than guessing. The api<T>() helper at the bottom is what the later examples import; it is deliberately small so the retry version in the next section can replace it. If you want the shapes enforced at runtime as well as compile time, the same field list drops into a zod schema and z.infer gives the interface back.

// types.ts: the shapes in the captured sandbox answers, nothing more.
export type MatchState = 'dob_match' | 'year_match' | 'age_match' | 'dob_near_match' | 'no_dob_age_year' | null;

export interface Name { first: string; middle: string; last: string; suffix: string; full: string }
export interface Address { type: string; line1: string; city: string; county: string; state: string; zipcode: string; lat: number | null; lng: number | null }
export interface Offense {
  crime: string; statute: string; tier: string; convictionDate: string; offenseDate: string;
  registrationDate: string; releaseDate: string; caseNumber: string; victimAge: string; convictionCounty: string;
}
export interface RegistryRecord {
  recordId: string; personRef: string; recordType: 'sex_offender';
  matchState: MatchState; matchConfidence: number; matchBasis: string[]; unverified: boolean;
  name: Name; dob: string; birthYear: number | null; dobPrecision: string; age: string; sex: string;
  registrationState: string; addressStates: string[];
  addresses: Address[]; offenses: Offense[];
  stateData: Record<string, unknown>; flags: Record<string, boolean>;
  images: { url: string }[]; sources: Record<string, unknown>[];
}
export interface Counts { records: number; recordsReturned: number; sourcesQueried: number; sourcesComplete: number; sourcesIncomplete: number }
export interface SearchResponse {
  searchId: string; status: 'complete' | 'partial'; counts: Counts; records: RegistryRecord[]; warnings: string[]; capped: boolean;
}

export interface Charge { statute: string; description: string; severity: string; plea: string; disposition: string; dispositionDate: string }

Registry record

Photo, tier, offenses, addresses and stateData from one of the 58 registries; matchConfidence 0.9 or above only with a full date-of-birth match. Field list: record object.

Criminal record

One row per source record with cases[].charges[], currentStatus and provenance in sources; around thirty more keys are always present, empty when the source publishes nothing. Field list: criminal record object.

The envelope

status, counts, warnings and capped on both; page, perPage and totalPages on criminal searches. How to read one: response explained.

03

Retrying a 429 in Node.js with Retry-After and backoff

Four statuses are worth a second attempt. Everything else is an answer.

fetch does not retry, and it does not throw on a 4xx or 5xx, so both decisions are yours. The wrapper below makes them the way the API expects. A 429, 502, 503 or 504, and a thrown network error, get another attempt; a 429 in particular means the request was not run and not billed, and its Retry-After header says how many seconds to wait, so the wrapper sleeps exactly that long. Without the header it doubles a one-second delay with jitter, capped at thirty seconds. A 400, 401, 402 or 422 is final and is thrown with the detail attached, because the body is written to be shown: a sentence on most errors, a list of { loc, msg, type } entries when a field failed validation, and an object with a code on a 429 or an incomplete_no_results 504.

The sandbox is where this code gets exercised: 60 calls a minute and 2,000 a day per test key, and 120 a minute per IP address, each answered with the 429 the limits section shows. Production publishes no per-key number; a 429 there is the service at capacity, which a worker pool of three or four and a /v1/batch call for lists avoid far better than a faster retry loop. The reasoning, with a curl-only version, is in rate limits, retries and idempotency.

const RETRYABLE = new Set([429, 502, 503, 504]);        // 400, 401, 402, 422 answer the same way every time
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const backoff = (attempt) => (Math.min(2 ** attempt, 30) + Math.random()) * 1000;

export async function post(path, body, attempts = 4) {
  for (let attempt = 0; ; attempt++) {
    let res;
    try {
      res = await fetch(BASE + path, { method: 'POST', headers, body: JSON.stringify(body), signal: AbortSignal.timeout(45_000) });
    } catch (err) {                                            // DNS, reset, or the 45 s timeout
      if (attempt + 1 >= attempts) throw err;
      await sleep(backoff(attempt));
      continue;
    }
    if (res.ok) return res.json();
    if (RETRYABLE.has(res.status) && attempt + 1 < attempts) {
      const retryAfter = Number(res.headers.get('Retry-After'));   // seconds; nothing ran, nothing billed
      await sleep(retryAfter ? retryAfter * 1000 : backoff(attempt));
      continue;
    }
    const { detail } = await res.json();     // a sentence, a list of { loc, msg, type }, or { code, retryAfterSeconds }
    throw Object.assign(new Error(res.status + ': ' + JSON.stringify(detail)), { status: res.status, detail });
  }
}

try {
  await post('/v1/search', { query: { lastName: 'Visitor' } });     // a surname alone is refused
} catch (e) {
  console.log(e.status, e.detail);                                   // 422 and a sentence for the user
}
What fetch seesdetailWhat post() does
res.ok, 200absentReturns the parsed body
401 or 402A sentence about the key, or about billingThrows; fix the key or add billing
422A sentence, or a list of { loc, msg, type }Throws; show the sentence, fix the request
429, 502, 503, 504{ code, message, retryAfterSeconds } on a 429Sleeps Retry-After or backoff, resends
TypeError / AbortErrornone: the response never arrivedTreats it as retryable

Every code and both envelopes: errors reference and API errors, explained.

04

Verifying a webhook in Express with crypto.timingSafeEqual

Monitor alerts and FCRA events are signed in X-Offendersearch-Signature. The receiver must see the raw bytes.

When you create a monitor on a person, the 201 response carries channels.webhookSecret once. Every alert posted to your URL afterwards is signed with it: the header is t=<unix seconds>,v1=<hex>, and v1 is HMAC-SHA256 over the string t + '.' + body. The Express trap is express.json(): it parses the body before your handler runs, and JSON.stringify of the parsed object is not byte-for-byte the body that was signed, so the signature never matches. Mount express.raw() on the webhook route alone and verify the Buffer it gives you.

Rebuild the string with the t from the header, not with Date.now(), then refuse a timestamp more than five minutes away: that is the replay window. Compare with crypto.timingSafeEqual, which needs two buffers of equal length, hence the length check in front of it. The delivery body has type: 'monitor.alert'; its event field is new, changed or removed, and alertId is the key to de-duplicate deliveries on. Answer 200 before you do the work; a slow handler is retried as a failure.

import express from 'express';
import { createHmac, timingSafeEqual } from 'node:crypto';

const SECRET = process.env.OFFENDERSEARCH_WEBHOOK_SECRET!;   // whsec_… from the 201 that created the monitor

export function verify(header: string | undefined, raw: Buffer, toleranceSeconds = 300): boolean {
  if (!header) return false;
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=', 2) as [string, string]));
  const t = Number(parts.t);
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;   // replay window
  const expected = createHmac('sha256', SECRET).update(t + '.').update(raw).digest('hex');
  const given = parts.v1 ?? '';
  return expected.length === given.length && timingSafeEqual(Buffer.from(expected), Buffer.from(given));
}

const app = express();
app.post('/hooks/offendersearch', express.raw({ type: 'application/json' }), (req, res) => {
  const raw = req.body as Buffer;                                       // express.raw, not express.json
  if (!verify(req.get('X-Offendersearch-Signature'), raw)) return res.status(400).send('bad signature');
  const event = JSON.parse(raw.toString('utf8'));     // { type: 'monitor.alert', event: 'new', alertId, monitorId, … }
  res.sendStatus(200);                                // answer first; de-duplicate on event.alertId, then do the work
});
app.listen(3000);

The webhook tester signs a sample event with a secret you choose so you can test the route before a monitor exists; webhook example adds retries and de-duplication, API signature has a known-answer vector, and the Monitoring API covers create, rotate and the alert list.

05

The same webhook receiver as a Next.js route handler

request.text() instead of express.raw(); the verify function does not change.

In the Next.js App Router a route handler receives a standard Request. The raw body is await request.text(), which is why the handler never calls request.json() first: a body stream can be read once. Pin the handler to runtime = 'nodejs' so node:crypto and Buffer are available; on the Edge runtime the same HMAC is built with crypto.subtle, and the check otherwise reads the same. Return before the work runs, through a queue or Next 15’s after(), so the sender sees a fast 200.

One callback on the platform is not signed: the optional webhookUrl on POST /v1/searches, the asynchronous registry search, which authenticates with a token in the URL instead and should be treated as a nudge to GET the result with your own key. The async and webhooks page draws the line between the two, and monitor a person with webhooks is the complete walkthrough from create to first alert.

// app/api/hooks/offendersearch/route.ts
import { verify } from '@/lib/offendersearch-webhook';   // the verify() from the Express example, unchanged

export const runtime = 'nodejs';                           // node:crypto; read the body as text, never request.json()

export async function POST(request: Request) {
  const raw = await request.text();
  const header = request.headers.get('X-Offendersearch-Signature') ?? undefined;
  if (!verify(header, Buffer.from(raw, 'utf8'))) return new Response('bad signature', { status: 400 });
  const event = JSON.parse(raw) as {
    type: 'monitor.alert'; event: 'new' | 'changed' | 'removed'; alertId: string; monitorId: string;
  };
  // hand event off to a queue (or Next 15's after()) and return before the work runs
  return Response.json({ ok: true, alertId: event.alertId });
}
06

Criminal records in Node.js: an async generator over pages

for await over page and totalPages, with the charge-level fields that decide what a hit means.

A criminal search is paged: perPage takes 1 to 200 at the top level of the request, the response reports totalPages, and a page past the end returns an empty records array. An async generator hides all of that behind for await, and because it yields records rather than pages the calling code reads like a list. A name with a date of birth almost always fits in one page; a bare common surname is the case this is for.

The loop prints the disposition next to each charge rather than one line per record, because that is where the meaning is. The felony test person has one closed Ohio case with a guilty plea to burglary and a dismissed theft count; a reviewer who sees “one criminal record” learns less than one who sees those two lines. lastName is required on this endpoint, and the criminal records API page lists the jail, prison, court and warrant sources by state; pagination covers the capped flag on very large answers.

import { api, type CriminalRecord, type CriminalSearchResponse } from './types';

export async function* criminalRecords(query: Record<string, string>, perPage = 100): AsyncGenerator<CriminalRecord> {
  for (let page = 1; ; page++) {                      // perPage is 1-200; page and perPage sit at the top level
    const data = await api<CriminalSearchResponse>('/v1/criminal/search', { query, page, perPage });
    yield* data.records;
    if (page >= data.totalPages) return;
  }
}

for await (const rec of criminalRecords({ firstName: 'Felony', lastName: 'Record', dob: '1975-06-15' })) {
  console.log(rec.recordType, rec.currentStatus, rec.matchState);          // court_case on_probation dob_match
  for (const c of rec.cases) {
    for (const ch of c.charges) console.log(' ', c.caseNumber, ch.description, ch.severity, ch.disposition);
  }
  // SBX-CR-2015-000123 Burglary felony Guilty
  // SBX-CR-2015-000123 Theft misdemeanor Dismissed
}

Why the surname anchors the search and the date of birth verifies it: search criminal records by name and DOB; the arrest-only and in-custody test people are on the inmate search API page.

07

Batch background checks in Node.js from a CSV file

1,000 people in one POST /v1/batch, answered in input order and joined by index.

For a file of people, one request per row is the slow way and the way most likely to meet a 429. The batch endpoint takes a JSON array of queries, or an envelope whose queries key holds them and whose other keys apply to every row, and answers with a results array in the same order. Each result carries its index, so the join back to your rows is positional and never by name. A row that fails validation is reported in place as status: 'error' with a sentence, and the rest of the batch still runs. Each row is billed as one call at the normal rate.

The script reads a three-column CSV with node:fs, drops empty cells so a missing date of birth is simply not sent, and walks the file in slices of 1,000. It reuses the post() wrapper from the retry section, so a 429 between slices is handled. The batch reference documents the text/csv body as an alternative to building JSON, and bulk background check from a CSV turns this into a command-line tool with a results file.

import { readFile } from 'node:fs/promises';

// people.csv:  firstName,lastName,dob  (an empty dob is left out of the query)
const [head, ...lines] = (await readFile('people.csv', 'utf8')).trim().split('\n');
const keys = head.split(',');
const queries = lines.map((l) => Object.fromEntries(l.split(',').map((v, i) => [keys[i], v]).filter(([, v]) => v)));

for (let i = 0; i < queries.length; i += 1000) {                          // 1,000 rows a call
  const { results } = await post('/v1/batch', { queries: queries.slice(i, i + 1000), match: 'balanced' });
  for (const row of results) {
    const person = queries[i + row.index];                                 // input order, joined by index
    if (row.status === 'error') { console.log(person.lastName, 'refused:', row.error); continue; }
    console.log(person.lastName, row.status, row.counts.records);         // Visitor complete 0
  }
}
08

Data API or FCRA order: which Node.js build this is

The endpoints above are public-records lookups. A hiring or housing decision runs through a different one.

Path 1

Data API, not FCRA

$0.15a sex offender search, $0.45 a criminal search; 25 free, no card
  • For: visitor and volunteer screening, trust and safety, research, monitoring, and software that shows a public record to the person who asked for it.
  • Must not decide: whether someone is hired, housed, insured or given credit. The response is a public-records lookup, not a consumer report, and the key is not approved for those uses.
  • Example: An admissions desk screens a visitor against the registries before a visit; no hiring, housing or credit decision is involved.

Self-serve: get a key, then POST /v1/search or /v1/criminal/search.

Path 2

FCRA Partner Access

$4.95per order, searches and live checks included, no court fees
  • Built in: end-user registration with a permissible purpose, consent on every order, the pre-adverse and adverse-action notices with the consumer’s copy, and a consumer portal.
  • Disputes: a dispute endpoint; the record is re-checked with the registry or court that holds it, with an outcome inside 30 days, and a correction reaches every partner that received it.
  • Example: A screening company furnishes a report an employer or landlord will act on; the order runs the consent, notice and dispute steps.

Under a written agreement: Request FCRA Partner Access.

The records can be the same; the process around them is not. How the program works: FCRA Partner Access · the orders endpoint: FCRA orders API · reference and statute citations: FCRA docs. This page describes the product, not legal advice.

09

Background check API pricing for a Node.js service

Per call and per month, from the constants the pricing page uses.

ItemPriceUnit
Sex offender search$0.15per search, the first 2,000 sex offender searches in a calendar month
Criminal records search$0.45per search, the first 2,000 criminal searches in a calendar month
Sex offender volume rate$0.11per search past 2,000 sex offender searches in a calendar month
Criminal volume rate$0.40per search past 2,000 criminal searches in a calendar month
Free to start25 callsonce per account, on production data, no card
Sandbox$060 calls a minute and 2,000 a day per test key
Person monitor$3.00per person a month

No minimum on search. Managed FCRA has a $150 monthly minimum and the Map API its own $300. No seats, no platform fee, no per-state fee; a batch row is billed as one call.

Worked examples by volume: background check API pricing · every rate: pricing.

10

Rate limits, the response cap and what is out of scope

The numbers your retry code will meet, and the records no endpoint returns.

LimitValue
Sandbox, per test key60 calls a minute, 2,000 a day; nothing billed
Production, per keyNo published ceiling. A 429 only when the service is at capacity, with Retry-After; a 429 is never billed
Records per responseUp to 4,000 in one answer; above that capped: true, and perPage pages through the rest
Batch1,000 rows a call; a failing row is reported in place and never stops the batch
DeadlinedeadlineMs bounds the wait for slow jurisdictions; an unanswered one is named in sourceStatus and the answer says partial
EndpointsPOST /v1/search and /v1/criminal/search; one X-API-Key header
  • No civil cases, no traffic citations. Criminal records only: jail bookings, prison custody, court cases with dispositions, warrants, and the registries.
  • No international records. US county, state and federal sources, and the 58 US registries.
  • Not a consumer report. A hiring, housing, credit or insurance decision runs as an order through FCRA Partner Access, not through the standard key.
  • No SSN on the standard key, no credit, no verifications, no drug or driving records. Scope comes from the name, the date of birth and the places you already hold; only an FCRA order can trace the address history from an SSN.
  • No runtime-specific quota. Node, Bun, Deno and the Edge runtime share the same per-key and per-IP limits.

Retry rules and backoff: rate limits, retries and idempotency · every status code: errors.

What a rate-limit answer looks like
HTTP/1.1 429 Too Many Requests
Retry-After: 12
Content-Type: application/json

{
  "detail": {
    "code": "overloaded",
    "retryAfterSeconds": 12
  }
}
Nothing was searched and nothing was billed; wait retryAfterSeconds and send the same request again.
11

@offendersearch/sdk for Node.js and TypeScript, on release

A typed client, the same verifier and a CLI, publishing with the first registry release. The fetch code above is the integration today.

@offendersearch/sdk is written and tested in the repository (packages/sdk-node) and publishes to npm with the first registry release; until that day npm install @offendersearch/sdk does not resolve, which is why this page is written against fetch. The package is those same calls with names: client.search(), client.criminal.search() and the async iterator client.criminal.searchPages(), client.batch(), client.searchAsync() with client.wait(), client.monitors.create(), and verifyWebhook(), which is the Express verify above with timingSafeEqual inside. It ships ESM and CommonJS builds with bundled types, retries 429, 502, 503 and 504 while honouring Retry-After, and rejects with typed errors that carry the status, the API’s code and the request id. An offendersearch CLI installs with it.

The SDK page tracks the release and lists the Python client; the Python version of this guide is background check API Python. The endpoint pages that explain the data behind the code are the background check API hub, the sex offender API for the registry endpoint, and the free background check API page on the 25 free calls and the sandbox. The Postman collection carries every request on this page, and the MCP server exposes the same endpoints to an agent.

// npm install @offendersearch/sdk   publishes to npm with the first registry release; until then the
//                                    install does not resolve and the fetch code above is the integration.
import { OffenderSearch, verifyWebhook } from '@offendersearch/sdk';

const client = new OffenderSearch();                        // reads OFFENDERSEARCH_API_KEY; os_test_ → sandbox
const r = await client.search({ firstName: 'Exact', lastName: 'Match', dob: '1980-01-01' });
for await (const page of client.criminal.searchPages({ lastName: 'Record' }, { perPage: 100 })) { /* page.records */ }
const batch = await client.batch([{ firstName: 'Clear', lastName: 'Visitor' }], { match: 'balanced' });
const job = await client.searchAsync({ firstName: 'Clear', lastName: 'Visitor' });
const done = await client.wait(job.searchId);
const m = await client.monitors.create({
  product: 'criminal', type: 'person',
  person: { firstName: 'Felony', lastName: 'Record', dob: '1975-06-15' },
  channels: { webhookUrl: 'https://example.com/hooks/offendersearch' },
});
verifyWebhook(m.channels.webhookSecret, header, rawBody);   // the same check as the Express receiver
  • Node 18 or newer, or any runtime with fetch and node:crypto; types are bundled, no @types package.
  • An os_test_ key targets the sandbox and an os_live_ key production, with no base URL to configure.
  • Source is published with the first release; the examples on this page are the reference until then.
FAQ

Background check API Node.js questions

Does this work on Node 16, or with require() instead of import?

The examples need the global fetch that arrived in Node 18; on 16, install undici and import fetch from it. CommonJS is fine: fetch and AbortSignal are globals, and top-level await is the only thing to move into an async main(). The SDK, when it ships, has a CommonJS build.

Why does my webhook signature fail even though the secret is right?

Almost always because the body was parsed before it was verified. express.json(), a framework body parser or a logging middleware that re-serialises JSON changes the bytes. Verify the raw Buffer or the raw text, use the timestamp from the header, and confirm your server clock is within five minutes of real time.

Can I run a search inside a Lambda, Vercel or Cloud Functions handler?

Yes, with the function timeout in mind. A search usually answers in well under a second, but the API will keep working up to about 40 seconds to return a complete answer rather than a partial one. Set your function’s timeout above that, or use POST /v1/searches and let a callback or a later GET collect the result.

Will the fetch examples run on Bun, Deno or Cloudflare Workers?

The search, batch and criminal examples use only fetch and JSON, so they run anywhere those exist. The webhook verifier imports node:crypto; Bun and Deno support that import, and on Workers or the Edge runtime you rebuild the HMAC with crypto.subtle and compare the hex in constant time.

How do I get TypeScript types without waiting for the SDK?

Copy types.ts from this page; it is the captured response written as interfaces, and every key in it exists on production answers. For runtime validation, mirror the same fields in a zod schema and infer the type from it, so a changed field fails loudly in one place.

My tests hit a 429 on the sandbox below 60 calls a minute. What is happening?

A second ceiling applies per IP address, 120 requests a minute, shared by every test key on that address. CI runners and office networks often sit behind one. Serialise the test suite’s API calls or run them with a concurrency of two or three, honour Retry-After, and note that an account can hold 3 active test keys at a time; test a background check integration shows the fixture approach.

Run the first Node.js background check in one file

Create a test key, put it in .env, and run first.mjs with node --env-file. The sandbox answers from fixed test people and bills nothing.