curl --request POST \
--url https://api.vaquill.ai/api/v1/us/statutes/extract-citations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983."
}
'import requests
url = "https://api.vaquill.ai/api/v1/us/statutes/extract-citations"
payload = { "text": "Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983." }
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({
text: 'Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983.'
})
};
fetch('https://api.vaquill.ai/api/v1/us/statutes/extract-citations', 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/statutes/extract-citations"
payload := strings.NewReader("{\n \"text\": \"Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983.\"\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))
}{
"citations": [
{
"citation": "42 U.S.C. § 1983",
"raw": "42 U.S.C. § 1983(b)",
"type": "Statute",
"subtype": "usc",
"jurisdiction": "US",
"jurisdictionSource": "cite",
"pinpoint": "(b)",
"mentions": 2,
"resolved": true,
"actId": "USC_T42_C21_S1983",
"subsection": "b"
},
{
"citation": "Cal. Civ. Code § 99999",
"raw": "Cal. Civ. Code § 99999",
"type": "Statute",
"subtype": "state_statute",
"jurisdiction": "CA",
"jurisdictionSource": "cite",
"pinpoint": "",
"mentions": 1,
"resolved": false,
"missReason": "not_held",
"missReasonHint": "This reads as a statute citation to CA, and we do not hold that section. Check the number, or find the provision by topic with `POST /us/statutes/search`."
}
],
"counts": {
"found": 2,
"resolved": 1,
"unresolved": 1,
"skipped": 0
},
"truncated": false,
"textChars": 812,
"extractorVersion": "0.6.0",
"creditsConsumed": 4,
"processingTimeMs": 412
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}Find the citations in a text and resolve each
Read a block of text (a brief, a memo, a statute-heavy email, a model’s answer) and return every
distinct non-case legal citation in it, each resolved to the section it names. The text-in
counterpart of POST /us/statutes/resolve: one call instead of extracting the citations yourself
and sending them in batches of 50.
Extraction reads statutes, regulations, court rules, constitutions and registers, in federal and
state form (42 U.S.C. § 1983(b), Cal. Civ. Code § 1942, Fed. R. Civ. P. 12, 8 CCR 1206-2,
N.Y. Const. art. I, § 8). It does not extract case citations. It is measured, not perfect: about
0.92 to 0.98 precision and 0.80 to 0.85 recall on unseen opinion text, so a citation can be missed
and a non-citation can be read as one; resolved is what we verified. extractorVersion is the
extractor’s version: the same text can yield different citations when it changes.
Dedupe. A citation is one row however many times it appears (mentions counts them, the first
pinpoint is kept), and is resolved once. 42 U.S.C. § 1983 and 42 U.S.C.A. § 1983 are two rows,
because they are two strings a reader might want checked; both carry the same actId.
Cost: 2 credits per DISTINCT citation sent to the resolver, the same as
POST /us/statutes/resolve, so pasting a document costs what pasting its citations one by one
costs. The extraction itself is free: resolve: false returns the citations found and charges
nothing. An unresolved citation is charged (the verdict is the product); a session-law citation
(skipped: session_law, read it under /us/session-laws) is not resolved here and not charged; a
citation we fail to process is refunded one by one, and an outage that takes half of them or more
answers 503 and refunds the call. The charge is taken after extraction and before any lookup, so
creditsConsumed is known up front. One call resolves at most 200 distinct citations,
so one click is at most 400 credits; truncated: true says more were found
and only the listed ones were charged.
Limits. text is at most 200,000 characters (a 422, never a truncation) and must be
text. A key may send 5,000 resolutions a day through
this route; past that the call answers 429 with Retry-After and nothing is charged. The text is
never stored.
Unresolved rows carry missReason, candidates and missReasonHint, the same finding
GET /us/statutes/resolve gives (no extra charge). Pass state (the document’s jurisdiction) so a
citation that names none, such as Civil Rule 56.1, is checked against the right one.
Related: POST /us/statutes/resolve for citations you already hold;
GET /us/statutes/section/{actId} to read a resolved section.
curl --request POST \
--url https://api.vaquill.ai/api/v1/us/statutes/extract-citations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983."
}
'import requests
url = "https://api.vaquill.ai/api/v1/us/statutes/extract-citations"
payload = { "text": "Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983." }
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({
text: 'Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983.'
})
};
fetch('https://api.vaquill.ai/api/v1/us/statutes/extract-citations', 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/statutes/extract-citations"
payload := strings.NewReader("{\n \"text\": \"Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983.\"\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))
}{
"citations": [
{
"citation": "42 U.S.C. § 1983",
"raw": "42 U.S.C. § 1983(b)",
"type": "Statute",
"subtype": "usc",
"jurisdiction": "US",
"jurisdictionSource": "cite",
"pinpoint": "(b)",
"mentions": 2,
"resolved": true,
"actId": "USC_T42_C21_S1983",
"subsection": "b"
},
{
"citation": "Cal. Civ. Code § 99999",
"raw": "Cal. Civ. Code § 99999",
"type": "Statute",
"subtype": "state_statute",
"jurisdiction": "CA",
"jurisdictionSource": "cite",
"pinpoint": "",
"mentions": 1,
"resolved": false,
"missReason": "not_held",
"missReasonHint": "This reads as a statute citation to CA, and we do not hold that section. Check the number, or find the provision by topic with `POST /us/statutes/search`."
}
],
"counts": {
"found": 2,
"resolved": 1,
"unresolved": 1,
"skipped": 0
},
"truncated": false,
"textChars": 812,
"extractorVersion": "0.6.0",
"creditsConsumed": 4,
"processingTimeMs": 412
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}{
"detail": "Insufficient API credits.",
"errors": [
{
"loc": [
"body",
"corpusType"
],
"msg": "Input should be 'USC', 'CFR' or 'STATE'",
"type": "literal_error"
}
]
}Authorizations
API key issued from the developer dashboard. Pass as Authorization: Bearer vq_key_... (preferred).
Body
The text to read, 1 to 200,000 characters (a brief is about 30,000). Longer is a 422, never a silent truncation: a partial list reported as the whole is a wrong answer. Plain text; a body that is mostly binary is a 422.
1 - 200000"Plaintiff sued under 42 U.S.C. § 1983(b). See also Cal. Civ. Code § 1942 and 42 U.S.C. § 1983."
The jurisdiction of the DOCUMENT as a two-letter state code (the forum of a filing, the governing state of a matter). It labels and scopes a citation that names no jurisdiction of its own (Civil Rule 56.1, Gov. Code § 12940); a citation that names a jurisdiction is always checked against that one, whatever this says.
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 "ca"
Resolve each distinct citation to its section (priced per distinct citation, see the endpoint's Cost). false returns the extraction alone, which is free.
true
false drops rows that did not resolve from citations. The counts and the charge are unchanged: an unresolved citation is a verdict that was paid for.
true
Response
The distinct citations found, each resolved unless resolve is false.
Show child attributes
Show child attributes
Characters of text read.
The extractor's version. The same text can yield different citations when it changes, so cache extractions by text AND this value.
"0.6.0"
The distinct citations, in order of first appearance.
Show child attributes
Show child attributes
True when more than 200 distinct citations were found and citations holds the first of them. counts.found still reports the number found, and only the ones listed were resolved and charged.
Credits actually charged. 0 when resolve is false.
6
Server-side time for this request in milliseconds. Not billed on.
412
Was this page helpful?

