/v1/searches endpoint lets you search the web with a natural language query and get back a deduplicated list of relevant links with titles and descriptions.
- Send a query in plain English
- Get back structured links from across the web
- Optionally scrape every returned URL in one round-trip and embed
markdown_content/html_contentdirectly into the response - Filter by domain, control the result count, and bound the scraping wallclock
- Skip storing the result with
zero_data_retentionand read it inline fromresult.json_content - Search for people and companies instead of web pages, with a query in any language or explicit filters
Quick reference for AI agents
Quick reference for AI agents
- Endpoint:
POST https://api.olostep.com/v1/searches(auth:Authorization: Bearer <YOUR_API_KEY>) - Required:
query(optional forpeople/companiessearches that sendcategory.parameters) - Common options:
limit(1–25, default 12),include_domains,exclude_domains,scrape_options(formats:markdown,html;timeoutin seconds),category({ "type": "any" | "people" | "companies" }),fast_mode,zero_data_retention(defaultfalse; do not combine withstorage,scrape_optionsorIdempotency-Key) - Returns:
id,result.links[](url,title,description, plusmarkdown_content/html_contentwithscrape_options),result.people/result.companiesfor category searches,result.json_hosted_url(orresult.json_contentwhenzero_data_retentionistrue) - Sync or async: Sync — the links are in the response.
- Get results later:
GET /v1/searches/{search_id}(withzero_data_retention,queryis"[redacted]"and the result is not stored) - SDK / CLI:
client.searches.create("<query>")(Python and Node) ·olostep search "<query>" - Use instead: a direct answer instead of links → Answers · content of a known URL → Scrape
Installation
Basic usage
Send a natural language query and receive a list of relevant links.Request parameters
Limiting the number of results
Filtering by domain
include_domains narrows results to a whitelist; exclude_domains filters out unwanted sources. They can be combined.
scrape_options
Passscrape_options to scrape every returned URL in parallel and embed the rendered content directly on each link. This saves a round-trip per result vs. calling /v1/searches and /v1/scrapes separately.
Behavior
- All links are scraped in parallel. The
timeoutbounds the whole batch, not each individual link. - Per-link scrape failures (network errors, individual page timeouts) leave that link’s
markdown_content/html_contentasnullwhile other links return normally. - If the global
timeoutelapses before all scrapes finish, the search responds immediately with the links it has — already-completed scrapes keep their content; in-flight ones come back withnullcontent. - For
reddit.com/.../comments/...URLs, the request is automatically routed through the@olostep/reddit-postparser and the structured JSON is rendered into clean markdown + basic HTML - If the combined inline content exceeds 9MB, content fields are nulled,
result.size_exceededis set totrue, and you can fetch the full payload fromresult.json_hosted_url.
Example with scraping
Response
You will receive asearch object in response. The search object contains an id, your original query, credits_consumed, and a result with a list of links.
result.links contains:
The full result is also available as a hosted JSON file at
result.json_hosted_url — useful when result.size_exceeded is true. On a normal search, json_hosted_url points at that file and json_content is null. With zero_data_retention, result.json_hosted_url is null and the JSON is in result.json_content. See Zero data retention.
Retrieving a past search
GET /v1/searches/{search_id} returns whatever was persisted at search time, including any scraped content. It’s a pure idempotent read — no re-scraping, no re-billing. Older searches without scrape_options simply have no per-link content fields. A search created with zero_data_retention returns query as "[redacted]" and no stored result. See Zero data retention.
People and company search
Setcategory.type to people or companies to search professional profiles or companies instead of web pages. category defaults to { "type": "any" }, the web search described above.
You can describe what you are looking for in query, in any language, pass explicit filters in category.parameters, or both. The query is translated into the same filters; when both are sent, the fields in category.parameters win.
people or companies, limit, include_domains, exclude_domains and scrape_options are ignored (they are still validated). Each search returns up to 25 results.
Parameters
String fields must be non-empty. Fields of the other type are ignored.
Example
Response
The response has the samesearch envelope as a web search. Instead of result.links, result contains:
result.parameters to see how your query was read. GET /v1/searches/{search_id} returns the same shape.
Errors
People and company searches use the standard Olostep error envelope:
Failed searches are not charged. Retry
502 and 503 later.
Storage
Stored files for a search are kept for 7 days by default. Pass astorage object on POST /v1/searches to keep them longer, or indefinitely. The setting covers the hosted JSON file at result.json_hosted_url and, when scrape_options is set, the content scraped for each link.
Omitting
storage, or sending storage without expires_in, uses 7d. Both the create response and GET /v1/searches/{search_id} include the value in effect:
cURL
400:
Zero data retention
Setzero_data_retention to true when Olostep should not store the search result. The field is optional and defaults to false. It works with every category.type (any, people, and companies). Credits are charged as usual.
The create response still includes your original query, and result.links, result.people, or result.companies as usual. The result JSON is inline in result.json_content, and result.json_hosted_url is null. On a normal search, json_hosted_url points at the stored JSON and json_content is null.
Olostep keeps only a record that the search happened — its id and creation time — and replaces the stored query with [redacted]. Request logs do not keep the request body.
GET /v1/searches/{search_id} still returns 200. query is "[redacted]", result.json_content and result.json_hosted_url are both null, and the result has no links, people, or companies.
zero_data_retention cannot be combined with storage, scrape_options or the Idempotency-Key header. Each returns 400:
Zero data retention applies to what Olostep stores. The query is still sent to the search and data providers needed to answer it.
cURL
Pricing
Each search costs 15 credits for the search itself. Whenscrape_options is provided, each scraped page is billed at the standard /v1/scrapes rate (typically 1 credit per page; some parsers cost more). The total is returned in credits_consumed.
Examples:
A
people or companies search costs a flat 40 credits when it returns at least one result, and nothing otherwise.