Skip to main content

New: DOJ Justice Manual, USCIS Policy Manual, USPTO MPEP/TMEP, and DFARS PGI are now in the API. See what's covered.

Recipes

Ground an LLM answer in statutes (RAG)

Retrieve statutes, make the model answer only from them, and cite each source.

Steps#

  • Search with includeBody: true and a small limit.
  • Pass the returned text as the model's only context.
  • Ask for citations that map to actId and citation.
  • Fetch .../body for any section whose body came back null.
retrieval call
curl -X POST https://api.lexbharat.example/api/v1/us/statutes/search \
  -H "Authorization: Bearer lb_key_..." \
  -H "Content-Type: application/json" \
  -d '{ "query": "…", "limit": 5, "includeBody": true }'

Last modified on October 20, 2026

Was this page helpful?