Endpoints
List rulebook rules
Lists the rules of one rulebook in book order, with search, status filters and paging
GET
Returns the rules of one rulebook in the order the rulebook prints them, without their text. Each rule carries its number, citation, heading, place in the rulebook, status, and how many requirements we read from it. Search the number, heading and text with
An offset at or past the last rule returns
Each rule in the answer counts as one row against your daily row limit.
q, then read a rule’s text with /rulebooks/{rulebook_id}/rules/{number} and its requirements with /extracted-rules.
Results are paged with limit and offset: meta.total is the number of matching rules, and meta.next_offset is the offset of the next page, or null on the last page.
string
required
Rulebook identifier from
/rulebooks, such as
california-rules-of-court.string
Words to find in a rule’s number, heading or operative text. Every word must appear; a word may
appear in any of the three. Not case-sensitive. History notes and committee comments are not
searched. Example:
opening memorandum.string
Only rules with this status:
in_force, repealed or reserved.boolean
true: only rules whose current text has at least one requirement. false: only rules with none,
including rules whose requirements have not been read yet. Leave it out for both.number
Maximum rules per page. Defaults to
100, maximum 500.number
Number of matching rules to skip. Defaults to
0. Pass meta.next_offset from the previous page
to read the next one.Response fields
array
The rules on this page, in rulebook order: by position in the book, then by id. Empty when nothing
matches.
object
Paging
Read a whole rulebook by followingnext_offset until it is null:
200 with an empty rules array and the true meta.total. If the official source changes while you page, a rule can move between pages; read again from offset=0 when you need a consistent copy.
Filtering behavior
- Search. Every word in
qmust appear in the rule’s number, heading or operative text. A%or_inqmatches itself. - Status and requirements.
legal_statusandhas_requirementscombine with each other and withq.has_requirements=trueandhas_requirements=falsetogether cover every rule exactly once. - Removed rules stay in the list, with
removed: true. They never matchhas_requirements=true.
Errors
400: Invalid parameters
Returned for a value the endpoint cannot use, such aslimit=0 or has_requirements=yes. Each failing parameter is named.
400
404: Rulebook not found
Returned when no rulebook has this identifier. A search with no match is200 with an empty list, not a 404.
404