/searchSearch the web and return ranked pages, each with the passage that best matches the query. Billing metadata: responses include `cost_usd`, `usage_count`, `service`, and `currency` fields in the JSON body.
Base URL
https://api.desearch.aiUse Search API when your application needs search-grounded AI resultswithout maintaining its own crawler, social-data pipeline, or retrieval infrastructure. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.
Send requests to POST /search with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.
Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.
querystringrequiredSearch query.
modestring`fast` returns results sooner. `balanced` favors relevance.
Default: balanced
countintegerNumber of results to return: 10, 15 or 20.
Default: 10
start_datestringOnly return pages published on or after this date (YYYY-MM-DD).
end_datestringOnly return pages published on or before this date (YYYY-MM-DD).
highlightsbooleanInclude the passage that best matches the query.
Default: true
page_textbooleanInclude the full page text.
Default: false
Your API key is sent in the Authorization header.
curl -X POST "https://api.desearch.ai/search" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json"{
"results": [
{
"url": "Url",
"title": "Title",
"published_date": "string",
"highlights": [
"string"
],
"page_text": "string"
}
],
"cost_usd": 0,
"usage_count": 0,
"service": "Service",
"currency": "Currency"
}Possible status codes: