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 from a search narrowed by
jurisdiction, session, series, instrumentType or the approval dates is refunded and carries a note
naming the filters; an empty result with no filter is an answer (“nothing matches”), is charged, and carries
a note. A request that fails validation (422) is not charged, including a query with nothing to search
for (??, the of); 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 does not appear 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 returned only with includeUnverified, which also changes
how they are matched (see that parameter). session limits every kind of match to that session.
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, whatever
the age of either. Among laws matched alike, the newer act comes first and an act that amends few code
sections comes before an omnibus one. Quote a phrase to require it verbatim. The act’s own citation
(Laws 2025, ch. 127) is searched too. A query that is exactly one session-law id
(SSL_MN_2025R_G_Y2025_C1) answers that law alone, matchType exact, when it passes your filters and
we serve its text; an id we do not serve is searched as words like any other query.
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
Headers
Optional. 16 to 255 visible ASCII characters (a UUIDv4 works). Repeating the same request with the same key replays the original 2xx response for 24 hours without charging again. The same key on a different request is rejected. With the account's cacheQueryDerivedData retention setting off, no body is stored and a retry answers 409 idempotency_replay_unavailable, still without a second charge.
16 - 255^[\x21-\x7e]+$"3f9c2a1e-7b44-4d0a-9c1e-5a6b7c8d9e0f"
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 jurisdiction: the 56 jurisdictions (the 50 states, dc and the territories pr, gu, vi, as, mp). 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 on every kind of match: a law of another session is never returned, including one found through the words of its text (the session is re-checked on each law before it is ranked, so a narrow session can leave fewer than limit laws on a page).
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, private, constitutional_resolution, competing_measure_resolution, resolution_act. 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, private, constitutional_resolution, competing_measure_resolution, resolution_act ["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"]
Also search laws we hold but do not serve (holdingState: quarantined). Default false: such laws are never returned and nothing else changes. With true a held-back law whose reason we can label may appear, and every such result carries holdingState, textReliability (unverified or known_issue) and reasonCode; its text MAY show deleted or vetoed law as if enacted. Served laws are returned as usual, without these fields. A law whose licence bars use, or whose text failed our own validation, is never returned. A held-back law is matched by its title, code section, its OWN citation (Laws 2025, ch. 127) or bill number, not by the words of its text and not by a code citation that appears inside it. Priced as any search page.
true
Response
The laws that matched, best first. An empty results is a charged answer.
Response for POST /us/session-laws/search.
Was this page helpful?

