API quickstart
The REST API serves the same data as the browser and MCP interfaces. Its base URL is https://api.caseharvester.org/api/v1.
Authenticate
Send your token, which starts with chv_, as a bearer credential on every data request:
Authorization: Bearer chv_your_token
Tokens identify one person and must not be shared. The interactive reference can reuse a token already saved in your browser by the app.
Request limits and allowance
A query page may request at most 1,000 rows. For a larger result set, keep the same sort on every page and move through it with successive startRow/endRow windows on POST /query/{table}. That is the only endpoint that pages: counts, aggregates, and exports each answer one whole thing, so a body carrying startRow or endRow is refused there. Send every request body as application/json.
REST queries, counts, aggregates, CSV exports, and MCP tools all count against one rolling 30-day row allowance. Each person on an account has their own, and they all reset on the same date. A full case record export counts 25 rows for each case in the file, however many records the file holds. The allowance is a guardrail against bulk extraction, and ordinary research work rarely reaches it. If your project does, contact [email protected] to have it raised. The license terms describe how it works.
One CSV export may return at most 100,000 rows. An export that needs more rows than you have left in your allowance is refused before any rows count, rather than cut short.
Aggregate without retrieving every row
POST /aggregate/{table} applies the same filters as a row query, then groups the matching records and counts them, or adds up a column the table lists as summable.
Results contain at most 50,000 groups. A true truncated value means additional groups were omitted, and totalGroups says how many the filter produced. Send maxGroups to ask for fewer. A larger figure is refused rather than trimmed. Read each table's groupableColumns, bucketableColumns, and summableColumns from GET /metadata. A field that appears in results is not necessarily one you can group or add up.
Minimum pattern lengths
Substring filters need a minimum number of consecutive letters or digits:
containsrequires at least three consecutive letters or digits.startsWithrequires at least one letter or digit.endsWithrequires at least two consecutive letters or digits.
Shorter patterns would force a slow scan of the whole table, so they are rejected.
Capabilities come from the catalog
A column can appear in results without being sortable or filterable. Each table's sortableColumns lists the columns you can sort by. filterOperators lists the filters each of the table's own columns accepts. caseFilterOperators lists filters on the case a record belongs to, written as case.<column>, for example case.court_system. Read GET /metadata before constructing a query rather than assuming every served field supports every operation.
The public data codebook shows what each field means and how you can filter, sort, and group it.
Complete reference
The public interactive API reference documents the tables and fields every license can see. After you sign in, GET /metadata returns the exact tables and fields available to your account.
Last updated: October 28, 2026