Search & Fetch | DeepSeeokay API Docs

The Search API and the Fetch API give brokers and RAG purposes entry to dwell net content material:
- Search API finds net pages for a question and returns structured outcomes. It is powered by DeepSeeokay’s in-house search engine.
- Fetch API retrieves a single net web page and returns its content material as Markdown.
Both are uncooked JSON APIs. They use the identical bearer authentication because the DeepSeeokay API.
The base URL is https://api.deepseek.com:
| API | Endpoint |
|---|---|
| Search | POST https://api.deepseek.com/v1/tools/search |
| Fetch | POST https://api.deepseek.com/v1/tools/fetch |
See the Search API Reference and Fetch API Reference for the entire request and response schemas.
Authentication
Send your API key and the JSON content material sort within the request headers:
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer |
Content-Type |
Yes | utility/json |
Search API
Request
curl https://api.deepseek.com/v1/tools/search
-H "Authorization: Bearer "
-H "Content-Type: utility/json"
-d '{
"question": "DeepSeeokay V4 launch",
"depend": 5,
"need_content": true
}'
import requests
response = requests.publish(
"https://api.deepseek.com/v1/tools/search",
headers={
"Authorization": "Bearer " ,
},
json={
"question": "DeepSeeokay V4 launch",
"depend": 5,
"need_content": True,
},
)
response.raise_for_status()
for outcome in response.json()["results"]:
print(outcome["title"], outcome["url"])
print(outcome["summary"])
Request fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
question |
string | Yes | – | The search question should comprise 1 to 128 Unicode characters, can’t be all whitespace, and helps the question operators listed beneath. |
depend |
integer | No | 10 |
The variety of outcomes to return, between 1 and 50. |
ori_question |
string | No | – | The person’s authentic query that triggered the search, between 1 and 128 characters, to enhance question understanding, with null handled as not supplied. |
localization |
string | No | "" |
An elective IP handle used to localize search outcomes. |
need_content |
boolean | No | false |
Whether to return web page content material in content material, which is all the time an empty string when false. |
Unknown fields within the request physique are ignored.
Query Operators
The question is forwarded with its search syntax intact. The examples beneath mix operators with a search time period; you possibly can mix a number of operators in a single question.
| Operator | Example | Description |
|---|---|---|
website: |
DeepSeeokay website:github.com |
Restrict outcomes to the given website, and to focus on a number of websites, separate the website: clauses with areas and be a part of them with OR, for instance DeepSeeokay website:github.com OR website:huggingface.co. |
-site: |
DeepSeeokay -site:instance.com |
Exclude the given website, and separate a number of websites with areas. |
- |
DeepSeeokay -advertisement |
Exclude pages containing the time period, and separate a number of phrases with areas. |
-"..." |
DeepSeeokay -"launch notes" |
Exclude pages containing the precise phrase, which may comprise areas, and separate a number of phrases with areas. |
"..." |
DeepSeeokay "actual phrase" |
Match a precise phrase, and separate a number of phrases with areas. |
lang: |
DeepSeeokay lang:zh,en |
Restrict outcomes to the given language codes, separating a number of codes with commas, for instance lang:zh,en. |
after: |
DeepSeeokay after:2025 or DeepSeeokay after:2025-01-01 |
Restrict outcomes to pages printed after a date. |
earlier than: |
DeepSeeokay earlier than:2026 or DeepSeeokay earlier than:2026-06-01 |
Restrict outcomes to pages printed earlier than a date. |
For instance:
{
"question": "DeepSeeokay website:github.com OR website:huggingface.co lang:en after:2025",
"depend": 10
}
Response
A profitable request returns HTTP 200 with a outcomes array. A traditional search with no matches returns an empty array.
{
"outcomes": [
{
"rerank_score": 2.4,
"title": "DeepSeek V4 model released",
"url": "https://example.com/deepseek-v4",
"snippet": "DeepSeek V4 is now available, with tool calling and long-context support.",
"summary": "DeepSeek has released the V4 model. The release adds improved tool calling and long-context support for agent workflows.",
"content": "DeepSeek V4 is now generally available...",
"site_name": "Example News",
"site_icon": "https://example.com/favicon.ico",
"date": "2026-06-01T00:00:00+00:00",
"authority": 3
}
]
}
Each merchandise in outcomes comprises:
| Field | Type | Description |
|---|---|---|
rerank_score |
quantity | A relevance rating from 0 to three that mixes indicators corresponding to relevance, authority, and freshness, with scores of 1.5 or above thought of high-quality outcomes. |
title |
string | The title of the outcome. |
url |
string | The URL of the outcome. |
snippet |
string | A brief abstract associated to the question, usually 100 to 200 characters, supposed for show in a UI. |
abstract |
string | A protracted abstract associated to the question, usually 600 to 800 characters, supposed to be learn by a mannequin. |
content material |
string | The web page content material, which is empty when need_content is false or when the content material is unavailable. |
site_name |
string or null | The title of the positioning, or null when unavailable. |
site_icon |
string or null | The URL of the positioning icon, or null when unavailable. |
date |
string or null | The publication time in UTC, formatted as RFC 3339, or null when unknown. |
authority |
integer | The authority tier of the web page, 0 to 4 (-1 means unknown), with values of three or above indicating extremely authoritative sources. |
Fetch API
Request
curl https://api.deepseek.com/v1/tools/fetch
-H "Authorization: Bearer "
-H "Content-Type: utility/json"
-d '{
"url": "https://example.com/article"
}'
import requests
response = requests.publish(
"https://api.deepseek.com/v1/tools/fetch",
headers={
"Authorization": "Bearer " ,
},
json={"url": "https://example.com/article"},
)
response.raise_for_status()
web page = response.json()
print(web page["title"])
print(web page["content"])
Request fields:
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | The web page URL to fetch, which have to be at most 8192 characters, an HTTP or HTTPS URL with a number, and should not comprise a username or password. |
Response
{
"title": "Example article",
"content material": "# Example articlennArticle content material."
}
| Field | Type | Description |
|---|---|---|
title |
string | The title of the web page, empty when the title is unavailable. |
content material |
string | The fetched web page content material as Markdown textual content. |
Fetching is topic to the goal website’s availability and entry insurance policies.
Errors comply with the OpenAI-compatible error format. The param area is all the time null.
{
"error": {
"message": "'depend' have to be between 1 and 50",
"sort": "invalid_request_error",
"param": null,
"code": "invalid_request_error"
}
}
| HTTP Status | Description |
|---|---|
| 400 | The request headers or physique are invalid, together with malformed JSON or an invalid area worth. |
| 401 | The API key’s lacking or invalid. |
| 402 | The account has inadequate steadiness. |
| 403 | The Fetch request was rejected by the safety coverage. |
| 404 | Fetch couldn’t retrieve usable web page content material, for instance resulting from an unavailable URL, a URL blocked by website coverage, an error from the goal website, an unsupported content material sort, or a web page with no extractable Markdown content material. |
| 408 | Reading the request physique timed out. |
| 413 | The request physique is just too massive. |
| 429 | The Search or Fetch QPS restrict was exceeded. |
| 500 | An inner server error occurred. |
| 504 | A downstream request timed out. |
Search and Fetch are read-only. For HTTP 408, 429, or 5xx errors, wait and retry. For HTTP 402, high up your account earlier than retrying. Do not retry different 4xx errors with out altering the request.
Billing
Search and Fetch are billed per profitable request, not by tokens or by the variety of returned outcomes:
| API | Unit | Price |
|---|---|---|
| Search | Per 1,000 profitable requests | $0.75 |
| Fetch | Per 1,000 profitable requests | $0.75 |
A request is billable solely when it returns HTTP 200 and produces a outcome (Search should return a non-empty outcomes array, and Fetch should return web page content material). Failed requests, empty search outcomes, and timeouts aren’t billed. depend solely controls what number of outcomes are returned and doesn’t have an effect on the per-request worth.
Note: whenever you use the DeepSeeokay API by means of DeepSeeokay Harness, Claude Code, or Codex, server-side instrument calls already hit the Search and Fetch APIs. These calls are at the moment freed from cost; per-request billing begins at 00:00 Beijing time on November 1, 2026.
Rate Limits
For every account, Search and Fetch are restricted independently, and visitors to 1 doesn’t eat the opposite’s quota:
| API | QPS Limit |
|---|---|
| Search | 5 |
| Fetch | 5 |
The QPS (requests per second) limits are calculated on the account degree, no matter which API key’s used, and are separate from the mannequin concurrency limits. Requests above the account-level QPS restrict obtain HTTP 429. In addition to the account-level restrict, Fetch can be topic to a per-domain QPS restrict, and requests above that restrict additionally obtain HTTP 429.
