DEV Community

Cover image for Which search API works best as a tool inside an AI agent?
Ricardo Batista for cloro

Posted on Edited on

Which search API works best as a tool inside an AI agent?

A Google SERP API works best as a search tool inside an AI agent that must answer hard questions correctly, and Exa works best inside an agent that must answer fast. So the pick depends on the job. In a benchmark of six search APIs with one search per question, cloro answered 80.2% of 824 multi-hop questions and SerpApi 77.4%, against 65.3% for Parallel, 64.0% for Exa, 53.9% for Brave and 48.4% for Tavily. cloro also had the lowest cost per correct answer, $1.98 per 1,000 correct answers on short factual questions, against $5.11 to $15.08 for the other five. Exa was the fastest, at 0.74 seconds per search. When the agent must see what Google shows, with the AI Overview and People Also Ask, only a Google SERP API returns that page.

  • Hard questions: on multi-hop questions, Parallel, Exa, Brave and Tavily replied "not found" on 151 to 295 of the 824 questions, because their 10 results did not hold every fact. For an agent, each "not found" is a second search or a failed task.
  • Easy questions: on 1,000 short factual questions, Parallel (97.8%), Exa (97.3%) and cloro (96.9%) tied within the margin of error. There, speed and cost decide.
  • Context: Google's AI Overview carries most of the accuracy. With the same results and no AI Overview, correct answers fell from 99% to 86% on 100 questions.

The video version of this comparison:

Which search API answers the most questions correctly from one search?

Six search APIs ran on three public question sets in November 2026. Each API got the question text as its query, one search and 10 results in its default mode. One model (gpt-5.6-luna) answered from those results only, and a second model (gpt-5.6-sol) graded each answer against the answer key.

Search API SimpleQA Verified (1,000 short facts) FreshQA (358 recent events) FRAMES (824 multi-hop) Median latency
cloro 96.9% 88.3% 80.2% 7.96 s
Parallel 97.8% 82.7% 65.3% 2.99 s
Exa 97.3% 83.0% 64.0% 0.74 s
SerpApi 94.7% 88.5% 77.4% 8.20 s
Brave Search API 93.1% 84.9% 53.9% 1.21 s
Tavily 91.8% 81.8% 48.4% 2.00 s

The order changes with the question type:

  • Multi-hop questions need facts from two or more Wikipedia pages. The two Google SERP APIs led, and the lead of the top one over SerpApi holds in a paired test on the same questions (p = 0.022). When they did answer, five of the six APIs were right 78% to 81% of the time. The gap comes from coverage: one page of results did not hold every fact.
  • Recent events (news, prices, anything that changed last week): the two Google SERP APIs tied at the top, 5 to 7 points ahead of Tavily, Exa and Parallel.
  • Short factual questions: Parallel, Exa and cloro tied. Exa and Parallel are statistically tied on all three sets.

Latency is the search request alone. The two Google SERP APIs were the slowest, at about 8 seconds. For an agent that must answer in under 3 seconds, the other four fit better. For an agent that runs in the background, the multi-hop coverage weighs more.

Which search API costs the least per correct answer?

An agent pays for the searches that end in a correct answer, so the benchmark divides the price per 1,000 searches by the accuracy on SimpleQA Verified. Prices are the list price on each vendor's cheapest self-serve plan that covers 100,000 searches a month, read on November 5, 2026.

Search API Plan $ per 1,000 searches $ per 1,000 correct answers
cloro Starter, $250 a month for 650,000 credits; 5 credits a search with the AI Overview $1.92 $1.98
Parallel Pay as you go $5.00 $5.11
Brave Search API $5 per 1,000 requests $5.00 $5.37
Tavily Growth, $500 a month for 100,000 credits $5.00 $5.45
Exa Pay as you go, up to 10 results $7.00 $7.19
SerpApi Searcher, $725 a month for 100,000 searches $7.25 $15.08

SerpApi bills a second search when part of the page loads separately. That happened on 97% of the SimpleQA questions, so one question cost about 1.97 searches.

Three notes on the prices, checked again on November 14, 2026:

  • Tavily below 100,000 searches a month is pay as you go at $0.008 a credit. A basic search is 1 credit, so about $8 per 1,000.
  • Parallel now lists $1 per 1,000 for its turbo and fast modes, and $5 for basic and advanced. The benchmark priced the mode it ran at $5.
  • cloro below 50,000 searches a month is the Hobby plan, $100 a month for 250,000 credits, so $2.00 per 1,000 with the AI Overview. The table prices asynchronous requests. A synchronous request costs 7 credits: $2.80 per 1,000 on Hobby and $2.69 on Starter.

Which part of a search result does the agent need?

The benchmark also took the saved Google SERP responses for 100 SimpleQA Verified questions and changed only what the reader model could read.

What the model read Accuracy Tokens per question
AI Overview, then 10 results with title, URL and snippet 99% 843
AI Overview and snippets only 99% 528
AI Overview and the top 5 results 99% 549
Full JSON response 99% 4,605
AI Overview alone 95% 174
10 results without the AI Overview 86% 747
Text of the top 5 result pages alone 84% 5,871

Three things follow for a search tool:

  1. The AI Overview does most of the work. Google writes it from several top pages, so the answer to a factual question is often in one sentence. A second reader model (Gemini) lost 15 points without it.
  2. Snippets carry the rest. Titles and URLs carry no accuracy. The AI Overview plus the snippets scored 99% with 37% fewer tokens. Keep the URLs only when the agent must cite its sources.
  3. More text does not buy more answers. The top 5 results scored the same as the top 10. The full JSON cost 5.5 times the tokens for the same score. Fetching the result pages added tokens and failure points: only 56% of the pages gave text, because robots.txt blocked 22% and 17% returned an error.

A tool that returns this format to the model is a few lines:

def format_results(ai_overview: str | None, results: list[dict]) -> str:
    """Give the model the AI Overview first, then one snippet for each result."""
    parts = []
    if ai_overview:
        parts.append("Summary:\n" + ai_overview)
    for r in results:
        parts.append("- " + r["snippet"])
    return "\n\n".join(parts)
Enter fullscreen mode Exit fullscreen mode

When does the agent need Google's own results page?

Brave, Tavily, Exa and the Perplexity Search API each search their own index or retrieval model. A separate study ran 500 queries through each of them and through Google's live results on the same day, in July 2026:

Search API Share of Google's top-10 domains Rank correlation with Google
Tavily 80% 0.03
Brave 65% 0.55
Perplexity Search API 49% 0.43
Exa 44% 0.27

Tavily returns most of Google's sources, in its own order. Brave keeps Google's order best. Exa retrieves by meaning, so it is the least like Google, by design.

On the same 500 queries, Google showed People Also Ask on 77%, an AI Overview on 64% and shopping results on 14%. None of the four APIs returns these, because none of them reads Google's page. So an agent needs a Google SERP API when its task is about what Google shows:

  • The agent answers from the AI Overview, the part that carried most of the accuracy above.
  • The agent checks a rank, an AI Overview citation or a People Also Ask question for a query in a country.
  • The agent must give the same answer a person sees on Google.

Google itself does not sell a self-serve API for this. Its Custom Search JSON API is closed to new customers, and existing customers must move off it by January 1, 2027. The replacement that Google recommends, Vertex AI Search, searches up to 50 domains that you choose, not the open web.

Which search API should you pick for your agent?

Your agent Use
Answers while a user waits, mostly short facts Exa
Answers multi-hop questions from one search A Google SERP API
Answers questions about recent events A Google SERP API
Runs thousands of searches a day in the background The lowest cost per correct answer in the table above
Needs pages that keyword search misses, for research Exa
Needs what Google shows: AI Overview, People Also Ask, rankings A Google SERP API

How this was checked

This comparison is published by cloro, which runs the benchmark and sells one of the six APIs in it. For that reason the harness, the settings and all 13,092 graded answers are public in the web search API benchmark repository. Anyone can run it again with their own keys and questions.

The benchmark has limits. One search measures the search API, not a full agent: an agent that searches many times can get a high score from a weaker search API. The tests of the result parts used 100 questions, so only large effects, such as the AI Overview, are certain. The 500-query study is one run from July 2026, and indexes change.

The accuracy, cost and latency figures come from the benchmark. The plan prices were read on each vendor's pricing page on November 5, 2026, and checked again on November 14, 2026. The full comparison, with free tiers and each API's place against Google, is in Best Web Search API for AI Agents.

Top comments (0)