API Reference
POST/v1/search

Web Search

Real-time web search for grounding chat and agent workflows with up-to-date results, built and billed by Draven AI.

A separate paid product from chat — no free daily pool. $0.008 per request, charged on every call to this tool. Rate limit: 30 requests/min per account.

Request body

querystringRequired

The search query.

Search is always run at basic depth — there is no "advanced" tier. A search_depth field is accepted for compatibility but ignored server-side.
include_answerbooleanOptional

If true, includes an AI-generated short answer synthesized from the results.

include_imagesbooleanOptional

If true, includes relevant image URLs alongside the results.

max_resultsintegerOptional · default 5, max 20

Maximum number of results (pages) to return, from 1 up to 20. Values above 20 are rejected with a 400 error.

curl https://api.dravenai.lat/v1/search \
  -H "Authorization: Bearer sk-drv-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest Cloudflare Workers AI models",
    "include_answer": true,
    "max_results": 5
  }'
import requests

response = requests.post(
    "https://api.dravenai.lat/v1/search",
    headers={"Authorization": "Bearer sk-drv-your-api-key"},
    json={
        "query": "latest Cloudflare Workers AI models",
        "include_answer": True,
        "max_results": 5,
    },
)
const response = await fetch("https://api.dravenai.lat/v1/search", {
  method: "POST",
  headers: { "Authorization": "Bearer sk-drv-your-api-key", "Content-Type": "application/json" },
  body: JSON.stringify({
    query: "latest Cloudflare Workers AI models",
    include_answer: true,
    max_results: 5,
  }),
});

Response

200 OK
{
  "query": "latest Cloudflare Workers AI models",
  "answer": "...",
  "results": [
    { "title": "...", "url": "...", "content": "...", "score": 0.87 }
  ],
  "pricing": { "search_depth": "basic", "usd_per_request": 0.008 }
}
To ground a chat model with search results in one turn (instead of calling /v1/search yourself and pasting the results into the conversation), see AI Agents for tool-calling patterns.

For error responses, see Errors.