What is an AI search API?

An AI search API runs a live web search for an application and returns results shaped for language models: ranked pages with their text, a short answer with cited sources, or a multi-step research report. It gives an AI application information newer than a model's training data.

Model types

Why AI applications need search

A language model answers from what it learned in training, and that knowledge stops at a cutoff date. It has not seen news, prices or documentation published since. With a search API, your application sends a query, receives current results from the web, and passes them to a model as context. The answer can then cite sources that a reader can check.

Search built for AI applications differs from search built for people. Instead of a page of links, it returns structured data that a program can use directly, such as titles, URLs, publication dates and page text, with controls for how many results to return and where they come from.

Three kinds of AI search

  • Search results. POST /v1/search returns a list of results with titles, URLs and snippets or page text, for your code or your model to read. Some search models can also add a short synthesized answer next to the results.
  • Answers. POST /v1/answer returns a concise answer and the sources it cites in one call.
  • Deep research. POST /v1/research runs a multi-step task: the model plans search queries, reads the sources and writes a report with numbered citations and a list of references. A run can take several minutes, so keep the connection open, or set stream to true to receive events while it runs.

Some research models also answer through /v1/chat/completions and the other text endpoints, so you can send a conversation and receive a cited answer in the chat format. The search API reference describes each endpoint and its response.

Filters and controls

Each search model has its own parameters, listed on its model page. Depending on the model, you can:

  • set how many results to return;
  • include or exclude domains, for example to search only documentation sites;
  • limit results to a recent period or a date range;
  • bias results toward a country or location;
  • return full page text, highlights or summaries instead of short snippets.

Narrow filters usually work better than a larger result count. Fewer, more relevant results give the model less to read, which lowers input tokens and keeps answers focused.

Search inside a chat request

Many text models can also search the web during an ordinary chat request when you turn on their web search parameter. The model answers from the sources it retrieved and ends with a list of them, which disable_formatting removes on models that list that parameter. On most models that offer it, web search adds a fee per search or per request on top of tokens, as each model's pricing shows.

Use a search API when your code needs the results themselves, to filter, store, rank or display them. Use built-in web search when you only need the model's answer to reflect current information. To let a model call your own search or data tools instead, see function calling.

How search is billed

Search models bill in different units: per search, per request, per research task, or by input and output tokens plus a fee for the searches the model runs. The models on this page show their current units and prices. You can pay as you go, or choose a plan with weekly allowances; see pricing for both. Browse research and search models, or run a query in the Playground.

Research & Search models on EmpirioLabs AI

13 models. Each model's page has its rate card, parameters and code.

Endpoints

POST /v1/answer POST /v1/search POST /v1/chat/completions POST /v1/responses POST /v1/messages POST /v1/research
Show all 13 models

Frequently asked questions

What is the difference between a search API and web search inside a chat model?

A search API returns the results themselves for your code to use. Web search inside a chat request lets the model look things up and answer with sources, without your code handling the results.

How long does a deep research request take?

A deep research run plans several searches, reads the sources and writes a cited report, so it can take several minutes. Keep the connection open, or stream events while it runs.

Can I restrict search results to specific websites?

Many search models accept domain filters that include or exclude sites, and some also filter by date or location. Each model's page lists the filters it accepts.

Do AI search answers include sources?

Yes. The answer and research endpoints return the sources they cite alongside the text, so you can show citations or check claims.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.