Recipes
Build a statute lookup chatbot
Take a question, find the best section, and answer from it.
- Search with limit 1 and includeBody true.
- Scope with corpusType and state where the user names a jurisdiction.
- Show the citation and a link to the official source.
import requests
BASE = "https://api.lexbharat.example/api/v1/us"
r = requests.post(f"{BASE}/statutes/search", headers={"Authorization": "Bearer lb_key_..."},
json={"query": q, "limit": 1, "includeBody": True})
Last modified on October 20, 2026
Was this page helpful?