GET /v1/answer
Ask a hemp-compliance question in plain English and get back a verified, statute-cited answer — or an honest "we can't verify that yet" gap. This is the same deterministic Verified Answer Engine that powers hempdata.io/ask: there is no language model in this path, so it physically cannot invent a regulatory number. Every asserted figure carries a verification object with the backing statute and primary sources.
Auth & rate limit
- Requires a HempData API key:
Authorization: Bearer hda_live_sk_.... - Subject to your tier's per-minute rate limit.
Request
GET /v1/answer?q=Is+CBD+legal+in+Kentucky%3F
Authorization: Bearer hda_live_sk_...
| Query param | Type | Required | Notes |
|---|---|---|---|
q | string | yes | The question, 1–500 chars |
state | string | no | Two-letter jurisdiction code (e.g. KY, DC). Scopes the question when the text doesn't name a state |
Response — 200 OK (answered)
data.status is "answered" when the engine can answer from verified data.
{
"success": true,
"data": {
"status": "answered",
"intent": "fact",
"parsed": { "states": ["KY"], "...": "..." },
"answer": {
"text": "… answer text with inline [1] citation markers …",
"citations": [
{ "n": 1, "label": "…", "url": "https://…" }
],
"verification": {
"status": "verified",
"confidence": 1,
"factId": "…",
"statute": "…",
"lastVerified": "…",
"primarySources": ["https://…"]
},
"data": { "...": "structured tool output" }
}
},
"meta": { "api_version": "v1" },
"errors": null
}
answer.verification.statusis"verified"only when the figure traces to a
tracked, human-reviewed fact with primary sources. Treat anything else as orientation, not a compliance decision.
answer.citations[]matches the inline[n]markers inanswer.text.
Response — 200 OK (gap)
data.status is "gap" when verified data can't answer. A gap is a valid 200, not an error — the engine refuses to guess, and the gap is logged server-side to drive the verification backlog.
{
"success": true,
"data": {
"status": "gap",
"intent": "substance_legality",
"gap": {
"reason": "substance_specific_unverified",
"missing": "…what's missing / how to rephrase…"
}
},
"meta": { "api_version": "v1" },
"errors": null
}
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | q missing/too long, or state isn't a two-letter US jurisdiction code |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 429 | RATE_LIMITED | Per-minute limit exceeded for your tier |
| 503 | ANSWER_UNAVAILABLE | Engine unavailable (should not happen — please report the request_id) |
What happened to POST /v1/regulations/ask?
The retrieval-augmented POST /v1/regulations/ask endpoint is disabled and returns 503 FEATURE_DISABLED with a doc_url pointing here. GET /v1/answer is the supported question-answering surface: deterministic, verification-first, and incapable of hallucinating a number.