Web search: deepseek-search
curl --request POST \
--url https://api.apiyi.com/v1/tools/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "DeepSeek V4 release"
}
'import requests
url = "https://api.apiyi.com/v1/tools/search"
payload = { "query": "DeepSeek V4 release" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'DeepSeek V4 release'})
};
fetch('https://api.apiyi.com/v1/tools/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/tools/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'DeepSeek V4 release'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/tools/search"
payload := strings.NewReader("{\n \"query\": \"DeepSeek V4 release\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/tools/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"DeepSeek V4 release\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/tools/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"DeepSeek V4 release\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"title": "DeepSeek V4 released",
"url": "https://example.com/news/deepseek-v4",
"snippet": "A short snippet of about 100–200 characters...",
"summary": "A long summary of about 600–800 characters...",
"content": "",
"rerank_score": 2.1,
"authority": 3,
"date": "2026-10-20T08:00:00Z",
"site_name": "Example News",
"site_icon": "https://example.com/favicon.ico"
}
]
}DeepSeek Search & Fetch
Справочник по DeepSeek Web Search API
Справочник и песочница DeepSeek Search API: параметры /v1/tools/search, поисковые операторы, структура ответа и коды ошибок.
POST
/
v1
/
tools
/
search
Web search: deepseek-search
curl --request POST \
--url https://api.apiyi.com/v1/tools/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "DeepSeek V4 release"
}
'import requests
url = "https://api.apiyi.com/v1/tools/search"
payload = { "query": "DeepSeek V4 release" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'DeepSeek V4 release'})
};
fetch('https://api.apiyi.com/v1/tools/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/tools/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'DeepSeek V4 release'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/tools/search"
payload := strings.NewReader("{\n \"query\": \"DeepSeek V4 release\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/tools/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"DeepSeek V4 release\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/tools/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"DeepSeek V4 release\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"title": "DeepSeek V4 released",
"url": "https://example.com/news/deepseek-v4",
"snippet": "A short snippet of about 100–200 characters...",
"summary": "A long summary of about 600–800 characters...",
"content": "",
"rerank_score": 2.1,
"authority": 3,
"date": "2026-10-20T08:00:00Z",
"site_name": "Example News",
"site_icon": "https://example.com/favicon.ico"
}
]
}Попробуйте в Playground справа: укажите
Bearer sk-your-api-key (ключ в группе default или svip) в Authorization.
Пример по умолчанию уже заполнен; нажмите «Отправить», чтобы увидеть результат. Каждый успешный вызов тарифицируется один раз.
localization принимает IP-адрес пользователя (например, 8.8.8.8); код локали, такой как en-US, возвращает ошибку 400.Тарифы, тестовые данные и важная информация приведены в разделе Обзор.
Справочник параметров
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
query | string | ✓ | От 1 до 128 символов, не только пробелы. Поддерживает site:, -site:, "...", lang:, after:, before: и другие операторы |
count | int | 1–50, по умолчанию 10. Не влияет на стоимость | |
need_content | bool | По умолчанию false; если true, каждый результат включает в себя тело страницы | |
ori_question | string | Исходный вопрос пользователя, от 1 до 128 символов | |
localization | string | IP-адрес пользователя (не код локали), используется для локализованного ранжирования |
model; неизвестные поля игнорируются.
Ключевые особенности ответа
{
"results": [
{
"title": "...",
"url": "https://...",
"snippet": "short summary, about 100–200 characters",
"summary": "long summary, about 600–800 characters",
"content": "",
"rerank_score": 2.1,
"authority": 3,
"date": "2026-10-20T08:00:00Z",
"site_name": "...",
"site_icon": "https://..."
}
]
}
- Передавайте
summaryмоделям, аsnippetпоказывайте людям. Для получения полного текста либо включитеneed_content, либо выберите несколько результатов и используйте Fetch rerank_score≥ 1.5 иauthority≥ 3 указывают на высококачественные результаты и отлично подходят в качестве пороговых значений для фильтрации- С
count=50размер ответа составляет около 180 КБ, аneed_contentувеличивает его более чем в два раза; настройте таймаут клиента соответствующим образом
Коды ошибок
| HTTP | Пример сообщения | Причина и решение | Тарифицируется |
|---|---|---|---|
| 400 | 'count' must be between 1 and 50 | count вне допустимого диапазона | Нет |
| 400 | 'query' must not be empty / missing field 'query' | query отсутствует или пусто | Нет |
| 400 | 'localization' must be a valid IP address | Передан код локали; передайте IP или удалите это поле | Нет |
| 401 | Invalid token. | Недействительный ключ API или отсутствует заголовок Authorization | Нет |
| 429 | — | Превышен лимит запросов вышестоящего сервиса (100 QPS); подождите и повторите попытку | Нет |
| 503 | no available channels for model deepseek-search | В группе ключа отсутствует этот API (например, ClaudeCode); используйте ключ default / svip | Нет |
| 5xx / 504 | — | Внутренняя ошибка или таймаут вышестоящего сервиса; повторите попытку позже | Нет |
type в теле ошибки всегда имеет значение shell_api_error; выполняйте ветвление по коду статуса HTTP.Авторизации
Add Authorization: Bearer YOUR_API_KEY to the request headers
Тело
application/json
Search query, 1–128 characters, not all whitespace. Supports site: / lang: / after: and other operators
Пример:
"DeepSeek V4 release"
Number of results, 1–50. Does not affect the price
Требуемый диапазон:
1 <= x <= 50Пример:
5
Whether to return the page body. When false, content is always an empty string
The user's original question that triggered this search, 1–128 characters
The user's IP address, used to prioritize localized results. Not a locale code: passing ja-JP returns 400
Пример:
"8.8.8.8"
Ответ
Search succeeded (billed once)
Show child attributes
Show child attributes
Была ли эта страница полезной?