ALL.
Choose an operation
Search by topic
Sendquery with words or a question. This search ranks Texas documents about cancellation
notices for commercial general liability:
Response (summary abbreviated)
exhaustive is always false: other documents can match. Follow nextCursor to page through
the window. Rankings can shift between pages when documents change. Results do not include the
matching passage; read the text to find it. sort is not allowed with query.
Search can take several seconds. If it fails, you get 503 temporarily_unavailable; wait for
Retry-After, or list the same filters without query.
List with filters
Withoutquery, the endpoint returns every matching document in a fixed order. Follow
nextCursor until it is null; exhaustive is true.
Repeat
state, kind, status, toi or impact to supply alternatives, for example
state=KS&state=MO. Values within one filter are OR; different filters are AND. The API
reference lists every allowed kind, status and impact value. Unknown values and unknown
parameters return 400 invalid_request.
Statutes have no TOI or impact tags, and most orders have none. A toi or impact filter
leaves them out. TOI values also include H (health), L (life), T (title) and ALL.
Watch for new documents
Poll withfirstSeenFrom and the default sort=-firstSeenAt:
Response (first document, abbreviated)
- Documents are stored in batches, so a document can appear after one with a later
firstSeenAt. Start each poll a little before the previous one, and drop IDs you have seen. - A backfill or a changed source page can make an old document look new. Check
publishedDate. - A bill that moves to another stage is not new. Its
statuschanges in place.
Read a document
Response (title and summary abbreviated)
publishedDateis the publisher’s date as stored. It can be missing or wrong, and a year-only date is stored as 1 January.toiCodes,impactTagsandlegalRefsare null when the document was never classified, and[]when it was classified and none apply.summaryis a research aid, not the source. Most documents have none.fileIdis the stored source file, when there is one. Download it with Read and cite document evidence.
Read the text
Read the stored text in chunks, with the same contract as file text:Response
maxBytes and cursor={nextCursor} until nextCursor is null. Offsets
count UTF-8 bytes. Documents are updated in place: when the text changes, an old cursor returns
400 invalid_cursor; start again without a cursor. A document with no text returns 409
text_unavailable. Text taken from PDFs can lose tables and layout, so the source file stays the
evidence.
Follow citations
List what a document cites:Response
relationship is references, amends or supersedes. citation is the citation as written.
document is the cited document, or null when it is not in the corpus. Add direction=in to list
documents that cite this one. A document can cite laws in legalRefs without reference rows.
Compare form requirements across states
Form checklists have requirement items. List the Kansas commercial auto items for cancellation notices:Response
state to compare states in one list, or use document with a checklist ID for one
checklist. Other filters are formType, action, category and toi. Results are ordered by
state, checklist and category, with no totals. Check sourceText against the checklist before you
rely on an item: items are checklist evidence, not legal authority. Read the checklist with its
document.id.
Handle errors
Cursors expire 24 hours after the first page. Repeat the same parameters and
limit with each
cursor.
Cost
- A search with
querycosts 0.003 per returned document. A page of 50 costs $0.17. - A list without
querycosts 0.003. - Each text chunk costs $0.01, including each continuation.
- Each citation row costs $0.003.
- Each requirement item costs $0.01, in a list or a single read.
- Empty pages and failed calls are free. Repeating a successful call is charged again.