-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Tavily Alternatives: Research & Recommendation
Our Current Setup
Our web-search.ts is cleanly isolated — it exports executeSearch(subQueries) and internally calls callTavily(query). The output is normalized to RawSearchResult[]. This is a great position to be in because swapping the provider only requires replacing the inner callTavily function. The executeSearch orchestration (retry, dedup, logging) stays untouched.
The Contenders
Here's what was found across benchmarks, pricing, and practical fit for your news-focused trend search use case:
| Provider | Cost per 1K requests | Free Tier | News Support | Latency | Quality (benchmark) | Self-hosted? |
|---|---|---|---|---|---|---|
| Tavily (current) | ~$5/1K (credit-based) | 1,000 credits/mo | Native topic: "news" |
~3s | 93.3% accuracy | No |
| Serper.dev | $0.30/1K | 2,500 req/mo | Google News tab | ~1.8s | ~93.5% | No |
| Brave Search API | $5/1K (Base AI) | 2,000 req/mo (non-commercial) | Has news endpoint | ~669ms | Highest agent score (14.89) | No |
| DuckDuckGo (ddgs) | Free (scraping) | Unlimited (no API key) | searchNews() method |
Variable | Unranked, lower quality | No |
| Exa.ai | ~$5-10/1K (credit-based) | $10 free credits | Semantic, not news-specific | <1s simple, 3-8s research | 94.9% accuracy | No |
| SearXNG | Free (self-hosted) | Unlimited | Aggregates multiple engines | Depends on infra | Depends on upstream engines | Yes |
Sources: AIMultiple benchmark, HumAI comparison, Scrapfly pricing analysis. Content was rephrased for compliance with licensing restrictions.
Detailed Evaluation
1. Serper.dev — Best bang for buck
- 16x cheaper than Tavily ($0.30 vs ~$5 per 1K)
- Scrapes Google Search results, including Google News
- 2,500 free requests/month, then pay-as-you-go
- Fast (~1.8s), simple REST API, returns structured JSON
- No content extraction built-in (just titles, snippets, links) — but your synthesizer LLM handles that anyway
- Integration effort: ~1 hour. Replace
callTavilywithcallSerper. The response shape maps cleanly toRawSearchResult
2. Brave Search API — Best quality
- Topped the AIMultiple agent benchmark, consistently outperformed Tavily
- Fastest latency at ~669ms
- Has a dedicated news search endpoint
- Owns its own index (not scraping Google)
- Free tier is 2,000 req/mo but non-commercial. Paid is $5/1K — same as Tavily
- Integration effort: ~1 hour. Clean REST API, similar response structure
3. DuckDuckGo (via ddgs npm package) — Free but fragile
- Completely free, no API key needed
- The
ddgspackage uses browser automation (Puppeteer-like) under the hood — it scrapes DDG - Has a
searchNews()method that fits your use case - Risks: rate limiting, no SLA, no guaranteed uptime, scraping can break anytime
- No relevance scoring in results
- Integration effort: ~2 hours. Need to install
ddgs, adapt the response shape, handle browser lifecycle
4. SearXNG (self-hosted) — Free but ops overhead
- Open-source meta-search engine, aggregates Google/Bing/DDG/etc.
- Completely free, no API keys for the meta-engine itself
- Has a JSON API endpoint you can hit from Node.js
- Requires hosting infrastructure (Docker container)
- You already have Docker in your project, so spinning it up is feasible
- Risk: upstream engines can rate-limit or block your instance
- Integration effort: ~4-6 hours. Docker setup + new adapter + testing reliability
5. Exa.ai — Best accuracy, but not cheaper
- Highest accuracy (94.9% on SimpleQA)
- Semantic/neural search — great for research queries
- Not specifically news-focused (no
topic: "news"equivalent) - Pricing is credit-based, roughly comparable to Tavily
- Integration effort: ~1-2 hours
Initial Recommendation
Go with Serper.dev as primary, keep Tavily as fallback.
Here's why:
- 16x cheaper for the same (or better) quality
- Google News results are exactly what your trend search needs
- Minimal integration effort — your architecture already isolates the search provider
- The free tier (2,500/mo) covers development and light production use
- If Serper ever has issues, Tavily is already wired up as a fallback
The integration approach suggested is a provider pattern — abstract the search call behind an interface so you can swap providers via env config:
// src/server/trend-search/search-provider.ts
type SearchProvider = "tavily" | "serper" | "brave" | "duckduckgo";
async function callSearchProvider(query: string): Promise<RawSearchResult[]> {
const provider = env.server.SEARCH_PROVIDER ?? "tavily";
switch (provider) {
case "serper": return callSerper(query);
case "brave": return callBrave(query);
case "duckduckgo": return callDuckDuckGo(query);
case "tavily":
default: return callTavily(query);
}
}Then executeSearch calls callSearchProvider instead of callTavily directly. Each provider adapter normalizes its response to RawSearchResult[]. Zero changes needed in the pipeline, synthesizer, or Inngest job.
What we should avoid
- DuckDuckGo as primary — no SLA, scraping-based, can break without notice. Fine for personal projects, risky for a product.
- SearXNG for now — the ops overhead of self-hosting and maintaining it isn't worth it unless you're doing very high volume (10K+ searches/month). Revisit if costs become a real problem.
- Exa — great accuracy but not cheaper than Tavily and not news-focused. Doesn't solve your cost problem.
Should we do it?
Yes, but incrementally. The development debt is minimal (~2-3 hours for the provider abstraction + Serper adapter). Our web-search.ts is already well-structured for this. The cost savings are significant if you scale beyond the free tiers. And having a fallback provider is just good engineering.