tavily 402 insufficient credits advanced search depth
Fixes Tavily 402 insufficient credits on advanced search depth: credit math, depth selection, and usage controls. Use when advanced depth burns credits and basic works. Not for 401 auth errors.
TL;DR
Advanced search depth costs several times more credits per query than basic, so the 402 is usually correct: the query really did cost that much. Switch routine queries to basic depth, reserve advanced for queries that need it, and cap per-query spend. If the math still does not add up, check for runaway loops issuing duplicate queries.
tavily 402 insufficient credits advanced search depthUse this when
- Advanced depth returns 402 while basic depth works on the same key.
- Credit burn spiked after enabling advanced depth.
- You are close to the plan limit mid-cycle.
Not for this skill when
- The error is 401. That is auth.
- Basic depth also 402s. Then the account is simply empty.
Steps
- Check the dashboard for per-query credit costs: note what advanced vs basic actually costs. Verify: you have the real multiplier, not a guess.
- Default everything to basic depth; use advanced only for queries where basic returned thin results. Verify: daily burn drops immediately.
- Dedupe queries before sending: cache results by normalized query string. Verify: repeat queries stop costing credits.
- Set a per-run budget in your code: count queries and stop before the plan limit. Verify: the 402 stops appearing mid-run.
- If burn is still unexplained, audit for loops: log every query issued for an hour. Verify: no duplicate or runaway queries.
Variant phrasings
tavily credits exhausted
The short search, same depth-first diagnosis.
tavily advanced search cost
Cost phrasing, points at step 1.
tavily 402 payment required
Status phrasing, lands on the budgeting fix.
Compatibility: Tavily search API. Credit costs differ by depth and plan; the dashboard is the source of truth.
Why it happens
Advanced depth fans out to many more sources and runs extra extraction passes, which is genuinely more expensive to serve. Teams turn it on globally during testing, ship it, and discover the multiplier in production. The 402 is the billing system doing its job.
Edge cases / pitfalls
- A single agent loop can burn a month of credits in an hour. Budget caps are not optional for agent-issued queries.
- Caching search results is almost always safe; the web changes slower than your burn rate suggests.
- Do not "fix" 402s by creating extra accounts. That is terms-of-service territory.
- If advanced depth never beats basic on your queries, stop paying for it entirely.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_WayDqAgR-tVbZxDlfzti0A