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 Reference
DeepSeek Search API reference and playground: /v1/tools/search parameters, search operators, response structure and error codes.
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"
}
]
}Try it in the Playground on the right: put
Bearer sk-your-api-key (a key in the default or svip group) in Authorization.
The default example is filled in; click send to see results. Each successful call is billed once.
localization takes the user’s IP address (e.g. 8.8.8.8); a locale code such as en-US returns 400.Pricing, test data and the things you need to know are in the Overview.
Parameter reference
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | ✓ | 1–128 characters, not all whitespace. Supports site:, -site:, "...", lang:, after:, before: and other operators |
count | int | 1–50, default 10. Does not affect the price | |
need_content | bool | Default false; when true each result includes the page body | |
ori_question | string | The user’s original question, 1–128 characters | |
localization | string | The user’s IP address (not a locale code), used for localized ranking |
model field; unknown fields are ignored.
Response highlights
{
"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://..."
}
]
}
- Give
summaryto models and showsnippetto people. For full text, either turn onneed_contentor pick a few results and use Fetch rerank_score≥ 1.5 andauthority≥ 3 mark high-quality results and make good filter thresholds- With
count=50the response is about 180 KB, andneed_contentmore than doubles it; set your client timeout accordingly
Error codes
| HTTP | Example message | Cause and fix | Billed |
|---|---|---|---|
| 400 | 'count' must be between 1 and 50 | count out of range | No |
| 400 | 'query' must not be empty / missing field 'query' | query missing or empty | No |
| 400 | 'localization' must be a valid IP address | A locale code was passed; send an IP or drop the field | No |
| 401 | Invalid token. | Invalid API key or missing Authorization header | No |
| 429 | — | Upstream rate limit (100 QPS) exceeded; wait and retry | No |
| 503 | no available channels for model deepseek-search | The key’s group does not have this API (e.g. ClaudeCode); use a default / svip key | No |
| 5xx / 504 | — | Upstream internal error or timeout; retry later | No |
type in the error body is always shell_api_error; branch on the HTTP status code.Authorizations
Add Authorization: Bearer YOUR_API_KEY to the request headers
Body
application/json
Search query, 1–128 characters, not all whitespace. Supports site: / lang: / after: and other operators
Example:
"DeepSeek V4 release"
Number of results, 1–50. Does not affect the price
Required range:
1 <= x <= 50Example:
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
Example:
"8.8.8.8"
Response
Search succeeded (billed once)
Show child attributes
Show child attributes
Was this page helpful?