Live data from Hacker News

Web search on the Anthropic API

anthropic.com

1–10 of 65 posts

Re: Web search on the Anthropic API

#3
The web search functionality is also available in the backend Workbench (click the wrench Tools icon) https://console.anthropic.com/workbench/

The API request notably includes the exact text it cites from its sources (https://docs.anthropic.com/en/docs/build-with-claude/tool-us...), which is nifty.

Cost-wise it's interesting. $10/1000 queries is much cheaper for heavy use than Google's Gemini (1500 free per day then $35/1000) when you'd expect Google to be the cheaper option. https://ai.google.dev/gemini-api/docs/grounding

Re: Web search on the Anthropic API

#5

The web search functionality is also available in the backend Workbench (click the wrench Tools icon) https://console.anthropic.com/workbench/ The API request notably includes the exact text it cites from its sources ( https://docs.anthropic.com/en/docs/build-with-claude/tool-us... ), which is nifty. Cost-wise it's interesting. $10/1000 queries is much cheaper for heavy use than Google's Gemini (1500 free per day the…

So the price is just the $0.01 per query? Are they not charging for the tokens loaded into context from the various sources?

Re: Web search on the Anthropic API

#6
I think the most interesting thing to me is they have multi-hop search & query refinement built in based on prior context/searches. I'm curious how well this works.

I've built a lot of LLM applications with web browsing in it. Allow/block lists are easy to implement with most web search APIs, but multi-hop gets really hairy (and expensive) to do well because it usually requires context from the URLs themselves.

The thing I'm still not seeing here that makes LLM web browsing particularly difficult is the mismatch between search result relevance vs LLM relevance. Getting a diverse list of links is great when searching Google because there is less context per query, but what I really need from an out-of-the-box LLM web browsing API is reranking based on the richer context provided by a message thread/prompt.

For example, writing an article about the side effects of Accutane should err on the side of pulling in research articles first for higher quality information and not blog posts.

It's possible to do this reranking decently well with LLMs (I do it in my "agents" that I've written), but I haven't seen this highlighted from anyone thus far, including in this announcement.

Re: Web search on the Anthropic API

#7

The web search functionality is also available in the backend Workbench (click the wrench Tools icon) https://console.anthropic.com/workbench/ The API request notably includes the exact text it cites from its sources ( https://docs.anthropic.com/en/docs/build-with-claude/tool-us... ), which is nifty. Cost-wise it's interesting. $10/1000 queries is much cheaper for heavy use than Google's Gemini (1500 free per day the…

So the price is just the $0.01 per query? Are they not charging for the tokens loaded into context from the various sources?

The query cost is in addition to tokens used. It is unclear if the tokens ingested from the search query count as addititional input tokens.

> Web search is available on the Anthropic API for $10 per 1,000 searches, plus standard token costs for search-generated content.

> Each web search counts as one use, regardless of the number of results returned. If an error occurs during web search, the web search will not be billed.

Re: Web search on the Anthropic API

#8
I couldn't see anything in the documentation about whether or not it's allowed to permanently store the results coming back from search.

Presumably this is using Brave under the hood, same as Claude's search feature via the Anthropic apps?

Re: Web search on the Anthropic API

#9
post #8

I couldn't see anything in the documentation about whether or not it's allowed to permanently store the results coming back from search. Presumably this is using Brave under the hood, same as Claude's search feature via the Anthropic apps?

Given the context/use of encrypted_index and encrypted_context, I suspect search results are temporarily cached.

Re: Web search on the Anthropic API

#10
I'm also interested to know if there are other limitations with this. Gemini, for example, has a built-in web search tool, but it can't be used in combination with other tools, which is a little annoying. o3/o4-mini can't use the search tool at all over the API, which is even more annoying.
Post reply on HN