DeepSeek’s search API costs $0.75 per 1,000 successful calls, and its Fetch API costs the same: both are charged per call, not per tokens. I tested them this week with our own test suite, and from Claude Code searches are free until October 31st.
yoDEV Tested · October 18, 2026 We called Search and Fetch directly from a Mac in Santiago with Python’s standard library. The results we report as ours come from that test.
Every agent that reads the web has a line in its budget that most teams have never put into numbers: the search call. Tokens have dashboards. Searches are forgotten until the bill arrives. DeepSeek just made that line explicit, cheap, and for two weeks, free—and that makes this a good moment to look at what you’re actually paying for.
What are DeepSeek’s Search and Fetch APIs?
They’re two JSON endpoints that give an agent access to the live web, and they’re part of DeepSeek’s API, the same platform you already use to call their models. DeepSeek announced them on October 17, along with the DeepSeek-V4.1-Flash-1017 model.
- Search (
POST https://api.deepseek.com/v1/tools/search) takes a query and returns structured results from DeepSeek’s own search engine: title, URL, a shortsnippetfor display, a longersummarymeant for a model to read, the completecontentof the page if you ask for it, publication date, arerank_scorefrom 0 to 3, and anauthoritylevel from 0 to 4. - Fetch (
POST https://api.deepseek.com/v1/tools/fetch) takes a URL and returns the page in Markdown.
Both use the same API key as the rest of DeepSeek’s API. Search accepts operators you already know (site:, -site:, quoted phrases, lang:, after: and before:) and returns between 1 and 50 results per call.
How much does DeepSeek’s web search API cost?
It costs $0.75 per 1,000 successful requests on Search, and another $0.75 per 1,000 on Fetch. The number of results you request doesn’t change the price: count: 50 costs the same as count: 1. If you search in English, it’s the deepseek api pricing of web search: that’s how you’ll find it in their documentation.
DeepSeek only charges for a call that returns HTTP 200 and produces a result. Errors, timeouts, and empty result sets are free. That last rule sounds generous, and our test showed why it almost never applies (more below).
Our test made 21 calls, and 13 met that rule. DeepSeek’s usage panel counted exactly 13 requests and charged less than a penny; the other 8 (one 400, two 404s, and five calls rejected for rate limit) never appeared. The panel lists charges as two separate usage types, tool-search and tool-fetch, separate from the model’s tokens, so you can track on its own line what your agent spends reading the web.
Is DeepSeek free in Claude Code and Codex?
Partly, and only until October 31st. At the time of publishing this note, DeepSeek doesn’t charge for Search and Fetch calls made by server-side tools in DeepSeek Harness, Claude Code, and Codex. Per-request charging starts October 31, 2026 at 4:00 PM UTC, which in Beijing is already November 1:
| Where you are | Charging starts (October 31) |
|---|---|
| Chile, Argentina | 1:00 PM |
| Colombia | 11:00 AM |
| Mexico City | 10:00 AM |
| Spain | 5:00 PM |
“Free” covers search requests, not the whole interaction. DeepSeek’s own guide for Claude Code explains that a web search triggers additional requests to the model to summarize what came back, and those tokens are charged at the model’s normal rate. So today a web search in Claude Code about DeepSeek costs you model tokens, and from October 31st on, tokens plus $0.00075 per search.
How do I use DeepSeek in Claude Code?
You point Claude Code to DeepSeek’s Anthropic-compatible endpoint with environment variables. This claude code deepseek setup is what DeepSeek documents (macOS and Linux):
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=<your DeepSeek API Key>
export ANTHROPIC_MODEL=deepseek-flash[1m]
export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-flash[1m]
export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-flash[1m]
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash
export CLAUDE_CODE_EFFORT_LEVEL=max
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432
Then run claude in your project. According to DeepSeek’s documentation, web search needs no extra setup: when the model decides a question requires the web, Claude Code’s Web Search tool goes through DeepSeek.
What we saw:
- With this setup, we asked Claude Code for the price of the search API: it did a search in 4 seconds and answered correctly, $0.75. At the time of publishing this note, DeepSeek’s usage panel doesn’t show that session, so we couldn’t confirm in the invoice that it went through DeepSeek or that the search came out free.
- Two warnings appear on startup, both expected. If you remove the
[1m]suffix, Claude Code doesn’t recognizedeepseek-flashand assumes a 200,000 token context. And because DeepSeek’s key takes priority over your claude.ai session, your claude.ai connectors don’t load in that session. If your workflow depends on them, keep DeepSeek in another terminal. - One detail of the model mapping worth knowing before you get the bill: DeepSeek sends any
claude-opus*name todeepseek-v4-pro, which is charged at Pro pricing, and otherclaude*names todeepseek-flash.
If you define variables on the same command line as the command (ANTHROPIC_BASE_URL=… claude), your usual Claude Code setup stays intact. That’s how we tested it.
What did our test show?
We ran 11 cases plus a burst to measure the rate limit. The main takeaway: search quality is good, Fetch is a simple HTTP reader, and the rate limit is real.
| Test | Result | Time |
|---|---|---|
| Query in English, with page content | 5 results, all above DeepSeek’s “high quality” line of 1.5 (2.4–2.8) | 952 ms |
Query in Spanish with lang:es |
10 results; Anthropic’s official Spanish documentation, first | 852 ms |
site:yodev.dev |
10 yoDEV articles, correct, with score near 1.0 | 897 ms |
Freshness with after:2026-10-15 |
Coverage of the October 17 announcement, already indexed | 706 ms |
| Nonsense query | 5 unrelated results (low score 0.15), charged | 715 ms |
count: 99 |
400, with a clear error message | 611 ms |
| Fetch: DeepSeek documentation page | 10,279 Markdown characters | 521 ms |
| Fetch: a yoDEV article in Spanish | 7,577 characters; body in Spanish, signature in Chinese | 6.1 s |
| Fetch: Excalidraw (JavaScript application) | 277 characters: “enable JavaScript” | 3.6 s |
| Fetch: arXiv PDF | 404, couldn’t download it | 545 ms |
| Fetch: page that doesn’t exist | 404, not charged | 4.1 s |
| 10 searches launched at once | exactly 5 responded and 5 got HTTP 429 | 756 ms |
These are single runs from one location, so take the times as illustrative, not as benchmarks. Four results matter if you’re going to put this behind an agent.
The rule of “empty results are free” almost never kicks in
We sent a random string, hoping for empty results and no charge. DeepSeek’s search engine returned five pages anyway, with relevance scores between 0.04 and 0.13. By DeepSeek’s own rule, that call is charged, and the usage panel confirms it: it’s one of the 13 requests we were charged for. The protection that does work is the other one: errors, timeouts, and 429s cost nothing.
The practical solution is to use the score. Real queries in our test scored between 2.0 and 2.8; garbage scored below 0.15. Filter by rerank_score before you pass results to the model and you’ll save tokens on the side. A warning: our own site scored near 1.0 in a correct match with site:, so the 1.5 line measures relevance plus authority, not whether the result is right.
The rate limit is exactly what the documentation says
DeepSeek documents 5 requests per second per account for Search, and another 5 separate for Fetch, regardless of how many keys you use. We launched 10 searches at once: 5 came back and the other 5 got a 429. An agent spreading its research in parallel needs a queue or retries with backoff. The 429s don’t charge, but the agent still has to retry them.
Fetch is not a browser
Excalidraw, a JavaScript application, came back as a 277-character notice asking you to enable JavaScript. The “Attention Is All You Need” PDF on arXiv returned a 404. When we tested those same two pages with Cloudflare’s web_fetch last week, we got 270 and 39,813 characters. For JavaScript applications you still need a real browser, and for PDFs, a reader that understands PDFs. The documentation page and our forum article converted fine; the Markdown comes with scores escaped with backslashes (\-, \.), which adds some tokens.
Fetch reads the web from a Chinese regional setting
Our own article in Spanish came back with the Discourse signature translated to Chinese, and Excalidraw’s interface too. Sites that pick the language based on visitor location or browser settings serve Fetch a Chinese version. If your agent reads multilingual sites, use URLs that lock the language explicitly.
DeepSeek or Tavily? Which costs less per search?
On a per-call basis, DeepSeek costs roughly ten times less than Tavily, the most common hosted alternative, on search. These are list prices as of October 18, 2026:
| Per 1,000 calls | Search | Page download | Free plan |
|---|---|---|---|
| DeepSeek | $0.75 USD | $0.75 USD | none outside the promotion |
| Tavily, pay-as-you-go | $8.00 USD (basic) | $1.60 USD (basic extract) | 1,000 credits per month |
| Tavily, Growth plan | $5.00 USD | $1.00 USD | same |
| wigolo (local MCP) | $0 USD | $0 USD | runs on your own hardware |
Here’s what it looks like for a research agent that does 20 searches and 10 page downloads per task, over 1,000 tasks a month:
- DeepSeek: 20,000 searches and 10,000 downloads, about $22.50.
- Tavily pay-as-you-go: about $176.
Tavily’s tavily pricing pages have no date, so check them before planning with them, and the products aren’t identical: Tavily’s advanced search and extraction options go further. What matters is the order of magnitude.
The other end of the scale is running the search locally. wigolo is an MCP server that searches, downloads, and crawls on your own machine without an API key, in exchange for setup and hardware. DeepSeek’s offer lands in the middle: a hosted index for less than a tenth of a cent per call.
What else did DeepSeek launch on October 17?
The same announcement brought DeepSeek-V4.1-Flash-1017, an update to the Flash model. DeepSeek reports better benchmark results, faster task completion, and shorter responses than the previous version, and publishes a graph of hit rate on DeepSWE versus cost per task; those are DeepSeek’s own figures, not independent measurements. The weights are on Hugging Face and ModelScope, and the model is tuned for DeepSeek Harness, which we covered when it launched. For context of the full family, start with our analysis of DeepSeek V4.
For the Claude Code setup above, the undated alias deepseek-flash is the one to use: it follows DeepSeek’s current Flash model without you changing a line of config.
Is it worth switching your agent’s search to DeepSeek?
For high-volume agent search, I’d try it now, while calls from Claude Code and Codex cost nothing.
The arguments in favor are straightforward:
- The per-call price is low enough to stop rationing searches.
- Failed calls are free.
- The index found coverage of an announcement in less than a day.
- Queries in Spanish with
lang:esreturned the correct official pages.
The arguments for caution are just as concrete:
- The ceiling of 5 per second forces a high-load agent to use a queue.
- Fetch doesn’t replace a browser or a PDF reader.
- Downloads with Chinese regional settings matter if you work with multilingual content.
- Running Claude Code through DeepSeek disables your claude.ai connectors in that session.
The two weeks until October 31st are a free trial of the search side, not of the whole bill. Put the model tokens into numbers too.
What about you? What search API does your agent use today, and how much does it cost you per month?
- With the tool’s built-in search
- With a hosted API (Tavily, Exa, Brave…)
- With a local MCP
- I prefer another option (tell us which)
Comment below or, if this article reached you by email, reply directly to the email: your reply gets posted here.
Related: web_fetch or browser? How to read webs and PDFs with Cloudflare’s Agents SDK