Web search

POST /v1/search runs one web search. The model is <provider>/<model>: brave/web-search or firecrawl/search. Both answer in the same shape.

cURLcurl
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 }'
JSONjson
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}

Fields

  • query: required, up to 400 characters.
  • max_results: 1 to 20, default 10.
  • country: two-letter code, e.g. "US".
  • freshness: day, week, month or year.
  • language and safe_search (off, moderate, strict): Brave only. Firecrawl refuses them.

Billing

  • One query of up to 10 results is one unit. 11 to 20 results is two.
  • A search that finds nothing answers 404 and costs nothing.
  • Keyless x402 works here when the deployment enables it.