How to give an AI agent live web access
Work out which of the three web-access layers your agent actually needs, price it per search instead of per token, and keep the provider swappable.
on this page · 0 / 0 checked
Asking a chat assistant to look something up feels free, because it is bundled into a subscription you already pay. Building something that looks things up is a different business. The moment a workflow runs on a schedule, or a customer types into a form on your site, every lookup becomes a metered call on someone else’s index, billed per search rather than per word. Most people discover this in the second week, when the bill is not large but is entirely made of a line item they never chose.
This guide is for a solo operator or a small team wiring web access into something that runs without a person watching: a research step in an n8n or Make scenario, a support bot that has to cite the current refund policy, a nightly digest. It is not for anyone who only uses the chat window, where this is already paid for and nothing here changes what you do. It is also not for people building their own crawler, which is a much larger project than this. Every price below was read from the vendor’s own page on 4 September 2026, and all of them move.
Three different things hide behind the phrase “web access”
The first layer is search. You send a query, you get back a ranked list of results. This is what Brave, Exa and Tavily sell [5][6][7]. Exa’s search request covers up to 10 results and bills $1 per 1,000 for each result above that, which is a fair picture of the shape of the product [6]. It is a list, not an answer, and something still has to read it.
The second layer is an answer with sources attached. You send a question, you get prose back. Perplexity’s Sonar API sits here, which is why it bills output tokens as well as a fee per request [4]. So does Google’s Grounding with Google Search, billed by the search request rather than by the run [3].
The third layer is fetching. You have a URL and you want the page as clean text. That is a separate job from finding the page, it fails differently, and it is priced differently. Exa bills search at $7 per 1,000 requests and page contents at $1 per 1,000 pages, which tells you these are two products in a trench coat [6].
The built-in search tools in Claude and ChatGPT collapse all three. The model decides when to search, runs the query, reads the results, and writes the answer with citations, and you never see the middle. That is genuinely less work. It also means the search, the reading and the writing are one purchase from one vendor, which matters later.
You are buying searches, and they cost about a cent each
Here is the part that surprises people: the per-search fee usually dominates, and it has almost nothing to do with how long your prompt is.
Anthropic’s web search tool is $10 per 1,000 searches on the Claude API, plus standard token costs for the content the search pulls in, and a search that errors is not billed [1]. OpenAI’s built-in web search tool is $10.00 per 1,000 calls, and its pricing page states that “search content tokens are free” [2]. Google’s is the outlier at the top: for the Gemini 3.x models the API gives you 5,000 free search requests per month shared across those models, then charges $14 per 1,000 requests [3].
The dedicated search vendors sit slightly below that. Brave’s Search plan is $5 per 1,000 requests with $5 in free credit applied monthly and 50 queries per second [5]. Exa charges $7 per 1,000 search requests, $12 to $15 per 1,000 for deep search, and gives $20 in credit on signup plus $10 a month after [6]. Tavily is credit-based: a basic search is 1 credit, an advanced search is 2, the free tier is 1,000 credits a month, and pay-as-you-go is $0.008 a credit, so a basic search runs to $8 per 1,000 [7]. Perplexity’s Sonar charges both, a request fee of $5 to $12 per 1,000 depending on how much search context you ask for, plus $1 per million input and output tokens [4].
So a plain search prices out between half a cent and one and a half cents right across the market, and the convenience of having the model run it costs you a few dollars per thousand over doing it yourself. That is a small enough gap that convenience usually wins. It is not small enough to ignore once a scheduled job is firing thousands of searches a week. The exceptions are priced like exceptions: Exa’s deep search runs $12 to $15 per 1,000 [6], and Google still bills $35 per 1,000 grounded prompts on Gemini 2.5 Pro [3].
Searches, not runs. One agent turn can fire several. 22 working days. Token costs sit on top unless the vendor states search content tokens are free. Computed in the page; nothing is sent anywhere.
The number to put in the first box is the one people get wrong. It is not how many times your workflow runs. An agent given a research task will often search four or five times for one answer, because each result changes what it wants to ask next. Count searches in a real run before you budget.
Search inside the model is a rental, and the terms vary by landlord
The built-in tools are the right default for most small operators, and you should still know exactly what you are renting.
Availability is not uniform, even for the same tool from the same vendor. Anthropic’s web search tool ships in three versions, web_search_20250305, web_search_20260209, which adds dynamic filtering of results before they reach the context window, and web_search_20260318, which adds control over what appears in the response for agentic workflows [1]. All three run on the Claude API. On Google Cloud and on Azure-hosted Microsoft Foundry deployments only the basic version is available, without dynamic filtering. On Amazon Bedrock the tool is not available at all [1].
Read that again if you deploy through a cloud marketplace because your accountant prefers one bill. The model is the same, the tool is not, and the version numbers in that list are dated 2025 and 2026, which is the rate at which the interface you are coding against changes. Anything built on the assumption that a bundled tool stays put is building on a rental agreement.
The same shape shows up at Google. Gemini 2.5 Pro is still listed with the older grounding terms, 1,500 requests per day free and then $35 per 1,000 grounded prompts, while the 3.x models moved to 5,000 free per month and $14 per 1,000 [3]. Same vendor, same feature, two price structures live on one page, separated only by which model you happen to have wired up.
Two dials change both the bill and the answer
Most of the quality you will get out of agent search comes from two settings, and both are usually left at default.
The first is which domains count. Anthropic’s tool takes allowed_domains or blocked_domains, and passing both returns a 400 error, so you pick a posture rather than tuning one [1]. An allowlist is the stronger move and the one people skip. If your bot answers questions about shipping rules, the useful index is the carrier’s own site and your own documentation, not the open web, and restricting it removes an entire class of confident wrong answers sourced from a content farm. There is also max_uses, which caps searches per request and returns a max_uses_exceeded error when the model tries to go past it [1]. Set it. At $10 per 1,000 searches, a run capped at 10 costs 10 cents and an uncapped one that loops 1,000 times costs $10, every time it fires [1].
The second dial is depth, and it is priced. Perplexity’s Sonar charges a request fee that rises with search context size: $5 per 1,000 requests at low, $8 at medium, $12 at high, with sonar-pro running $6, $10 and $14 for the same three settings on top of $3 per million input tokens and $15 per million output [4]. Exa prices the same idea as separate products, $7 per 1,000 for search and $12 to $15 for deep search [6]. Depth is not a quality slider you turn up and forget. It is a purchase, roughly double at the top, and most questions do not need it.
The pages underneath are being metered too
There is a floor beneath all of this that is also shifting. Search vendors sell you access to an index, and the index is built from pages whose owners are increasingly deciding whether crawlers get in and at what price. Cloudflare’s pay per crawl, currently in closed beta, lets a site owner set a price per zone and charge a fee each time an AI crawler accesses a page; crawlers either present payment intent in a request header or receive an HTTP 402 Payment Required response with the price attached [8].
You will probably never touch that header. It still lands on you, in two ways. Coverage becomes a real difference between vendors rather than a marketing claim, because a site that has priced itself out of one index is simply absent from your results with no error to alert you. And the cost of crawling has to be paid by someone, which means the half-cent search is not a floor that holds forever.
The practical version is unglamorous. Before you commit, run twenty questions your users actually ask through two providers and read the URLs that come back, not the summaries. Coverage of the specific sources you need is the only benchmark that matters, and it takes an afternoon.
Make the search provider a line you can change
Treat web access the way you would treat a payment processor. One place in your workflow calls it, everything else calls that place. In an n8n or Make scenario, that is a single sub-workflow or module that takes a query and returns results, so swapping vendors is one edit rather than nine. If you are letting the model search for itself, the equivalent discipline is keeping the prompt and the domain rules in your own notes rather than only inside the vendor’s console, because those are the parts you would need to rebuild.
Log the query and the URLs, not just the answer. Citations rendered in a chat bubble disappear when the conversation does, and when a customer disputes what your bot told them in March, the useful record is which pages it read. This log is also the only honest way to evaluate a second provider later, since you can replay real queries instead of guessing at representative ones.
Cache aggressively at the query level. A digest that runs every morning asks nearly the same questions every morning, and a day-old result for a stable fact is not worse, it is just cheaper. The searches worth paying full price for are the ones where recency is the point.
What still goes wrong
Prices and free tiers here are a snapshot from one day. Google’s own pricing page already carries two different grounding rates depending on model generation, which is a fair warning about how stable any of this is [3]. Re-read the pricing page of whatever you pick before you scale a workflow, not after.
The harder problem is that grounded does not mean correct. A search tool guarantees the model saw some pages, not that it read them properly, not that the pages were right, and not that the top result was not written last week by someone with a stake in the answer. Restricting domains helps and does not fix it. If your agent’s output goes to a customer or into a document with your name on it, something still has to check the claim against the cited page, and that something is you, at least for the categories where being wrong is expensive.
Finally, the failure mode nobody plans for is silence. Search providers degrade before they break: results get thinner, freshness slips, a site drops out of the index. Nothing raises an error, your workflow keeps running, and the answers quietly get worse. The only defence is looking at the raw results occasionally, which is the sort of chore that never makes it onto a calendar. Put it on the calendar.
- 01Anthropic — Web search toolplatform.claude.com
- 02OpenAI — API pricingopenai.com
- 03Google — Gemini API pricingai.google.dev
- 04Perplexity — Pricing (Sonar API)docs.perplexity.ai
- 05Brave — Search APIbrave.com
- 06Exa — Pricingexa.ai
- 07Tavily — API creditsdocs.tavily.com
- 08Cloudflare — What is pay per crawl?developers.cloudflare.com