Live data from Hacker News

Web search on the Anthropic API

anthropic.com

31–40 of 65 posts

Re: Web search on the Anthropic API

#31

Earlier quoted context omitted.

If you want an unofficial API, most data providers usually charge $4/1000 queries or so. By unofficial, I mean they just scrape whats in Google and return that to you. So thats the benchmark I use, which means the cost here is around 2x that. As far as I know, the pricing really hasnt gone down over the years. If anything it has gone up because Google is increasingly making it harder for these providers

That seems expensive. For 100 results per query, serper.dev is $2/1000 queries and Bright Data is $1.5/1000 queries.

Sorry, got this off by a multiple. Yes, pricing is around that. So these “official” APIs are much more expensive.

Re: Web search on the Anthropic API

#32
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…

> 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. Interesting, I'm taking isotretinoin right now and I've found it's more interesting and useful to me to read "real" experiences (from reddit and blogs) than research papers.

Wear lots of (mineral) sunscreen, and drink lots and lots of water. La Roche Posey lotions are what I used, and continue to use with tretinoin. Sunscreen is the most important.

Re: Web search on the Anthropic API

#33
post #21
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.

Yes. The Bing Search API is priced at $15/1k queries in the cheapest tier, Brave API is $9 at the non-toy tier, Google's pricing for a general search API is unknown but their Search grounding in Gemini costs $35/1k queries. Search API prices have been going up, not down, over time. The opposite of LLMs, which have gotten 1000x cheaper over the last two years.

> Google's pricing for a general search API

As I discovered recently, and much to my surprise, Google does not offer a "general search API", at least not officially.

There is a "custom search" API that sounds like web search, but isn't: it offers a subset of the index, which is not immediately apparent. Confusing and misleading labeling there.

Bing offers something a bit better, but I recently ended up trying the Kagi API, and it is the best thing I found so far. Expensive ($25/1000), but works well.

Re: Web search on the Anthropic API

#34

Earlier quoted context omitted.

> 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. Interesting, I'm taking isotretinoin right now and I've found it's more interesting and useful to me to read "real" experiences (from reddit and blogs) than research papers.

Wear lots of (mineral) sunscreen, and drink lots and lots of water. La Roche Posey lotions are what I used, and continue to use with tretinoin. Sunscreen is the most important.

Great advice, already quite on top of it. I'd recommend checking out stylevana and importing some of the japanese/korean sunscreens if you haven't tried them out yet!

Re: Web search on the Anthropic API

#35
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…

> 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. Interesting, I'm taking isotretinoin right now and I've found it's more interesting and useful to me to read "real" experiences (from reddit and blogs) than research papers.

Can you elaborate? What information are you gleaning from anecdotes that is both reliable and efficacious enough to outweigh research?

I'm not trying to challenge your point, I am genuinely curious.

Re: Web search on the Anthropic API

#36
post #20

Earlier quoted context omitted.

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

The API response actually contains the full HTML to include.

It just goes counter to the way I think about LLMs. It assumes end-products will merely be thin wrappers around an API, perhaps with some custom prompts. It's like thinking of the internet as a faster telegraph, instead of understanding that it's an entirely new paradigm. The most interesting applications of AI will use search as just one ingredient, one input, that will be sliced, diced, and pureed as it is combined with half a dozen other sources of information.

When your intelligent email client uses Gemini to identify the sender of an email as someone in the industry your B2B company serves, deciding to flag the email as important, where is that HTML supposed to go? Where does it go in a product that generates slide show lesson plans? What if I'm using it to generate audio or video? What if a digital assistant uses Gemini as a tool a few dozen times early in a complex 10,000 step workflow that was kicked off by me asking it to create three proposals for family vacations complete with a three 5-minute video presentations on each option? What if my product is helping candidates write tailored cover letters?

It's bad optics for a company just ruled to have acted illegally to maintain a monopoly in "general search services and general text advertising," but worse, it lacks imagination.

Re: Web search on the Anthropic API

#37
post #33
post #21

Earlier quoted context omitted.

Yes. The Bing Search API is priced at $15/1k queries in the cheapest tier, Brave API is $9 at the non-toy tier, Google's pricing for a general search API is unknown but their Search grounding in Gemini costs $35/1k queries. Search API prices have been going up, not down, over time. The opposite of LLMs, which have gotten 1000x cheaper over the last two years.

> Google's pricing for a general search API As I discovered recently, and much to my surprise, Google does not offer a "general search API", at least not officially. There is a "custom search" API that sounds like web search, but isn't: it offers a subset of the index, which is not immediately apparent. Confusing and misleading labeling there. Bing offers something a bit better, but I recently ended up trying the Kag…

I work at Google but not on this. We do offer Gemini with Google Search grounding which is similar to a search API.

Re: Web search on the Anthropic API

#38

Earlier quoted context omitted.

> 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. Interesting, I'm taking isotretinoin right now and I've found it's more interesting and useful to me to read "real" experiences (from reddit and blogs) than research papers.

Can you elaborate? What information are you gleaning from anecdotes that is both reliable and efficacious enough to outweigh research? I'm not trying to challenge your point, I am genuinely curious.

I just want to hear about how other people have felt while taking the medicine. I don't care about aggregate statistics very much. Honestly what research do you read and for what purpose? All social science is basically junk and most medical research is about people whose bodies and lifestyles are very different than mine.

Re: Web search on the Anthropic API

#39

Earlier quoted context omitted.

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…

Hi, stephanie from Anthropic here. Thanks for the feedback! We've updated the docs to hopefully make it a little more clear but yes search results do count towards input tokens

https://docs.anthropic.com/en/docs/build-with-claude/tool-us...

Re: Web search on the Anthropic API

#40
post #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

Thanks for the feedback, just updated our docs to hopefully make this a little clearer. Search results count towards input tokens on every subsequent iteration

https://docs.anthropic.com/en/docs/build-with-claude/tool-us...

Post reply on HN