BestSearch

/blog

How to cut your Tavily API costs in half

Published June 7, 2026 · BestSearch

If your invoice keeps climbing and you have started to feel that Tavily is too expensive for the traffic you actually serve, you are not wrong to look for levers. The good news: most of the bill is controllable, and the single biggest lever is the per-credit rate itself. This guide walks through where the spend hides, the optimizations worth doing first, and how to cut your Tavily API costs by half with a drop-in, fully compatible gateway — no code rewrite required.

First, know what each call actually costs

Tavily meters usage in credits, and not every endpoint costs the same. Before you optimize anything, you have to know your mix. Roughly, the credit weights look like this:

  • /search — 1 credit for a basic search, 2 credits for an advanced (deep) search.
  • /extract — about 1 credit per 5 URLs you pull clean content from.
  • /crawl and /map — heavier, around 5 credits, because they fan out across a site.
  • /research — the most expensive, near 10 credits, since it chains search and extraction into one deeper job.

That spread matters. An assistant firing one basic search per turn burns credits at a completely different rate than an agent that runs advanced searches, extracts a dozen URLs, and kicks off a research call per task. Always confirm the current numbers on Tavily's own pricing page — but the shape holds: your effective cost is a weighted blend of endpoint choice and depth.

Lever 1: stop over-using advanced search

Depth creep is the most common way bills double quietly. Defaulting every query to advanced "just to be safe" means you pay 2 credits where 1 would have answered. Start basic, and only escalate when the basic result is genuinely thin:

# Basic search = 1 credit. Reserve advanced (2 credits) for hard queries.
resp = client.search(query, search_depth="basic")

# Only escalate when the basic result is thin:
if not resp["results"]:
    resp = client.search(query, search_depth="advanced")

For many retrieval and chat workloads, the majority of queries do not need deep mode. Auditing this one parameter can shave 20–40% off search spend before you touch anything else.

Lever 2: cache, dedupe, and batch

In any credit model, repeated identical requests are pure waste. Three habits pay off immediately:

  • Cache by normalized query. Hash the query plus parameters and store results for a sensible TTL. Trending topics rarely change minute to minute.
  • Dedupe in-flight. Agents love to re-ask the same thing. Collapse duplicate searches within a task before they hit the API.
  • Batch extraction. Since /extract is billed per ~5 URLs, send URLs in groups instead of one call per URL — you waste far fewer fractional credits.

These are code-side wins that lower how many credits you consume. They are real, but they have a ceiling — you can only dedupe so much genuine traffic.

Lever 3: halve the per-credit rate (the big one)

Once your usage is tuned, the largest remaining lever is the price of a credit itself. Tavily's list price is $0.008 per credit. BestSearch is a drop-in web search API that mirrors Tavily one-for-one — the same 5 endpoints (/search, /extract, /crawl, /map, /research), the same request parameters, the same JSON response shapes, and the same credit accounting — at $0.004 per credit. Because the contract is identical, this multiplies through your entire bill no matter which endpoints dominate. Halving the base rate halves the whole curve.

A worked monthly example

Say a production workload consumes 1,000,000 credits per month — easy to reach once agents and research jobs are live. At $0.008 per credit that is $8,000/month. Run the identical workload at $0.004 per credit and the same million credits cost $4,000/month — a flat 50% cut, $48,000/year saved, with no change to how many credits you burn. The optimizations above lower your credit count; the rate change lowers the multiplier. Stack both and the savings compound.

Migrating is one line, not a rewrite

Because the API surface is identical, you keep the Tavily SDK and just repoint the base URL:

import os
from tavily import TavilyClient

# Same SDK, same methods. Repoint the base URL — that is the whole migration.
client = TavilyClient(
    api_key=os.environ["BESTSEARCH_API_KEY"],
    api_base_url="https://app.websearchapi.tech",
)

resp = client.search("vector database benchmarks 2026", search_depth="advanced")
print(resp["results"][0]["url"])

Prefer raw HTTP? The request is byte-for-byte a Tavily request — only the host differs:

curl -s https://app.websearchapi.tech/search \
  -H "Authorization: Bearer $BESTSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "cut tavily api costs", "search_depth": "basic"}'

That is the whole migration. For the field-by-field comparison, see the Tavily alternative breakdown; the exact per-credit numbers live on the pricing page, and full request/response references are in the docs.

Ready to cut your bill in half?

Same endpoints, same SDK, same credit model — at $0.004 per credit. Repoint one base URL and keep shipping.

Get Started