Search1API
Basic

Ask

Natural language search API. TypeSafe's Jev model detects intent, routes the request to up to five engines, and reranks results by relevance.

Use /ask 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 TypeSafe's Jev decision model for intent detection, engine routing, and reranking. Jev returns 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. Ask is a Search1API product, not an official TypeSafe product.

Each request makes two decisions, and you can override either one:

  • Engines. Search1API picks up to five of google, duckduckgo, yandex, hackernews, reddit, github, x, arxiv, wikipedia, imdb, wechat, and youtube. Pass sources to choose them yourself.
  • Time window. Search1API applies day, week, month, or year when the request mentions a time. No window is applied when it does not. Pass time_range to set the window yourself.

Every result is scored for relevance to your request. Results scoring below 0.5 are dropped, and duplicates across engines are merged. The response can therefore hold fewer than max_results results, or none at all. 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 instead when you already know the engine and keywords and want that engine's own ranking.

A completed request costs 5 credits, however many engines are searched. /ask requires an API key, is limited to 30 requests per minute per account, and does not support pay-per-request payments. The official SDKs do not include an ask method yet; call the endpoint over HTTP.

POST
/ask

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

query*string

What you are looking for, in natural language. Platform hints ("on Reddit", "papers") and time hints ("this week") steer engine and time-range selection.

Length1 <= length <= 500
sources?array<>

Engines to search. Omit to let Search1API pick up to 5 from the query.

Items1 <= items <= 5
time_range?string

Only return results published within this window. Omit to infer it from the query; no window is applied when the query has no time intent.

Value in

  • "day"
  • "week"
  • "month"
  • "year"
max_results?integer

Maximum number of relevant results to return.

Range1 <= value <= 20
Default10

Response Body

application/json

application/json

application/json

application/problem+json

application/json

application/json

application/json

curl -X POST "https://example.com/ask" \  -H "Content-Type: application/json" \  -d '{    "query": "What are developers saying about Bun 1.3 this month?"  }'
{  "query": "string",  "intent": {    "search_query": "string",    "sources": [      "string"    ],    "time_range": "day"  },  "results": [    {      "title": "string",      "link": "http://example.com",      "snippet": "string",      "published_date": "2026-09-03",      "source": "string",      "relevance": 0    }  ],  "errors": [    {      "source": "string",      "message": "string"    }  ]}
{  "ok": false,  "error": "string",  "message": "string",  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ],  "type": "http://example.com",  "title": "string",  "status": 0,  "detail": "string"}
{  "ok": false,  "error": "string",  "message": "string",  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ],  "type": "http://example.com",  "title": "string",  "status": 0,  "detail": "string"}
{  "ok": false,  "error": "string",  "message": "string",  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ],  "type": "http://example.com",  "title": "string",  "status": 0,  "detail": "string"}
{  "ok": false,  "error": "string",  "message": "string",  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ],  "type": "http://example.com",  "title": "string",  "status": 0,  "detail": "string"}
{  "ok": false,  "error": "string",  "message": "string",  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ],  "type": "http://example.com",  "title": "string",  "status": 0,  "detail": "string"}
{  "ok": false,  "error": "string",  "message": "string",  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ],  "type": "http://example.com",  "title": "string",  "status": 0,  "detail": "string"}