Esta página está en inglés.

Web search

POST /v1/search runs one web search. The model is <provider>/<model>, and every model answers 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}

published_at appears only where the provider dates a result (Brave, Perplexity).

Models

Modelmax_resultslanguagefreshnesssafe_search
brave/web-search1 to 20yesyesoff, moderate, strict
firecrawl/search1 to 20refusedyesrefused
scrapingdog/google-search1 to 10yesrefusedoff, strict
serper/google-search1 to 10yesyesrefused
searchapi/google-search1 to 10yesyesoff, moderate, strict
perplexity/search1 to 10yesyesrefused

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, month or year.
  • safe_search: off, moderate or strict, 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.