# Ask

> Agentic search API. A decision model detects intent from a natural-language request, routes it to up to five engines, and reranks results by relevance.

Canonical URL: https://s1.dev/zh/docs/basic/ask

`/ask` is the Search1API agentic search endpoint. Use it when you know what you want but not where to look. A request such as "what are developers saying about Bun 1.3 this month" typically goes to community sources with a one-month window, while "recent papers on speculative decoding" goes to arXiv.

Search1API uses a decision model for intent detection, engine routing, and reranking. It currently uses TypeSafe's Jev, and support for more decision models is being added. Decision models return calibrated probabilities rather than generated text, and `/ask` does not write an answer. Your request, plus the titles and snippets of the results it returns, are sent to the model. For Hacker News, Reddit, and GitHub, the keywords are a phrase copied from your request by Cloudflare's Clairic extraction model, so your request is also sent to Cloudflare Workers AI. Ask is a Search1API product, not an official TypeSafe product.

The request takes one field, `query`. Search1API makes two decisions from it:

- **Engines.** Search1API picks up to five of `google`, `duckduckgo`, `yandex`, `hackernews`, `reddit`, `github`, `x`, `arxiv`, `wikipedia`, `imdb`, `wechat`, and `youtube`. Naming a platform in the request, such as "on Reddit" or "papers", steers the choice.
- **Time window.** Search1API applies `day`, `week`, `month`, or `year` when the request mentions a time. `year` means the past 365 days, not the current calendar year. No window is applied when it does not.

Every result is scored for relevance to your request. Results scoring below 0.5 are dropped, and duplicates across engines are merged. The response holds at most 10 results, and can hold fewer or none at all. Because off-topic results and duplicates are removed before the response is returned, an agent gets a shorter, on-topic result list from one call instead of reading several engines' raw rankings. `intent` shows the keywords, engines, and window that were used.

If some engines fail while others complete, the response lists the failures in `errors` and is still charged. If no engine completes, the API returns `502` and the request is not charged.

Use [Search](https://s1.dev/zh/docs/basic/search) instead when you already know the engine and keywords and want that engine's own ranking.

> **info:** A completed request costs 5 credits, however many engines are searched. `/ask` takes an API key or OAuth token, is limited to 30 requests per minute per account, and does not support pay-per-request payments. The [official SDKs](https://s1.dev/zh/docs/integrations/sdks) provide `ask()`, the [CLI](https://s1.dev/zh/docs/integrations/cli) provides `s1 ask`, and the [MCP server](https://s1.dev/zh/docs/integrations/mcp) provides an `ask` tool.

Complete machine-readable schema: https://api.search1api.com/openapi.json