question answers one question about the page, using only the text of the page.
Ask a question
Get an API key in the Quickstart. Sendquestion as an object. This request asks a documentation page for the name of its configuration file.
Read the response
data.answer is a short answer of one to four plain sentences.
answer is left out of data, data.warning says The page does not state an answer to the question., and the $3 is not charged. Check that answer is there before you use it.
Options
Limits and errors
- Each request answers one question. To ask several, send several requests, or use JSON with one field per question.
- The answer is made from the first 50,000 characters of the page’s Markdown.
- A call without
questionreturns400 invalidRequest.
Price
$4 per 1,000 pages: $1 for the page and $3 for the answer. A page that does not state the answer costs $1 per 1,000 pages.Related
- Highlights returns the passages themselves, with no model sentence in between.
- JSON fills several fields at once.
- Summary summarizes the whole page.
- Extract pulls fields from pages and checks each one against the page.