Live data from Hacker News

Web search on the Anthropic API

anthropic.com

11–20 of 65 posts

Re: Web search on the Anthropic API

#11
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.

Right, but are there any restrictions on what I can do with them?

Google Gemini has some: https://ai.google.dev/gemini-api/docs/grounding/search-sugge...

OpenAI has some rules too: https://platform.openai.com/docs/guides/tools-web-search#out...

> "When displaying web results or information contained in web results to end users, inline citations must be made clearly visible and clickable in your user interface."

I'm used to search APIs coming with BIG sets of rules on how you can use the results. I'd be surprised but happy if Anthropic didn't have any.

The Brave Search API is a great example of this: https://brave.com/search/api/

They have a special, much more expensive tier called "Data w/ storage rights" which is $45 CPM, compared to $5 CPM for the tier that doesn't include those storage rights.

Re: Web search on the Anthropic API

#12

It would be nice if the search provider could be configured. I would like to use this with Kagi.

I would really love this too. However I think that the only solution for that is to give it a Kagi search tool, in combination with a web scraping tool, and a loop while it figures out whether it's got the information it needs to answer the question.

Re: Web search on the Anthropic API

#13
post #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 t…

That's been my experience as well. Web search built into the API is great for convenience, but it would be ideal to be able to provide detailed search and reranking params.

Would be interesting to see comparisons for custom web search RAG vs API. I'm assuming that many of the search "params" of the API could be controlled via prompting?

Re: Web search on the Anthropic API

#14
Related: For those who want to build their own AI search for free and connect it to any model they want, I created a browser MCP that interfaces with major public search engines [0], a SERP MCP if you want, with support for multiple pages of results.

The rate limits of the upstream engines are fine for personal use, and the benefit is it uses the same browser you do, so results are customized to your search habits out-of-the-box (or you could use a blank browser profile).

0: https://herd.garden/trails/@omneity/serp

Re: Web search on the Anthropic API

#15
If you use your own search tool, you would have to pay for input tokens again every time the model decides to search. This would be a big discount if they only charging once for all output as output tokens but seems unclear from the blog post

Re: Web search on the Anthropic API

#17
Now all the big 3 LLM providers provide web search grounding in their APIs, but how do they compare in ranking quality of the retrieved web search results? Anyone run benchmarks here?

Clearly web search ranking is hard after decades of content spam that's been SEO optimized (and we get to look forward to increasing AI spam dominating the web in the future). The best LLM provider in the future could be the one with just the best web search ranking, just like what allowed Google to initially win in search.

Re: Web search on the Anthropic API

#18
post #16

Is search really that costly to run? $10/1000 searches seems really pricey. I'm wondering if these costs will come down in a few years.

they will come down, because up until recently consumers were not paying directly for searches, with the LLM which has a cutoff date in the past and hallucinations, search got popular paid API.

Popularity will grow even more, hence competition will increase and prices will change eventually

Re: Web search on the Anthropic API

#19

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…

Well also Google has put onerous conditions on their service:

- If you show users text generated by Gemini using Google Search (grounded Gemini), you must display a provided widget with suggested search terms that links directly to Google Search results on google.com.

- You may not modify the text generated by grounded Gemini before displaying it to your users.

- You may not store grounded responses more than 30 days, except for user histories, which can retain responses for up to 6 months.

https://ai.google.dev/gemini-api/terms#grounding-with-google...

https://ai.google.dev/gemini-api/docs/grounding/search-sugge...

Re: Web search on the Anthropic API

#20
post #11

Earlier quoted context omitted.

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

Right, but are there any restrictions on what I can do with them? Google Gemini has some: https://ai.google.dev/gemini-api/docs/grounding/search-sugge... OpenAI has some rules too: https://platform.openai.com/docs/guides/tools-web-search#out... > "When displaying web results or information contained in web results to end users, inline citations must be made clearly visible and clickable in your user interface." I'm u…

Google's restrictions are outlandish: "[You] will not modify, or intersperse any other content with, the Grounded Results or Search Suggestions..."
Post reply on HN