Playbooks · Coding tasks
Budget DeepSeek Search and Fetch calls
Written October 29, 2026 · Edited November 10, 2026
For a solo builder or small team × budgeting Search and Fetch calls now that they are billed × DeepSeek Harness, Claude Code, or Codex with the DeepSeek API, ending with a counted cost per task and a cap set against live billing.
Before you start
DeepSeek's Search API finds web pages for a query and returns structured results, and the Fetch API retrieves one page and returns its content as Markdown. Both are raw JSON APIs at https://api.deepseek.com, called with a DeepSeek API key. When you use the DeepSeek API through DeepSeek Harness, Claude Code, or Codex, server-side tool calls already hit the Search and Fetch APIs. Those calls are billed per successful request, at the rates below.
The billing rule is per successful request, not per token and not per result. Search and Fetch each cost $0.75 per 1,000 successful requests, from DeepSeek's pricing page. A request counts only when it returns HTTP 200 and produces a result: Search must return a non-empty results array, and Fetch must return page content. Failed requests, empty search results, and timeouts are not billed. The count field, which controls how many results a Search returns, does not change the price of the call. The $0.75 covers the call itself. Any tokens the fetched text adds to a later model call fall under model pricing, not under the $0.75.
DeepSeek's guide describes no call-count log or usage endpoint for Search and Fetch. The counting below is therefore a manual tally: count the successful calls one task makes, then project. Do not look for a counter in the docs that is not there.
What "done" looks like
At the end of one sitting you have three numbers written down: the successful Search calls and Fetch calls one representative task makes, the cost of one task at $0.75 per 1,000 successful requests for each API, and the projected cost for the number of tasks you expect to run — plus a cap, in dollars, that you will not cross without deciding to raise it.
Steps
- Confirm which of your tools makes the server-side calls. The billing note in DeepSeek's guide names three routes: DeepSeek Harness, Claude Code, and Codex, used with the DeepSeek API. If your agent reaches the DeepSeek API through one of those three, its search and fetch calls are the ones this page budgets. If it calls the Search and Fetch endpoints directly, the same per-request rates apply, and the same counting method works.
- Run one representative task and tally only successful calls. Pick the task your agent does most often. Watch its run, or read its log, and count each Search call that returned results and each Fetch call that returned page content. A call that failed, timed out, or returned an empty result list costs nothing under the billing rule, so leave it out of the tally. Record the two counts separately: Search calls and Fetch calls are billed separately, at the same rate.
- Project the cost per task and per period. Each successful call costs $0.00075. Multiply: (Search calls + Fetch calls) × $0.00075 is the Search and Fetch cost of one task. One Search and one Fetch per task is $0.0015 per task, or $1.50 per 1,000 such tasks. Twenty Searches per task is $0.015 per task. Multiply the per-task cost by the tasks you expect in a day or a week. The DeepSeek Search and Fetch cost projector does this arithmetic from the two counts and a cap.
- Set the cap as a balance limit. Search and Fetch fees are deducted from the topped-up balance or granted balance, with the granted balance used first when both exist. Top the account up only to the cap amount you decided in step 3, so the balance itself is the limit: when the balance runs out, the API answers 402, insufficient balance, and the calls stop. Re-check the balance after the first billed week and compare the deduction with the projection from step 3; if the two disagree, recount the calls before raising the cap.
- Cut the calls that repeat work. Before raising a cap, remove the calls that buy nothing new: a search repeated for the same question, a fetch of a page already fetched for the same task, and a search run on every step of a task that only needs one. The
countfield is not a lever here — asking for 50 results costs the same as asking for one — so cut calls, not results per call.
Check the agent's work
- Check that the tally counts successful calls only. A tally that includes failed, empty, or timed-out calls overstates the bill.
- Check that Search and Fetch are counted separately. One call to each is two billed calls, not one.
- Check that the projection uses $0.75 per 1,000 successful requests for each API, not $0.75 for the pair.
- Check that the cap is a topped-up balance, not a setting the docs do not describe. If the balance is far above the cap, the cap is not set.
- Check that the first billed week is compared with the projection. A projection never compared with a bill is a guess that stays a guess.
What can go wrong
- Counting every call as billed. Failed requests, empty search results, and timeouts are not billed. Counting them inflates the projection and can push a cap higher than the work needs.
- Counting a pair as one call. A task that searches and then fetches makes two billed calls. At $0.75 per 1,000 each, 1,000 such pairs cost $1.50, not $0.75.
- Hitting the rate limits and reading them as a billing problem. Search is limited to 100 requests per second and Fetch to 25 per second at the account level, counted independently, and Fetch has an additional per-domain limit. Requests above a limit get HTTP 429. Slow the calls down; do not raise the cap.
- Fetching a page that cannot be read. Fetch answers 404 when it cannot retrieve usable page content — an unavailable URL, a blocked site, or a page with no extractable Markdown. That call is not billed, but the agent may retry it. A retry loop on an unreadable page burns tasks, not Search and Fetch fees, and still needs stopping.
- Budgeting on free calls. Search and Fetch calls are billed per successful request, $0.75 per 1,000 successful requests each. A budget built on free calls understates the cost from the first call.
Limits
- This page budgets Search and Fetch calls only. Model token charges are separate, under DeepSeek's model pricing, and are not in the $0.75 figures.
- The tally is manual. DeepSeek's guide describes no endpoint that reports how many Search or Fetch calls an account has made, so the counts here come from watching one task, not from a usage report.
- Rates can change. DeepSeek's pricing page states that product prices may vary and recommends checking the page for the most recent pricing. The $0.75 figures are the rates on the pricing page; re-read the page before relying on them for a new budget.
Related playbooks
- Check your first DeepSeek search/fetch bill
- DeepSeek, Exa, Brave, Tavily: which web-search API should your agent actually pay for now that search is metered
- ChatGPT and Codex share one token budget
- DeepSeek's cheap coding model changed under the same name: retest Flash 1017 before you rely on it
Sources
Sources: Search & Fetch guide — DeepSeek API Docs, Models & Pricing — DeepSeek API Docs.
Back to: Coding playbooks hub · Also: Work out what DeepSeek Search and Fetch calls will cost now that per-request billing applies · Token cost calculator