Best search APIs for AI agents and RAG in 2026
What the model needs back decides the search API. For page text to reason over, Tavily, Exa and Brave’s LLM Context endpoint return extracted content in one call. For what Google shows, including rankings, AI Overviews and AI Mode answers, you need a Google results API such as Serper, SerpApi or AnswerLine. Six options are compared below on output, price, MCP support, geo controls and data terms, checked on 2026-09-17.
Comparison table
| Vendor | What it searches and returns | Pricing model and entry price (checked 2026-09-17) | Free tier | Google AI Overview / AI Mode | Geo targeting | Async / webhooks | Agent tooling |
|---|---|---|---|---|---|---|---|
| Tavily | Web search with snippets, optional full page content and a generated answer; extract, map, crawl endpoints | Credits; pay as you go $0.008 per credit, basic search 1 credit, advanced 2 (pricing, credits) | 1,000 credits/month, no card | Not documented | country boost (general topic), language |
Not documented | MCP (@tavily/mcp, remote server), LangChain, LlamaIndex, OpenAI Agents SDK |
| Exa | Own index; neural and keyword search, page text, highlights, summaries, answers with citations | Per request; search $7 per 1,000, contents $1 per 1,000 pages per content type, answer $5 per 1,000 (pricing) | $20 credits on signup plus a monthly free allowance | Not documented | userLocation country |
Not documented | MCP (exa-mcp-server, mcp.exa.ai), LangChain, LlamaIndex |
| Brave Search API | Own independent index; web results, extra snippets, LLM Context chunks, Answers | Per request; Search $5 per 1,000 incl. LLM Context; Answers $4 per 1,000 plus tokens (brave.com/search/api) | $5 credits/month | Not documented | country, search_lang, ui_lang |
Not documented | MCP (@brave/brave-search-mcp-server) |
| Serper | Google results: organic, news, images, places, shopping, scholar and more | Prepaid packs; $1.00 per 1,000 down to $0.30, credits valid 6 months (serper.dev) | 2,500 queries, no card | Not documented | Country, language | Not documented | Not documented on its site |
| SerpApi | Google and 100+ other engine APIs as JSON, with a markdown output option | Monthly plans; Starter $25 for 1,000 searches (pricing) | 250 searches/month | Both, as separate engines | location, uule, coordinates, gl, hl |
async=true with archive retrieval |
Hosted MCP (mcp.serpapi.com), serpapi-search-tools for Python frameworks |
| AnswerLine | Google Search (with AI Overview), Google AI Mode, Google News, plus ChatGPT, Perplexity, Gemini, Copilot, Grok answers | Credits; Google tool call 5 credits, AI Mode 6 over MCP (pricing, MCP) | 500 credits/month, no card | Both | country/gl, hl, location, uule, device |
Async tasks, batches, signed webhooks | Hosted MCP server, LangChain JS on npm, n8n, Zapier |
Retrieval search and SERP search
This category mixes two different products.
Retrieval search answers “find documents about X and give me their text”. Tavily, Exa and Brave run their own crawling and ranking (Exa and Brave say they operate their own index; Tavily describes billions of pages crawled and extracted) and return content sized for a context window. The vendor judges relevance, not Google.
SERP search answers “what does Google show for X, in this country, on this device”. Serper, SerpApi and AnswerLine return Google’s ranking and SERP features. The agent gets titles, links and snippets, and fetches pages separately if it needs full text.
A research agent writing a report wants the first. An agent that audits a brand’s search presence, checks rankings, or reads what Google’s AI features say about a topic wants the second. An agent can use both: a SERP tool for what ranks and a fetch or retrieval tool for what the page says.
Vendor by vendor
Tavily
One Tavily search call can return per-result content chunks, the cleaned full page (include_raw_content), images and an LLM-generated answer (include_answer) (search reference). Filters include topic (general, news, finance), time_range or explicit dates, up to 300 include_domains and 150 exclude_domains. Separate extract, map and crawl endpoints let an agent go deeper on a site. It has the broadest integration list here: an MCP server (npm and remote), an official LangChain package, LlamaIndex and the OpenAI Agents SDK.
Advanced search costs 2 credits, so pay as you go works out to $16 per 1,000 advanced searches. Default rate limits are 100 requests per minute on a development key and 1,000 on a production key (rate limits). country boosts results from a country rather than searching from it. There is no Google SERP view and no AI Overview data.
Fits general research and question-answering agents that want content and citations with the least glue code.
Exa
Exa runs its own index, with search types from instant to deep-reasoning, categories (company, news, people, financial report and others), up to 100 results and 1,200 domain filters each way (search reference). Contents come back in the same call as full text, highlights or summaries (optionally shaped by a JSON schema), and maxAgeHours sets how fresh a cached page must be. Responses include costDollars, so an agent can budget itself. The homepage states zero data retention for queries and results.
Content is priced separately at $1 per 1,000 pages per content type, so text plus highlights for 10 results is two content line items. Deep search types cost $12 to $15 per 1,000. Search is limited to 10 QPS on standard plans (rate limits). Geo is a single country hint, and the search reference has no language parameter.
Fits agents that need semantically relevant sources, such as company research, lead lists and literature search, where Google’s ranking is irrelevant.
Brave Search API
Brave runs an independent index of “over 30 billion pages”. The Search plan at $5 per 1,000 requests includes the LLM Context endpoint, which returns extracted page chunks with source metadata and a configurable token budget from 1,024 to 32,768 (LLM Context docs). Throughput is 50 requests per second. An Answers endpoint returns summarized answers with citations, and the MCP server exposes web, news, image, video, local and LLM context tools.
The terms matter for RAG. Brave’s Search API terms, checked 2026-09-17, prohibit storing, caching or building a database of results “other than transient storage”, and prohibit using results to “create, evaluate, train, re-train, fine-tune, benchmark or otherwise improve artificial intelligence models”. They also require “POWERED BY BRAVE” attribution. The pricing page lists no plan with storage rights outside custom enterprise agreements. There are no domain include or exclude parameters; you use operators or Goggles.
Fits answering agents that use results in the moment and discard them, at high throughput and a flat price.
Serper
Serper has the lowest unit price among the Google APIs here: $1.00 per 1,000 on the 50k pack down to $0.30 on the 12.5M pack, 50 to 300 queries per second by pack, credits deducted only on successful responses, no caching, and 2,500 free queries (serper.dev). Endpoints cover web, news, images, videos, places, maps, shopping, scholar, patents and autocomplete, which map directly onto agent tools.
It returns no page content: the agent gets Google’s snippets and fetches pages itself. AI Overview, AI Mode, city-level targeting and an MCP server are not documented on its public pages. Credits expire after six months.
Fits agents that need cheap, fast Google links and snippets, with a separate fetch step.
SerpApi
SerpApi returns full Google SERP JSON, has separate engines for Google AI Overview and AI Mode, and over a hundred other engine APIs. For LLM use it offers an output=md markdown format, a hosted MCP server at mcp.serpapi.com (MCP), and a Python serpapi-search-tools package that its announcement says works with LangChain, LangGraph, LlamaIndex, OpenAI Agents, CrewAI and other frameworks. The AI Mode engine supports follow-up turns with a subsequent_request_token (AI Mode API).
The price per search is high for agent volumes: $25 per 1,000 on Starter, $7.25 on Searcher. Hourly throughput is capped at 20% of plan volume under a million searches. When Google needs a second request for AI Overview, the returned token expires within minutes.
Fits agents that need many engines and Google verticals from one provider, where breadth matters more than unit cost.
AnswerLine
AnswerLine has a hosted MCP server with one tool per engine, google, aimode, google_news, chatgpt, perplexity, gemini, copilot and grok, plus credits. Each tool’s input schema is that endpoint’s request schema (MCP docs).
The google tool returns organic results, People Also Ask, local results, ads, the knowledge graph and, with include.aioverview, the AI Overview with sources and citationPills. Targeting goes down to a city (location) or uule, and to desktop or mobile. The aimode tool returns text, optional markdown, sources, citationPills, places, shoppingCards, inlineProducts and videos. With the assistant tools, an agent can compare Google against ChatGPT, Perplexity, Gemini, Copilot and Grok answers for the same prompt. API errors come back as tool results marked isError with the error code, and credit and rate-limit headers are in the result’s _meta, so the agent or its host can track spend. Scheduled jobs outside the agent loop can use async tasks at the base price, batches of up to 500 and signed webhooks.
It is not a retrieval index: there is no page-text extraction, no semantic search, and no domain filtering beyond what a Google query supports, so pair it with a fetch tool. A tool call is a synchronous API call that holds a concurrency slot and can take up to five minutes, so raise the MCP client’s tool timeout. Each call costs the engine price plus 2 synchronous credits: 5 for google, 7 with an AI Overview, 6 for aimode.
Fits agents whose job is search visibility: SEO and GEO assistants, brand-monitoring agents, and research agents that report what Google’s AI features and the major assistants say.
Adding it to Claude Code:
claude mcp add --transport http answerline https://mcp.answerline.dev/mcp \
--header "Authorization: Bearer $API_KEY"
The same call without MCP, for a custom tool:
curl -X POST https://api.answerline.dev/v1/monitor/aimode \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "best project management tool for a 10-person agency", "country": "US", "include": { "markdown": true } }'
import { Client } from "@answerline/sdk";
const client = new Client({ apiKey: process.env.API_KEY! });
const { result } = await client.monitor.google({
query: "best project management tool for agencies",
country: "US",
include: { aioverview: { markdown: true } },
});
Setup details are in giving an agent live answer data with MCP and LangChain agents with live answers.
Selection criteria
- Output the model needs: links and snippets, page text, a generated answer, or SERP features. Extraction you do not use wastes tokens and money; missing extraction adds a fetch step and latency.
- Whose ranking. Only a Google results API answers “what does Google show”. For “what is relevant”, an independent index may do better.
- Tool latency and timeouts. MCP clients have default tool timeouts, and live Google and AI Mode calls take longer than an index lookup. Check that your client’s timeout is configurable.
- Cost per agent task. Agents issue several searches per task and fetch contents for several results, so multiply.
- Data terms. If results go into a vector store, an eval set or training data, read the terms. Brave’s are explicit; ask other vendors if their pages are not.
- Geo and language. A country boost does not search from a location. Local answers need a location parameter.
- Integration surface. An official MCP server, a maintained framework package and typed errors save more time than a small price difference.
- Observability. Per-call cost in the response (Exa’s
costDollars, AnswerLine’s credit headers in_meta) lets you cap agent spend.
Cost example
An agent handles 10,000 tasks a month with 3 searches per task: 30,000 searches. List prices checked 2026-09-17, free allowances ignored.
| Option | Calculation | Monthly cost |
|---|---|---|
| Brave Search (incl. LLM Context) | 30,000 × $5 / 1,000 | $150 |
| Exa search only | 30,000 × $7 / 1,000 | $210 |
| Exa search + text for 10 results | $210 + 300,000 pages × $1 / 1,000 | $510 |
| Tavily basic, pay as you go | 30,000 credits × $0.008 | $240 |
| Tavily basic, Startup plan | $220 for 38,000 credits (credits page) | $220 |
| Tavily advanced, pay as you go | 60,000 credits × $0.008 | $480 |
| Serper | 50k pack ($50) lasts about 1.7 months | About $30 |
| SerpApi | Big Data plan, 30,000 searches | $275 |
AnswerLine google over MCP |
30,000 × 5 credits = 150,000 credits | See pricing |
AnswerLine aimode over MCP |
30,000 × 6 credits = 180,000 credits | See pricing |
Serper, the cheapest line, returns the least content per call; Exa with text, the most expensive, replaces a fetch step. Compare cost per completed task, including any fetch or extraction you would otherwise run.
Pitfalls
- Search loops. Cap searches per task in the agent’s instructions or the host; a model that searches again whenever it is unsure can make many calls for one question.
- Sync calls for batch jobs. Refreshing 5,000 queries overnight through an MCP tool is the wrong path. Queue them as tasks and receive webhooks; see sync, async and webhooks.
- Treating
countryas a location. Tavily’scountryboosts results; AnswerLine’slocationanduulerun the search from a place. They answer different questions. - Storing what you may not store. Decide your caching policy against each vendor’s terms before building the vector index.
The MCP guide covers connecting the Google and AI Mode tools to your own agent.
Questions
What is a search API for AI agents?
A web search endpoint an LLM can call as a tool, returning results a model can use: ranked links with snippets, extracted page text, or a generated answer with citations. Most ship an MCP server or framework integrations.
Should an agent use Google results or an independent index?
Use Google results when the task is about what people see on Google, such as rankings, AI Overviews or local results. Use an independent or semantic index when the agent needs relevant documents and page text and Google's ranking does not matter.
Which search APIs have an official MCP server?
On pages checked 2026-09-17: Tavily (@tavily/mcp and a remote server), Exa (exa-mcp-server and mcp.exa.ai), Brave (@brave/brave-search-mcp-server), SerpApi (mcp.serpapi.com) and AnswerLine (a hosted Streamable HTTP server).
Can I store search results in my vector database?
Check each vendor's terms. Brave's Search API terms, checked 2026-09-17, prohibit storing or caching results beyond transient storage and prohibit using them to train or evaluate AI models; other vendors' terms differ.
How much does an agent search call cost?
On list prices checked 2026-09-17: Brave Search $5 per 1,000 requests, Exa search $7 per 1,000, Tavily $0.008 per credit with basic search at 1 credit, Serper $1.00 to $0.30 per 1,000. An AnswerLine Google Search tool call costs 5 credits over MCP.
Can an agent read Google AI Mode answers?
Yes, through APIs that expose it. SerpApi and SearchApi document AI Mode engines, and AnswerLine's MCP server has an aimode tool returning the answer text, sources and citation pills.