Web search
POST /v1/search runs one web search. The model is <provider>/<model>, and
every model answers in the same shape.
1curl https://api.aile.sh/v1/search -H "Authorization: Bearer $AILE_KEY" -H "Content-Type: application/json" -d '{ "model": "brave/web-search", "query": "bun runtime", "max_results": 5 }'
1{2 "object": "search",3 "model": "brave/web-search",4 "query": "bun runtime",5 "results": [6 { "title": "Bun", "url": "https://bun.sh", "snippet": "Bun is a fast JavaScript runtime", "published_at": "2026-01-02T00:00:00" }7 ]8}
published_at appears only where the provider dates a result (Brave, Perplexity).
Models
| Model | max_results | language | freshness | safe_search |
|---|---|---|---|---|
brave/web-search | 1 to 20 | yes | yes | off, moderate, strict |
firecrawl/search | 1 to 20 | refused | yes | refused |
scrapingdog/google-search | 1 to 10 | yes | refused | off, strict |
serper/google-search | 1 to 10 | yes | yes | refused |
searchapi/google-search | 1 to 10 | yes | yes | off, moderate, strict |
perplexity/search | 1 to 10 | yes | yes | refused |
Every model takes country. A field a model does not take is a 400, never
silently dropped. On searchapi/google-search, moderate leaves Google's default.
Fields
query: required, up to 400 characters.max_results: default 10, up to the model's limit above.country: two-letter code, e.g."US".language: two-letter code, e.g."en".freshness:day,week,monthoryear.safe_search:off,moderateorstrict, as the model takes it.
Billing
- One query of up to 10 results is one unit. 11 to 20 results is two. Both are known before the search runs, so the hold is the bill.
- A search that finds nothing answers 404 and costs nothing.
- Keyless x402 works here when the deployment enables it.