The Ultimate Guide to Web Search APIs for LLMs

compare

This is a comparison of web search APIs (SERP APIs) for LLM-based AI workflows and agents.

Why Use a Search API With an AI Workflow?

You may need a web search API if you’re building an LLM-powered system and want to retrieve relevant web content to include in the context you provide to the LLM.

For example, if you’re creating a fact checking tool, you might want to search the web and retrieve content relating to a fact that your system is checking.

How Do AI Agents Use Web Search APIs?

If you’re developing an AI agent, you’ll typically want it to make use of web search APIs through functionality baked into LLMs known as ‘tool-calling’, ‘tool-use’ or ‘function-calling’.

Frameworks such as LangChain have support for tool-/function-calling and have off-the-shelf integrations with some of the APIs (e.g. ones for Tavily, Exa and YOU.com.)

If an integration isn’t already available, though, it’s typically fairly simple to build one.

Web Search API Pricing

NameFree TierLowest-Volume Paid TierLowest Advertised Cost*
(at Scale)
Content Snippet SizeHighest Advertised Rate Limit*
Bing1000 calls/monthPay-as-you-go ($0.015/call)$0.015/callUp to 250 chars250 calls per second
Brave2000 calls/month;
1 call/second
Pay-as-you-go ($0.005/call)$0.005/call400 chars50 calls per second
Bright Datan/aPay-as-you-go ($0.0015/call)$0.001/call150 charsno limit
DataForSEOn/aPay-as-you-go ($0.0006/call)$0.0006/call150 chars2000 calls per minute
Exa$10 of free creditsPay-as-you-go ($0.0025/call)$0.0025/call150 chars5 calls per second
Linkup1000 calls/monthPay-as-you-go ($0.005/call)$0.005/call400 charsNot advertised
Serper2500 calls$50 (valid for 6 months)$0.0003/call150 chars300 calls per second
SerpApi100 calls/month$75/month (for 5,000 searches)$0.0055/call150 chars20% of monthly plan volume per hour
Tavily1000 calls/monthPay-as-you-go ($0.008/call)$0.005/call3000+ chars1000 calls per minute
YOU1000 calls/month
for 60 days
$100/month$0.008/call600 charsNot advertised
* Bespoke pricing and rate limits may be available for high volumes / enterprise accounts.

What to Consider When Choosing a Web Search API

  1. Relevance of search results – different services use different search engines to retrieve their results. Just as you may prefer Google search over Bing search when you’re searching manually, you may prefer the results from one web search API over those from another.
  2. Content of each search result – different services return different amounts of information for each search result and this can have a big impact on the effectiveness of your agent. You may, for example, prefer a service that returns relatively long snippets of content even if it costs more per request.
  3. Pricing – unsurprisingly, different services have different prices. Note that some services have optional parameters that can significantly impact pricing, e.g. doubling the effective cost of requests.
  4. Latency – this can vary hugely from near-instant to potentially as much as 5 minutes or more.
  5. Rate limits – all services will, in practice, be limited in the rate of requests they can handle. Some have fixed rate limits that they make public.
  6. Other terms and conditions – depending on the nature of your business, factors such as the providers’ privacy policies and/or geographic location may be very important.

    Hoping For Something Else?

    What would you like to know or see? (required)

    Your Name (optional)

    Your Email (optional)

    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

    Some of the links in this article are affiliate links. This means I may earn a commission if you make a purchase through them—at no extra cost to you. I only recommend products I genuinely believe in.