Best search APIs for AI agents and RAG in 2027
What the model needs back decides the search API. For page text to reason over, Tavily, Exa, Perplexity Search 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. Seven options are compared below on output, price, MCP support, geo controls and data terms, checked on 2026-10-26. “Not documented” in the table means not found in the vendor’s public docs on that date.
Comparison table
| Vendor | What it searches and returns | Pricing model and entry price (checked 2026-10-26) | 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, mcp.tavily.com), 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) | $10 credits on signup, free balance reset to $10 each month | Not documented | userLocation country or coordinates |
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) |
| Perplexity Search API | Own index; ranked results with title, URL, snippet and date, page content capped by max_tokens_per_page, up to 5 queries per request |
Per request; $5 per 1,000, Fast Search $1 per 1,000, no token charges (pricing) | Not stated | Not documented | country, search_language_filter |
Not documented | MCP (@perplexity-ai/mcp-server, perplexity_search tool), Python and TypeScript SDKs |
| 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, and ChatGPT, Gemini, Perplexity, Copilot and Grok answers | Prepaid USD balance from $1; Google tool call $0.00103, ChatGPT $0.0006, Gemini $0.0006 over MCP at Starter; ChatGPT, Gemini and Perplexity cost less on higher tiers (pricing, MCP) | 100 free requests, once, no card, any live engine | Both | ChatGPT, Gemini, Google Search, AI Mode: 213 countries (AI Mode also city and hl); Perplexity, Copilot, Grok: any country; Google News: the 71 countries with a Google News edition, hl |
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, Brave and Perplexity run their own crawling and ranking (Exa, Brave and Perplexity 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. Its integrations include an MCP server (npm and remote), an official LangChain package, LlamaIndex and the OpenAI Agents SDK. Nebius announced an agreement to acquire Tavily on 10 February 2026 (Nebius), and a Nebius blog post dated 20 May 2026 says Nebius has acquired it (Nebius blog, both checked 2026-10-26).
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. Its docs list no Google SERP view or AI Overview data (checked 2026-10-26).
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 lite, auto, deep-lite and deep, 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 on Enterprise.
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. Each result above 10 costs $1 per 1,000 more. Lite search costs $4 per 1,000 and deep search $12 per 1,000. Search is limited to 10 QPS on standard plans and deep search to 5 QPS (rate limits). Geo is a country code, with coordinates for location-dependent queries, and the search reference lists no language parameter (checked 2026-10-26).
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 its own independent index. 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 at $4 per 1,000 plus $5 per million tokens, and the MCP server exposes web, news, image, video, local, place, summarizer and LLM context tools.
The terms matter for RAG. Brave’s Search API terms, checked 2026-10-26, 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” AI models. Attribution is optional; if shown, it must be “POWERED BY BRAVE” with Brave’s logo. The pricing page names no plan with storage rights outside custom enterprise agreements. Its docs list no domain include or exclude parameters (checked 2026-10-26); you use site: or Goggles.
Fits answering agents that use results in the moment and discard them, at high throughput and a flat price.
Perplexity Search API
Perplexity’s Search API returns raw ranked results from its own index, which its launch post puts at hundreds of billions of webpages. Each result has title, url, snippet, date and last_updated, with up to 20 results per query (quickstart). max_tokens_per_page caps the page content returned per result. One request can carry up to 5 queries and bills as one request. Filters include search_domain_filter (up to 20 domains, allow or deny), search_language_filter (up to 20 languages), country and date filters.
It costs $5 per 1,000 requests, or $1 with Fast Search, with no token charges (pricing). The official MCP server, @perplexity-ai/mcp-server, has a perplexity_search tool next to tools that call its Sonar models (MCP). A free tier, Google SERP data and webhooks were not documented (checked 2026-10-26).
Fits agents that want ranked web results with page text at Brave’s price, from an index other than Google’s.
Serper
Serper prices Google results at $1.00 per 1,000 on the 50k pack down to $0.30 on the 12.5M pack, with 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.
Its public pages list no page-content output, so the agent gets Google’s snippets and fetches pages itself. AI Overview, AI Mode, city-level targeting and an MCP server were not documented on its public pages (checked 2026-10-26). Credits expire after six months.
Fits agents that need Google links and snippets at a low unit price, 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).
Per-search prices run from $25 per 1,000 on Starter to $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 1 minute (AI Overview API).
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, gemini, perplexity, 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 is by country, with location or uule for a city. The aimode tool takes them too and returns text, optional markdown, sources, citationPills, places, shoppingCards, inlineProducts and videos. With the assistant tools, an agent can compare ChatGPT, Gemini, Perplexity, Copilot and Grok answers for the same prompt, and set them against Google. API errors come back as tool results marked isError with the error code, and cost 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, with batches of up to 500 and signed webhooks.
It returns search results without page text, semantic search or domain filtering beyond what a Google query supports, so pair it with a fetch tool. A tool call is a synchronous API call that can take up to five minutes, so raise the MCP client’s tool timeout. At Starter prices a call costs $0.0006 for chatgpt, $0.0006 for gemini, $0.0002 for google_news, $0.00103 for google, $0.00174 with an AI Overview, and $0.00206 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/chatgpt \
-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.chatgpt({
prompt: "best project management tool for agencies",
country: "US",
include: { 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 fit.
- 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 cost 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-10-26, free allowances ignored.
| Option | Calculation | Monthly cost |
|---|---|---|
| Brave Search (incl. LLM Context) | 30,000 × $5 / 1,000 | $150 |
| Perplexity Search | 30,000 × $5 / 1,000 | $150 |
| Perplexity Fast Search | 30,000 × $1 / 1,000 | $30 |
| 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 × $0.00103 on every tier prices; a 30-day spend in the Starter tier | $30.90 |
AnswerLine chatgpt over MCP |
30,000 × $0.0006 at Starter prices; a 30-day spend in the Starter tier | $18.00 |
AnswerLine gemini over MCP |
30,000 × $0.0006 at Starter prices; a 30-day spend in the Starter tier | $18.00 |
Serper’s line returns links and snippets per call; Exa with text 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; a Google results API’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 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-10-26: Tavily (tavily-mcp and mcp.tavily.com), Exa (exa-mcp-server and mcp.exa.ai), Brave (@brave/brave-search-mcp-server), Perplexity (@perplexity-ai/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-10-26, 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-10-26: Brave Search $5 per 1,000 requests, Perplexity Search $5 per 1,000, 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 ChatGPT tool call costs $0.0006 over MCP at the Starter tier.
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.