LAW API

Build on intelligence.

The LAW API gives approved platforms access to 1,900,000+ curated legal passages, 18,124,047 citation references, 87,085 cross-references, source-reader links, law-guide element maps, and citation verification.

Built for a Record That Has to Hold

A legal integration is only as good as what it can show a reader afterwards. The API is shaped around that: each answer carries where it came from, and each failure says plainly that it failed.

Every Answer Names Its Source

A search result carries the title and source its passage comes from, so an integration can show its work instead of asserting it.

Every Citation Gets a Status

Verify returns each citation it found as verified, partial, not found or error, with the passages it matched, and a summary score in which a partial match counts as half.

Keys Are Kept as a Fingerprint

A key is stored only as its SHA-256 hash, so the raw key is shown once and never again. A revoked key is refused on its next request.

No Unmetered Search

If usage metering cannot be reached, search pauses with a 503 rather than run without a record of what it spent against your credits.

Authentication

All API requests require an API key passed via the X-API-Key header. Keys inherit your subscription tier and its rate limits.

X-API-Key: law_your_key_here

Generate a key from your dashboard. Raw keys are shown once — store them securely.

Endpoints

GET/api/v1/search

Full-text search across 1,900,000+ legal passages with citation-aware ranking, law-guide context, source-reader links, and budget controls.

qstringrequiredSearch query
limitnumberoptionalResults to return (default 10, max 50)
GET/api/v1/breakdown

Tiered legal analysis of a statute with plain-English explanation and case law.

statutestringrequiredStatute citation (e.g. 42 USC 1983)
tierstringoptionalBreakdown depth — follows your subscription tier (essential · practitioner · enterprise)
POST/api/v1/verify

Verify citations in a text block against the Gage primary source library.

textstring (body)requiredText containing citations to verify

Code Examples

Search endpoint — replace law_your_key with your actual key

cURL
curl -H "X-API-Key: law_your_key" \
  "https://law.gagegreengroup.com/api/v1/search?q=habeas+corpus"
JavaScript
const res = await fetch(
  'https://law.gagegreengroup.com/api/v1/search?q=habeas+corpus',
  { headers: { 'X-API-Key': 'law_your_key' } }
)
const data = await res.json()
// { results: [{ title, source, excerpt, lawGuide: { answer, elements, proofPath, neuralMap } }] }
Python
import requests

r = requests.get(
    'https://law.gagegreengroup.com/api/v1/search',
    headers={'X-API-Key': 'law_your_key'},
    params={'q': 'habeas corpus'}
)
data = r.json()  # results may include lawGuide answer, element map, and proof chain context

What Verify Recognises

Send between 20 and 50,000 characters of a brief, a letter or a memo. Verify finds the citations in it and checks each against the primary source library.

Cases

Party names joined by “v.”, with the reporter volume, page and year when present.

Statutes and Regulations

United States Code and Code of Federal Regulations sections, and the named federal consumer-credit and debt-collection acts.

Court Rules

Rule numbers with their subdivisions, including the federal rules of civil procedure, evidence and appellate procedure.

Dictionary and Equity

Black’s Law Dictionary references, and quoted maxims of equity.

Errors

Every error is JSON with an error field that says what went wrong, and the HTTP status tells your code what to do next.

400
The request is malformed: no statute to break down, a body that is not JSON, or text under 20 or over 50,000 characters.
401
The X-API-Key header is missing, unknown or revoked.
403
The key’s membership does not include API access. The reply names the membership that does, in upgrade_to.
413
The verify body is larger than 128 KB.
429
The key has made more than 20 requests in the last minute. Wait and retry.
502 / 503
A dependency could not answer, or search paused because usage metering was unreachable. Nothing is returned as if it had succeeded.

Access

Individual

Access
Dashboard workspace
API rate limit
—

Team

Access
Dashboard workspace and API
API rate limit
Included

Enterprise

Access
Full programmatic API
API rate limit
20 / min

Programmatic API access is included with the Enterprise tier. Every key shares a 20-requests-per-minute limit.

Ready to build?

Generate your API key from the dashboard and start integrating in minutes.