Every agent that answers questions about the present needs some way to find pages it has never seen. For most applications that means a web search API: a service you send a query to and get results back as data, instead of a page designed for human eyes. The term covers several quite different products, and the differences decide what your application can actually do. This page defines the term, sorts the main types, walks through a typical response field by field, and describes the patterns AI applications use.
A definition, and what sits behind it
A web search API is a programmatic interface to a search engine. You send a query, usually with options such as language, region, freshness or number of results, and it returns a ranked list of documents from its index, each with an address and some description of the content. The response is structured, typically JSON, so code can use it without parsing a results page.
Behind that single call sit three systems you never see directly. A crawler discovers and downloads pages. An index stores processed versions of those pages so they can be looked up quickly. A ranking layer decides which indexed documents match your query and in what order. The quality of any search API is mostly the quality of those three: how much of the web was crawled and how recently, how pages were processed, and how ranking treats queries like yours.
It also helps to be clear about two things a search API is not. It is not a scraper: it does not fetch arbitrary pages on demand, although some products bundle a separate fetch endpoint. And unless it explicitly says it synthesizes answers, it is not an answer engine; most return evidence and leave the conclusion to you.
The main types
| Type | How it works | Typical output | Watch for |
|---|---|---|---|
| Engine-operated index API | A search engine exposes its own index through an API | Links, titles, snippets, sometimes news or image results | Snippets are short; terms may restrict storing or displaying results |
| Results-page scraping API | A third party loads a consumer search engine’s result pages and parses them | A structured copy of what a person would see, including ads and rich features | Depends on another engine’s terms and layout; can break when the page changes |
| AI-oriented search API | Built for model consumption; may use semantic retrieval and return extracted page text | Longer excerpts or cleaned full text, often with relevance scores | How excerpts are chosen; whether full text is cached or fetched live |
| Answer API | Searches, reads the results and returns a generated answer | A paragraph plus the sources it cites | The answer is a claim; you still need to read the cited passages |
| Vertical API | Covers one domain: news, academic papers, patents, products, jobs | Domain fields such as authors, publication or price | Coverage outside the domain is zero by design |
| Self-hosted metasearch | Software you run that queries several engines and merges their results | Merged links and snippets | You maintain it; upstream engines can throttle automated use |
The categories blur at the edges. Many providers offer several of these as separate endpoints, and a product sold as AI search may be an engine-operated index with an extraction layer on top. What matters is knowing which behavior your application relies on.
What a response actually contains
Field names differ between providers, but a typical result looks something like this hypothetical response:
{
"query": "municipal bond disclosure rules",
"results": [
{
"rank": 1,
"title": "Continuing disclosure obligations for issuers",
"url": "https://example.org/guidance/continuing-disclosure",
"snippet": "Issuers must provide annual financial information and notice of...",
"published": "YYYY-MM-DD",
"crawled": "YYYY-MM-DD",
"content": "Full or partial extracted page text, if the API provides it",
"score": 0.82
}
],
"next_page": "token-for-the-next-page"
}
Each field carries a caveat worth knowing before you build on it.
- Snippet is a fragment chosen to match your query, not a summary of the page. It can leave out the qualifying sentence that reverses its meaning.
- Published is often missing or guessed from the page. Crawled tells you how old the index’s copy is, which is what matters for freshness.
- Content, when present, may come from a cached copy rather than the live page. Find out which, especially for pages that change often.
- Score is only meaningful relative to other results in the same response. Do not compare scores across queries or providers.
- Result count and pagination tell you how many results the API was willing to return, not how many relevant pages exist.
How AI applications use search APIs
Five patterns cover most uses.
- Grounding. Before answering, the application searches, reads the top results and answers from them with citations. It is the standard defense against confident answers built on stale training data; see reducing hallucinations with grounding.
- Agent tool. The model decides when to search and writes its own queries, often several, refining as it goes. This is the core of agentic search.
- Retrieval for RAG. Search replaces or supplements a vector database as the retrieval step, which suits questions whose answers live on the public web rather than in your own documents.
- Research and discovery. Many queries fan out across a topic; results are deduplicated and read, and findings are compiled into a table or report.
- Monitoring. The same queries run on a schedule, and new or changed results are flagged for review.
All five share one weak point: the step between “the API returned a URL” and “this claim is supported”. The model reads a snippet, infers more than it says, and the citation looks fine even though the page never made the claim. Building that check into the application, instead of trusting the citation format, is most of the real work.
What a search API cannot promise
A search API can tell you which pages its index considers relevant. It cannot tell you that a page is true, current or complete, and it cannot tell you that no other relevant page exists. Finding a page in the results does not grant a right to republish its content, and a URL in a response is not permission to fetch content behind a login. Providers also change their terms and products over time, so it pays to keep your integration behind a thin interface you could point at another provider without rewriting the application.
Where GoCux sits in this picture
GoCux is not a web search API and does not read the open web. Its Knowledge search works over a project’s own documents and returns passages with their citations. Web pages reach a project through an authorized browsing or export step and arrive with the original page address and the date they were retrieved, so a later reader can see where and when a statement was found. That makes GoCux a complement to a search API rather than a substitute: the API helps you discover pages, and the workspace keeps whatever you decide to rely on attached to its evidence, with consequential next steps waiting for a person. Knowledge search and from web information to reviewable evidence describe that side.
Before you integrate one
- Which type are you buying: links and snippets, extracted text, or generated answers?
- Have you run real queries from your own work and read the results, rather than relying on a demo? Evaluating web search on your own queries shows how.
- Does the response tell you when the index last saw each page?
- Is page content cached or fetched live, and does that matter for your use?
- What do the terms say about storing results, showing them to users and using them as model input?
- How does the API behave on queries with no good answer: empty results, or weak matches presented confidently?
- Could you switch providers without rewriting the application? How to choose a web search API goes deeper on selection.
Bring this workflow into your workspace.
Set the scope. Review the evidence. Approve the steps that need it.