Ask a numerical question about a document
Queue a question over extracted document text, poll for a checked answer, and read which figures were verified and where each came from.
Last updated
Endpoints and minimal request
POST https://api.webcite.co/api/v1/ask takes question and documentText (extracted text, not an asset ID) and returns a job id. Poll GET /api/v1/ask/{id} until status is done or failed. Agents call ask_document and get_ask_result.
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/ask' \
-H "x-api-key: $WEBCITE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"question": "What was the unemployment rate in October 2026, and how much did it change from September 2026?", "documentText": "EXTRACTED_DOCUMENT_TEXT", "documentName": "BLS summary table A"}'Read the answer
Asked of the BLS Employment Situation summary table, the recorded result was:
{
"status": "done",
"result": {
"answer": -0.1,
"checks": [
{
"field": "unemployment_rate_oct2026",
"drafted": 4.1,
"verdict": "verified"
},
{
"field": "unemployment_rate_sept2026",
"drafted": 4.2,
"verdict": "verified"
},
{
"field": "change",
"drafted": -0.1,
"verdict": "verified",
"detail": "calculated from verified operands: unemployment_rate_oct2026-unemployment_rate_sept2026"
}
],
"evidence": [
{
"field": "unemployment_rate_oct2026",
"page": 1,
"section": "Summary table A. Household data, seasonally adjusted"
},
{
"field": "unemployment_rate_sept2026",
"page": 1,
"section": "Summary table A. Household data, seasonally adjusted"
},
{
"field": "change",
"page": 1,
"section": "Summary table A. Household data, seasonally adjusted"
}
]
}
}Each check names a drafted value and whether it was verified against the text; a derived value says which verified operands it was calculated from. Request, result.
When to use it, and what to use instead
Use it for questions whose answer is a number in the document. Extract the document first and check its coverage, and set hasTextLayer: false for a scan without usable text. Ask works only over the text you send; to find a source on the web, use source search, and to check a statement against the web, verify a claim.