17 CFR 240.10b5-1 or 42 U.S.C. 1983, resolve it
to the exact section, confirm the returned citation matches what you asked for,
and pull the authoritative text. This is the reliable way to verify a citation an
LLM produced, or to expand a citation your users typed into full, linkable law.
Endpoints used: POST /statutes/search, GET /statutes/section/{actId}/body.
The flow
1
Search with the citation as the query
Send the citation string straight to
POST /statutes/search. Scope
corpusType when the citation tells you the corpus: CFR for a ... CFR ...
cite, USC for ... U.S.C. ..., STATE (with a state code) for a state
statute.2
Confirm the top result matches
Compare the top result’s
citation and citationShort against your input. If
they do not line up, treat the citation as unresolved rather than guessing.3
Pull the authoritative text
On a confirmed match, call
GET /statutes/section/{actId}/body for the full
plain text and a link to the official government source.Step 1: search with the citation string
42 U.S.C. 1983:
Step 2 and 3: confirm the match, then fetch text
Confirm before you trust. Normalize both the input and the returnedcitation / citationShort (strip the section sign, punctuation, and case) and
require them to line up. If nothing matches, flag the citation as unresolved so a
human, or the calling model, knows not to rely on it.
Python
Flagging what you cannot resolve
Return an unresolved flag, not a guess
Return an unresolved flag, not a guess
When search returns nothing, or the top result’s
citation does not match, do
not fall through to a loosely related section. Return an explicit
{"resolved": false, ...} result. If you are verifying a citation an LLM
produced, an unresolved flag is exactly the signal that the model may have
fabricated it.Scope by corpus to cut false matches
Scope by corpus to cut false matches
The corpus token is usually right there in the citation.
... CFR ... means
corpusType: "CFR"; ... U.S.C. ... means "USC"; a state code section
means "STATE" with the two-letter state. titleNumber is accepted only
with USC or CFR and can pin the title further. Scoping keeps a same-numbered
section in the wrong corpus from ranking first.404 on the body
404 on the body
If
GET /statutes/section/{actId}/body cannot return text, it responds with
available: false (or a 404). Treat that as unresolved-with-metadata: you
have a confirmed actId and citation, but no authoritative text to quote
yet.Related
Ground an LLM answer (RAG)
Use verified citations as grounding sources for an LLM answer.
Map a requirement to the law
Go from a plain-language obligation to the governing sections.
Grounding LLMs
Why citation verification belongs in every legal AI pipeline.
Statute lookup chatbot
A conversational front end over the same lookups.

