/v1/answers endpoint you can search the web with natural language and return AI‑powered answers and data in the JSON shape you want. This lets you ground your products on real-world data and sources, enrich data points or spreadsheets
- Ask a question or give AI a data point you want to enrich
- Optional: specify the JSON structure you want back
- Search, clean, validate and return the data it found on the Web
- Return sources used to generate the answer
- Handle uncertainty with
NOT_FOUNDvalues when data cannot be verified
Quick reference for AI agents
Quick reference for AI agents
- Endpoint:
POST https://api.olostep.com/v1/answers(auth:Authorization: Bearer <YOUR_API_KEY>) - Required:
task - Common options:
json_format(an object with empty values as the schema, or a string describing the data),storage.expires_in(7ddefault …never) - Returns:
id,result.json_content(stringified JSON; unverified fields come back asNOT_FOUND),result.sources,result.json_hosted_url - Sync or async: Sync — the answer is in the response.
- Get results later:
GET /v1/answers/{answer_id} - SDK / CLI:
client.answers.create(task=..., json_format={...})(Python) ·client.answers.create({ task, jsonFormat })(Node) ·olostep answer "<task>" - Use instead: a list of links → Search · a list of items on one known page → Scrape
Use cases
The answers endpoint can be used to:- Ground AI applications on real world data and facts
- Enrich spreadsheets and data points for Recruting, Finance, Consulting, and Sales
Installation
Usage
Ask a question and pass a JSON schema to guide the output. You can also not pass thejson_format parameter and the API will return a json object with the answer text inside the result field.
Response
Like other Olostep endpoints, you will receive aanswer object in response. The answer object has a few properties like id and result.
json_format parameter, is in response.result.json_content and the list of sources in response.result.sources. You can parse the stringified JSON to access the structured data.
json_format parameter, the API will return a json object with the answer text inside the result field.
Flexible json_format parameter
- Provide a JSON object with empty values as a schema, or a string describing the data you want.
- For a list, use an array with one example item, e.g.
{"products": [{"name": "", "price": ""}]}. - If the agent isn’t confident, it returns
NOT_FOUNDfor that field.
Storage
Stored files for a answer are kept for 7 days by default. Pass astorage object on POST /v1/answers to keep them longer, or indefinitely. The setting covers the answer result and the pages fetched to build it.
Omitting
storage, or sending storage without expires_in, uses 7d. Both the create response and GET /v1/answers/{answer_id} include the value in effect:
cURL
400: