DeepSeek Search API: curl Examples and $0.75/1K Pricing from Nov 1
On October 17, 2026, DeepSeek opened its Search and Fetch APIs, built on its own search engine, to all developers. Both endpoints bill per "successful request" at $0.75 per 1,000. Server-side tool calls made through DeepSeek Harness, Claude Code, and Codex are free for now, and per-call billing starts at 00:00 Beijing time on November 1, 2026.
Everything below comes from DeepSeek's official documentation as it stood on October 17, 2026. The official search guide is the authority.
What happened?
According to the official October 17 announcement, the Search & Fetch API launched in the same post as a model update. For the model side, see our other article: DeepSeek V4.1-Flash-1017: deepseek-flash gets new weights, do you need to change code?
What each endpoint does:
- Search:
POST https://api.deepseek.com/v1/tools/searchreturns structured search results. - Fetch:
POST https://api.deepseek.com/v1/tools/fetchfetches a single web page and returns Markdown.
Both authenticate with Authorization: Bearer <DeepSeek API Key> and take a JSON body.
How do you call it?
Search
query is required, 1 to 128 characters. count is 1 to 50, default 10. need_content defaults to false; set it to true to get page body text. ori_question can hold the user's original question to help the engine understand intent.
curl https://api.deepseek.com/v1/tools/search \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Cloudflare Workers site:developers.cloudflare.com after:2026-01-01", "count": 5}'
Supported query syntax: site:, -site: (multiple sites joined with OR), -word, "phrase", lang:zh,en, after:, and before:. They can be combined.
Each item in the returned results array has title, url, snippet (roughly 100 to 200 characters), summary (roughly 600 to 800 characters, written for models), rerank_score (0 to 3; 1.5 and above is high quality), authority (0 to 4; -1 means unknown), date, and more. For RAG, filter by rerank_score first, then decide whether you need the full text.
Fetch
It takes a single url field, at most 8192 characters, which must be HTTP or HTTPS and must not contain a username or password.
curl https://api.deepseek.com/v1/tools/fetch \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'
It returns title and content in Markdown. Whether a page can be fetched depends on the target site's availability and access policy.
What do you do when a call fails?
Following the official retry guidance:
| Status | Meaning | What to do |
|---|---|---|
| 400 | Invalid request header or body | Check the JSON and field values; do not retry as-is |
| 401 | Key missing or invalid | Check the key |
| 402 | Insufficient balance | Top up, then retry |
| 403 | Fetch blocked by a security policy | Pick a different target; do not retry |
| 404 | Fetch got no usable content | Pick a different target |
| 408 | Timed out reading the request body | Wait, then retry with backoff |
| 413 | Request body too large | Shrink the request |
| 429 | QPS limit exceeded | Retry with backoff and lower concurrency |
| 500 / 504 | Server error or downstream timeout | Retry with backoff |
On rate limits: Search and Fetch each have an account-level limit of 5 QPS. They are counted per account and are independent of each other. Fetch also has a per-domain QPS limit, which likewise returns 429.
How is it billed from November 1?
Three rules:
- The price is $0.75 per 1,000 successful requests for both endpoints, and
countdoes not change the price. - A call is billed only when it returns HTTP 200 with a result: a non-empty
resultsfor Search, or page content retrieved for Fetch. Failures, empty results, and timeouts are free. - Server-side tool calls through DeepSeek Harness, Claude Code, and Codex are free for now. Per-call billing starts at 00:00 Beijing time on November 1, 2026, which is 16:00 UTC on October 31. Check the official pricing page for current prices.
How to estimate monthly cost
Monthly cost ≈ (successful Search calls per month + successful Fetch calls per month) ÷ 1000 × $0.75.
A hypothetical example: an agent averages 1,000 successful searches and 2,000 page fetches per day. Over 30 days that is 90,000 calls, or about $67.50. This only illustrates the arithmetic; use your own logs for real counts. Keep in mind that one agent task often triggers several searches and fetches, so log the successful 200 responses per endpoint first, then multiply by the unit price.
What should Claude Code and Codex users on DeepSeek watch for?
If your searches go through server-side calls from those tools, they are free until November 1 and billed separately afterward, no longer folded into model token costs. For setup, see Using Claude Code with a custom base URL. When reconciling, look at "token cost" and "search/fetch cost" separately; for a checking method, see How to debug wrong API billing.
Before November 1, do three things:
- Count your searches and fetches over the last week and use the formula above to estimate a month.
- Put a call cap on search in your app so an agent cannot loop on it.
- Use exponential backoff on 429, and do not push concurrency past 5 QPS.
How do you track price and availability changes?
You can see line-by-line changes to DeepSeek's pricing page and changelog in cdnping's official-site changes, which also supports RSS. To check whether the API entry point is reachable, see DeepSeek API status; cdnping probes the official endpoint from the Cloudflare edge every 5 minutes. To tell whether a problem is on your side, compare against How to read AI status pages, or go straight to Is DeepSeek down?. Note that the status probe only covers whether the entry point is reachable, not the success rate of the search endpoints themselves.