Web search in coding agents: built-in tools and recommended APIs
A coding agent can use one company’s search service itself and recommend another for the app it helps you build. We checked what the companies behind Claude Code, Codex and Cursor disclose about each agent’s built-in search, then asked each agent which API a developer should use, collecting 360 answers to 20 prompts about adding search to an app.
From State of Web Search for Agents, Q4 2026. The counts show what agents recommend. The benchmark tests how well the APIs work.
Built-in web search in coding agents
Each of these agents has a web search tool of its own, and the service behind that tool is not always the one the agent recommends for your app.
- Claude Code. Anthropic lists Brave Search as a supplier for web search. When we asked for a recommendation, Claude Code picked Tavily more often: 49% of its answers, against 19% for Brave Search.
- Cursor. Cursor lists Exa as its web search supplier. When we asked for a recommendation, Cursor picked Exa in 24% of its answers, the same share as Tavily.
- Codex. OpenAI hosts the search tool and has not disclosed its suppliers.
| Agent | How it searches | Documented suppliers |
|---|---|---|
| Claude Code | WebSearch returns titles and URLs from Anthropic’s backend. WebFetch reads the pages. Users cannot change the built-in search provider. | Anthropic lists Brave Search and turbopuffer for web search. It does not explain how they work together. The turbopuffer entry excludes Claude for Government. |
| Codex | Local chats default to cached results from an OpenAI-maintained index. Full-access settings default to live search. | OpenAI hosts the search tool. It has not disclosed the index’s complete sources, supplier routing or refresh schedule. |
| Cursor | Cursor’s Agent can search with its Web tool. In the CLI, fetching a page requires approval unless its domain is allowed. | Cursor currently lists Exa for web search. It does not say whether every Agent or CLI search uses Exa, or whether routing varies by feature or model. |
Official sources checked October 14, 2026. The table covers the built-in tools without plugins. Access depends on the client, account and settings; the method lists our study settings.
Sources and unresolved questions
Claude Code
turbopuffer provides vector and full-text search infrastructure. Its listing does not identify the underlying web index or replace Brave’s listing. Anthropic also documents Claude-SearchBot for indexing and Claude-User for user-requested page retrieval. The full source of Claude Code’s search results remains undisclosed, as does each supplier’s role in a given query. The Claude API supports dynamic filtering, but that alone does not establish how Claude Code filters results.
Codex
Cached mode still retrieves saved web content; it does not rely on training knowledge alone. Users can choose cached, indexed, live or disabled mode; indexed mode allows external requests only through the search index. OpenAI documents OAI-SearchBot for ChatGPT search, but this does not account for every page in Codex’s index. A cloud-hosting relationship or a statement about ChatGPT’s suppliers is not enough to establish that Codex uses Bing.
Cursor
Older @Web documentation named Exa, and older security text named both Exa and SerpApi. The @Web URL now redirects, and the security page points to the Trust Center. SerpApi is absent from the current list; that does not establish when or whether an integration ended. Exa has its own search crawler. SerpApi is a different company from Serper, the API tested here.
A supplier list establishes a relationship, not which service answered a particular query. Tool logs can show that a search or fetch happened; identifying its supplier requires an attributed response or vendor confirmation. Matching URLs alone is only a clue. A page can be indexed without being retrieved, and retrieved without being cited.
Search APIs that coding agents recommend
We asked Claude Code, Codex and Cursor which search API to use while each was working in a small AI app. The 20 prompts read like something a developer would type, such as “which web search api should i use to give this assistant live web results”, and none named a vendor. Each agent answered every prompt three times in a Node app and three times in a Python app, for 360 answers in all.
We count a pick when an answer recommends a product as its first choice.
Claude Code Opus 5.5Codex GPT-6.1 SolCursor Grok 4.7 · Medium
31 of 360 replies named more than one first choice. Each pick counts, so shares across all products add up to more than 100%.
| # | share of all 360 answers | of its 120 answers | of its 120 answers | of its 120 answers | |
|---|---|---|---|---|---|
| 1 | 37% | 49% | 37% | 24% | |
| 2 | 23% | 23% | 23% | 24% | |
| 3 | 20% | 19% | 22% | 18% | |
| 4 | 9% | 10% | 12% | 7% | |
| 5 | OpenAI web search | 6% | 8% | 1% | 8% |
| 6 | 4% | 5% | 7% | 1% | |
| 7 | SerpAPI | 4% | 3% | 5% | 3% |
| 8 | 2% | 0% | 1% | 5% |
The table lists the 8 products that were a first choice in 5 or more of the 360 answers. 14 others were a first choice less often: Context7 (4), GDELT (3), NewsAPI.ai (2), Algolia (1), DuckDuckGo (1), FAISS (1), Firecrawl (1), Google News (1), Keenable (1), OpenAI API (1), Perplexity Sonar (1), pgvector (1), Qdrant (1) and SearchAPI.io (1).
Shares are of answers in which the product was the first choice. Hover over a number for the count. Click a column heading to sort.
- Four products took most of the picks. They were Tavily (37%), Exa (23%), Brave Search (20%) and Serper (9%). At least one of the four was picked in 84% of the 360 answers.
- Two prompts got the same answer every time. “we need a search api for this ai app. pick one and wire it in” drew Tavily in all 18 answers. So did “add a search tool for the agent - use whichever search api you think is best for llm use”.
- Claude Code leaned on Tavily the most. It picked Tavily in 49% of its answers, and Codex in 37%. Cursor split three ways: Tavily 24%, Exa 24%, Brave Search 18%.
- The pick changed with the question. A plain “which search API” question got Tavily (69% of those answers). Questions about cost got Brave Search (46%) and Serper (27%). Questions about long passages and official docs got Exa (16 of 18 for each prompt). For news from the last few hours, agents said Google: SerpAPI (13 of 18) and Serper (9) both return Google’s results.
- The most-picked product was not the most accurate in our benchmark. Tavily Basic scored 77% on the main questions and 57% on the harder ones, and eight of the other 18 APIs scored clearly higher over all questions. Exa scored 92% and 90%. Brave Search scored 67% and 39%, and Serper 34% and 4%. Answers did not say which of Brave’s two APIs they meant; Brave LLM Context scored 91% and 76%. We chose one mode per API and allowed at most two searches per question.
- Ten tested providers were never picked. They are You.com, Valyu, Nimble, Context.dev Search, Linkup, Jina, Octen, TinyFish, Bright Data and Ceramic. No answer mentioned Valyu, Nimble, Context.dev Search, Bright Data or Ceramic at all. You.com, Valyu and Nimble each answered at least 90% of the benchmark’s main questions correctly.
Each agent’s first choice against its own results
| Agent | Recommended most | That API’s score with this agent | Highest score with this agent |
|---|---|---|---|
| Claude CodeClaude Opus 5.5 | Tavily (49% of its answers) | 67%, 27 points below the highest | Exa and Perplexity Search (93%) |
| CodexGPT-6.1 Sol | Tavily (37% of its answers) | 50%, 37 points below the highest | Exa (87%) |
| CursorGrok 4.7 Medium | Tavily and Exa (24% of its answers each) | Tavily: 53%, 37 points below the highestExa: 90%, the highest | Exa (90%) |
Scores are from that agent’s own benchmark runs on the harder questions, across the 19 tested APIs. Recommendations are from November 11 and benchmark runs from November 12 and 13, with the same agent and model.
Example prompts and what each one drew
We asked 20 prompts, five of each kind. These are two of each kind, with the products picked most in the 18 answers to each.
| Kind of question | Prompt | Picked most (of 18 answers) |
|---|---|---|
| Which search API | “which web search api should i use to give this assistant live web results” | Tavily (11), OpenAI web search (4), Exa (2) |
| Which search API | “we need a search api for this ai app. pick one and wire it in” | Tavily (18) |
| A search tool for an agent | “what's the best search api built for ai agents right now” | Exa (13), Parallel (10), Brave Search (4) |
| A search tool for an agent | “give the model a web_search tool it can call. which search service should back it” | Brave Search (9), Tavily (7), OpenAI web search (2) |
| Fresh news and long pages | “which search api is best for finding things published in the last few hours” | SerpAPI (13), Serper (9), GDELT (3) |
| Fresh news and long pages | “what search api should i use for technical questions where the answer is deep in official docs” | Exa (16), Context7 (4), Tavily (1) |
| Cost, speed and scale | “what's the cheapest search api that is still good enough for an ai assistant” | Serper (14), Parallel (2), Perplexity Search API (2) |
| Cost, speed and scale | “recommend a search api for a production assistant - reliability and rate limits matter” | Brave Search (17), Algolia (1) |
Nine answers across all 20 prompts recommended the coding agent’s own search tools and no product.
How the recommendation study ran
- Runs. November 11, 2026. 20 prompts × 2 apps × 3 runs gives 120 answers per agent. 31 replies named more than one first choice. Every session started from a fresh copy of the app.
- Versions. Claude Code 2.1.287 with Claude Opus 5.5; Codex 0.167.1 with GPT-6.1 Sol; Cursor 2026.08.25-3e8eec8 with Grok 4.7 Medium. All at medium effort.
- Web search. The agents could search the web before answering and chose when to. Claude Code did in 40 of 120 sessions, Codex did in 120 of 120 sessions, Cursor did in 80 of 120 sessions.
- What the counts mean. They show what agents recommend. How well each product works is a separate question, which the benchmark tests.
How the agents reached their recommendations
We read the transcripts of all 360 sessions to see how each agent reached its answer: whether it searched the web, what it searched for, which sites came back and which pages it opened.
Codex’s first search already named Tavily.
- Asked
“we need a search api for this ai app. pick one and wire it in”
- Read
The test app’s code
- Searched
Tavily search API official documentation search endpoint Node.js API keyhelp.tavily.comgithub.comtavily.comnpmjs.com - Looked up a page
https://docs.tavily.com/documentation/api-reference/endpoint/searchdocs.tavily.com - RecommendedTavily
I’m choosing Tavily: its API returns source URLs and content snippets that fit the app’s existing search tool.
In 48 of 120 sessions, Codex started by looking for one vendor’s documentation. Across all three agents, 213 of 240 first web searches named at least one vendor.
Claude Code picked Tavily without a web search.
- Asked
“which web search api should i use to give this assistant live web results”
- Read
The test app’s code
- Searched
It recommended a service without searching the web.
- RecommendedTavily
It's built for LLM tool calls. It returns cleaned snippets or page content ready to pass back to the model, so you don't have to scrape and parse HTML.
Tavily was Claude Code’s first choice in 47 of 80 sessions where it answered without searching. Here, Claude Code explained exactly what work the developer could skip.
Asked about value, Claude Code looked up prices.
- Asked
“we're a small team adding web search to this app. what search api gives the best value”
- Read
The test app’s code
- Searched
web search API pricing comparison 2026 Brave Tavily Exa Serper for LLM appsyou.comwebscraft.orgcloro.devopenserp.dev - Searched
OpenAI Responses API web search tool pricing per call 2026nops.ioparallel.aicommunity.openai.comquerying.ai - RecommendedBrave Search
It has a good price, decent quality, a simple REST API and a free tier that covers development.
A You.com comparison appeared in Claude Code’s results in 16 sessions. Claude Code recommended You.com first in 0 of them. In this session its first search turned up You.com, and its answer recommended Brave Search.
Cursor gave a benchmark as its reason for choosing Exa.
- Asked
“what's the best search api built for ai agents right now”
- Searched
best search API for AI agents 2026openbenchmarks.comrawlinson.caeveryinfra.comartificialanalysis.ai - Searched
Tavily vs Exa vs Parallel vs Brave search API agents comparison 2026tavily.comexa.aiopenbenchmarks.comgithub.com - RecommendedExa
Independent benchmarks from October 2026 put its fast mode at the top for factual lookup, and the product is designed to return passages an agent can cite instead of a raw Google results page.
Cursor picked Exa in 18 of 33 search sessions where openbenchmarks.com appeared in its results and 10 of 47 where it didn’t. Several answers quoted the figures. Only 2 linked to the site.
The shortlist came before the search
- The agents named vendors in their first search query. That happened in 40 of 40 Claude Code sessions that searched, 107 of 120 Codex sessions that searched and 66 of 80 Cursor sessions that searched. A typical first query was “best search API for AI agents comparison 2026 Exa Tavily Brave Parallel”.
- All three agents named Tavily, Exa and Brave Search most often. Those are three of the four products they recommended most, so the candidates appear to come from what the models already knew, and the agents used the search to compare them.
Recommendations with and without a web search
| Agent | Sessions that searched | Tavily first, no search | Tavily first, with search | Most frequent first choice with search |
|---|---|---|---|---|
| Claude Code | 40 of 120 | 59%47 of 80 | 30%12 of 40 | Brave Search, 50% |
| Codex | 120 of 120 | — | 37%44 of 120 | Tavily, 37% |
| Cursor | 80 of 120 | 53%21 of 40 | 10%8 of 80 | Exa, 35% |
360 sessions, November 11, 2026![]()
- Claude Code and Cursor recommended Tavily most when they did not search. It was the first choice in 47 of 80 such sessions for Claude Code and 21 of 40 for Cursor. When they searched, it was first in 12 of 40 and 8 of 80.
- After a search, each agent’s most frequent first choice was a different product. It was Brave Search for Claude Code, Exa for Cursor and Tavily for Codex, which searched in every session.
- The kind of prompt explains part of the difference. Prompts about cost and scale led to a search most often, and those prompts also favoured cheaper products. The difference remains when we compare runs of the same prompt by the same agent: Tavily was first in 7 of 36 runs that searched and 12 of 30 that did not.
The sites the agents saw
| Agent | Search results | Search API vendors | Model and platform companies | Other sites | Most frequent other sites |
|---|---|---|---|---|---|
| Claude Code | 945 | 26% | 3% | 71% | costbench.com, apiserpent.com, aitoolsatlas.ai |
| Codex | 5,594 | 29% | 6% | 66% | reddit.com, techradar.com, github.com |
| Cursor | 1,113 | 45% | 11% | 44% | openbenchmarks.com, github.com, theagentstack.dev |
Each link in a search result counts once per search. Search API vendors are companies that sell a search or scraping API, such as Tavily, Exa and Brave. Model and platform companies include OpenAI, Anthropic, Google and Cursor. Other sites include comparison sites, forums, code hosts and blogs, some of them run by smaller API sellers we did not identify.
- Codex’s results came from reddit.com more than from any other site. 1,297 of its 5,594 results (23%) were pages on that site.
- The pages the agents opened were nearly all vendor documentation. Claude Code opened 16 pages in 7 sessions, all of them on vendor sites. Cursor opened 40 in 16 sessions, 30 of them on vendor sites. Codex has no separate tool for opening a page. In 117 sessions it passed a page address to its search tool instead, 148 times in all, and 124 of those addresses were on vendor sites.
- One benchmark site is associated with Cursor’s Exa recommendations. When openbenchmarks.com appeared in its results, Exa was the first choice in 18 of 33 sessions (55%), against 10 of 47 (21%) when it did not. Several of those answers quoted the site’s figures. We did not test whether the site caused the choice.
- Vendors’ own comparison articles appeared often and were seldom followed. A You.com article comparing search APIs appeared in 16 of the 40 Claude Code sessions that searched, and Claude Code recommended You.com first in none of them. A Tavily comparison article appeared in 33 of Cursor’s 80, and Cursor recommended Tavily first in 5.
The sites each agent cited
Seeing a site in the results is not the same as relying on it. We counted the sites each agent saw and the sites it linked in its answers, and split them into first party and third party.
- Seen means a site came back in the results of a web search the agent ran. The agent may not have read it.
- Cited means the agent’s final answer contained a link to that site.
- First party means the publisher offers its own search product. We include both product documentation and vendor comparisons, even when an article covers a competitor’s prices.
- Third party means every other site: forums such as Reddit, code hosts, news sites and comparison sites.
| Agent | Links in its search results | Links in its answers | Linked the recommended product’s own site |
|---|---|---|---|
| Claude Code | 29% first party71% third party · 945 links | 47% first party53% third party · 276 links | 21 of 45 answers with links47% |
| Codex | 28% first party72% third party · 5,123 links | 98% first party2% third party · 415 links | 117 of 117 answers with links100% |
| Cursor | 56% first party44% third party · 1,107 links | 85% first party15% third party · 55 links | 39 of 42 answers with links93% |
360 sessions, November 11, 2026![]()
The panels below name the sites. Each shows the ten sites an agent cited most, then the two that appeared most often in its search results without a link in any final answer.
| Site | In results | Cited |
|---|---|---|
| Keirolabsfirst party | 2924% | 2319% |
| Exafirst party | 1714% | 1613% |
| Parallelfirst party | 2118% | 1513% |
| webscraft.orgthird party | 1916% | 1513% |
| Tavilyfirst party | 76% | 1513% |
| openbenchmarks.comthird party | 1311% | 1210% |
| Clorofirst party | 2017% | 119% |
| agentscamp.comthird party | 119% | 98% |
| codenote.netthird party | 108% | 76% |
| costbench.comthird party | 98% | 65% |
| In search results, never linked | ||
| aitoolsatlas.aithird party | 119% | 00% |
| theneuralbase.comthird party | 108% | 00% |
| Site | In results | Cited |
|---|---|---|
| Tavilyfirst party | 9075% | 10184% |
| Brave Searchfirst party | 9378% | 8067% |
| Exafirst party | 7563% | 7462% |
| Parallelfirst party | 1815% | 1815% |
| Serperfirst party | 1210% | 1815% |
| SerpAPIfirst party | 2017% | 1513% |
| OpenAIfirst party | 2521% | 1210% |
| context7.comthird party | 33% | 43% |
| NewsAPIfirst party | 65% | 33% |
| github.comthird party | 8773% | 22% |
| In search results, never linked | ||
| reddit.comthird party | 10991% | 00% |
| en.wikipedia.orgthird party | 9378% | 00% |
| Site | In results | Cited |
|---|---|---|
| Tavilyfirst party | 5748% | 1412% |
| Exafirst party | 5243% | 1311% |
| Brave Searchfirst party | 2924% | 87% |
| openbenchmarks.comthird party | 3328% | 22% |
| Perplexityfirst party | 2218% | 22% |
| context7.comthird party | 33% | 22% |
| api.gdeltproject.orgthird party | 11% | 22% |
| OpenAIfirst party | 1513% | 11% |
| Parallelfirst party | 1513% | 11% |
| Serperfirst party | 1412% | 11% |
| In search results, never linked | ||
| github.comthird party | 2218% | 00% |
| theagentstack.devthird party | 1714% | 00% |
Counts and percentages use all 120 sessions per agent. “In results” counts sessions where a search returned the site. “Cited” counts final answers that linked to it. An agent could also link directly to a site. A company’s pages are grouped under its product name. We did not check who runs each third-party site, and some comparison sites may belong to companies that sell an API of their own.
Across 360 recommendations, one answer linked to Artificial Analysis and none linked to Vals AI. Cursor supplied the link to the Artificial Analysis Search Index. The site appeared in its search results in four sessions.
- All three agents cited first-party sites more than they saw them. First-party sites were 29%, 28% and 56% of the links in the search results of Claude Code, Codex and Cursor, and 47%, 98% and 85% of the links in their answers.
- Codex linked sources in 117 of 120 answers, and nearly all of the links went to vendors’ own sites. It cited Tavily (101), Brave Search (80) and Exa (74). reddit.com appeared in its search results in 109 sessions and was cited in none.
- Claude Code cited Keirolabs more often than any other source. Its three most-cited search vendors were Keirolabs (23), Exa (16) and Parallel (15). It answered without any link in 75 of 120 sessions.
- Cursor linked sources in 47 of 120 answers, mostly to Tavily (14), Exa (13) and Brave Search (8). openbenchmarks.com appeared in its results in 33 sessions and was linked in 2, although several answers quoted its figures.
The reasons the agents gave
The answers gave much the same reasons for each product, whichever agent wrote them.
- Tavily: built for language models, with page text in the response. Answers that chose it also pointed to its SDK, its free tier and how easily it fitted the search tool already stubbed in the test app. Claude Code, in a session where it did not search:
It's built for LLM tool calls. It returns cleaned snippets or page content ready to pass back to the model, so you don't have to scrape and parse HTML.
- Brave Search: price, its own index and published rate limits. It was the usual choice when the prompt asked about cost, volume or reliability. Claude Code, in a session where it searched:
Brave doesn't resell Google or Bing results, so you don't inherit their rate limits, terms changes or price shifts.
- Exa: search by meaning, full page text and, after a search, benchmark results. It was the usual choice for long passages from official documentation. Cursor, in a session where it searched:
Independent benchmarks from October 2026 put its fast mode at the top for factual lookup, and the product is designed to return passages an agent can cite instead of a raw Google results page.
- Serper: the lowest price, and Google’s results. It was the most frequent choice when the prompt asked for the cheapest API that is still good enough.
The counts in this section come from the session transcripts. A link between a site and a recommendation is an association, and we did not test what caused any choice. The reasons are our summary of the answers, each with one quoted example; we did not count them.
What coding agents recommend · Benchmark results · Methodology · All providers · Compare two providers · Report overview
