curl --request POST \
--url https://api.vaquill.ai/api/v1/us/session-laws/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "can the sheriff pay with a debit card"
}
'import requests
url = "https://api.vaquill.ai/api/v1/us/session-laws/search"
payload = { "query": "can the sheriff pay with a debit card" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'can the sheriff pay with a debit card'})
};
fetch('https://api.vaquill.ai/api/v1/us/session-laws/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vaquill.ai/api/v1/us/session-laws/search"
payload := strings.NewReader("{\n \"query\": \"can the sheriff pay with a debit card\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Search the text of state session laws
Find state session laws by what they SAY. Send a question in plain words, words from a title, a quoted
phrase, a citation (63-3004), a code section or a bill number (S.F.No. 1552). You get the laws, best
first, each with the passage of its text that matched and a snippet around your words.
Cost: 4 credits per page, each page a new search. An empty result is an answer (“nothing
matches”) and is charged. A request that fails validation (422) is never charged; a failure on our side
(500, 503) is refunded. To read a law you found, use GET /us/session-laws/{sessionLawId} (record) or
its /body (text), which are priced on their own.
What is searched. The ENACTED text: the law as it reads once the act takes effect. Language an act
strikes out is not searched and never appears in a snippet, so a repealed word cannot match as if it were
law. Only laws we serve with text are searched (see GET /us/statutes/coverage, sessionLaws, for what
each state holds). Laws whose text we withhold are not returned.
How it ranks. Keyword relevance (BM25), not meaning. Words are matched as written and stemmed
(licensing finds licensed), so a question has to share vocabulary with the act:
teeth cleaning professional does not find an act that says dental hygienist. A law matched by its
title AND its text, or by an exact part of your query, ranks above one matched a single way. Quote a
phrase to require it verbatim.
What a result says about itself. matchType is exact when a quoted phrase, citation, code
section or bill number you typed matched, otherwise text; matchedBy lists every way. Neither says
the law is the right one: a question with no true answer still returns its closest words, and there is no
“no good match” flag because keyword scores do not separate the two cases. Read the snippet.
Paging. limit is 1 to 25. offset plus limit reaches at most the 60 best matches; narrow with
jurisdiction, session, series, instrumentType or the approval dates rather than paging deeper.
curl -X POST "https://api.vaquill.ai/api/v1/us/session-laws/search" \
-H "Authorization: Bearer vq_key_..." \
-H "Content-Type: application/json" \
-d '{"query": "can the sheriff pay with a debit card", "jurisdiction": "al", "limit": 5}'
const res = await fetch("https://api.vaquill.ai/api/v1/us/session-laws/search", {
method: "POST",
headers: { Authorization: "Bearer vq_key_...", "Content-Type": "application/json" },
body: JSON.stringify({ query: '"credit card or debit card"', jurisdiction: "al", limit: 5 }),
});
const { results } = await res.json();
Related. GET /us/session-laws/list filters one state’s laws by session, series and date;
POST /us/session-laws/batch reads up to 50 laws by id; GET /us/statutes/section/{actId}/enactments
lists the acts a publisher’s own tables tie to a code section.
curl --request POST \
--url https://api.vaquill.ai/api/v1/us/session-laws/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "can the sheriff pay with a debit card"
}
'import requests
url = "https://api.vaquill.ai/api/v1/us/session-laws/search"
payload = { "query": "can the sheriff pay with a debit card" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'can the sheriff pay with a debit card'})
};
fetch('https://api.vaquill.ai/api/v1/us/session-laws/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vaquill.ai/api/v1/us/session-laws/search"
payload := strings.NewReader("{\n \"query\": \"can the sheriff pay with a debit card\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Authorizations
API key issued from the developer dashboard. Pass as Authorization: Bearer vq_key_... (preferred).
Body
Body of POST /us/session-laws/search.
What to look for: a question in plain words (can a sheriff pay with a debit card), words from a title, a quoted phrase ("credit card or debit card"), a citation (63-3004), a code section or a bill number (S.F.No. 1552). Quoted parts must appear verbatim; everything else is matched on its words, stemmed, so licensing finds licensed. Words are matched as the legislature wrote them: teeth cleaning professional does not find an act that says dental hygienist. 2 to 300 characters.
2 - 300"can the sheriff pay with a debit card"
Limit to one state, dc or pr. Two-letter code, case-insensitive. Omit to search every jurisdiction we hold. federal and an unknown code are a 422, never charged.
al, ak, as, az, ar, ca, co, ct, de, dc, fl, ga, gu, hi, id, il, in, ia, ks, ky, la, me, md, ma, mi, mn, ms, mo, mt, ne, nv, nh, nj, nm, ny, nc, nd, mp, oh, ok, or, pa, pr, ri, sc, sd, tn, tx, ut, vt, vi, va, wa, wv, wi, wy "al"
Limit to one session, by the code session.code reports (2025R, 2025S1). Case-sensitive. Matches the act's own session, so it narrows the TITLE, citation and bill signals; the passage text of an act carries its session year and type but not the code.
1 - 32^[A-Za-z0-9._-]+$"2025R"
Limit to these numbering series, one or more (they combine with OR). One of general, public, public_act, special_act, private_and_special, act, acts, law, local, municipal, appropriation, resolve, resolves, resolution, resolution_chapter, joint_resolution, concurrent_resolution, memorial, initiated_bill, constitutional_amendment. Any other value is a 422, never charged.
general, public, public_act, special_act, private_and_special, act, acts, law, local, municipal, appropriation, resolve, resolves, resolution, resolution_chapter, joint_resolution, concurrent_resolution, memorial, initiated_bill, constitutional_amendment ["general"]
Limit to these kinds of measure, one or more (OR). One of act, joint_resolution, concurrent_resolution, resolution, resolve, memorial, other. Any other value is a 422, never charged.
act, joint_resolution, concurrent_resolution, resolution, resolve, memorial, other ["act", "joint_resolution"]
Only laws approved on or after this date, YYYY-MM-DD, inclusive; a real calendar date (2025-02-30 is a 422). A law with no printed approval date never matches.
^\d{4}-\d{2}-\d{2}$"2025-03-01"
Only laws approved on or before this date, YYYY-MM-DD, inclusive. An end before approvedFrom is a 422, never charged.
^\d{4}-\d{2}-\d{2}$"2025-06-30"
Laws per page, 1 to 25. A page costs the same however many laws it holds, so a larger limit is cheaper per law.
1 <= x <= 255
Laws to skip, for the next page: offset plus limit can reach at most the 60 best matches. Each page is a new search and is charged. Deeper than 60 is a 422, never charged: narrow the search with a filter instead.
0 <= x <= 595
Response
The laws that matched, best first. An empty results is a charged answer.
Response for POST /us/session-laws/search.
The query as read, whitespace collapsed.
"can the sheriff pay with a debit card"
How the query was split into words, phrases, citations and bill numbers.
Show child attributes
Show child attributes
The laws, best first. Empty when nothing matched, which is an answer and is charged.
Show child attributes
Show child attributes
Laws on this page.
5
The offset this page was read from.
0
The limit this page was read with.
5
True when more laws follow: call again with offset raised by limit (within the 60 best).
true
Credits actually charged for this call, never the list price. 0 when the call was refunded.
4
Server-side time for this request in milliseconds, excluding network transit. Not billed on.
38.6
Was this page helpful?

