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 検索 API リファレンス
DeepSeek 検索 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でお試しいただけます:Authorization に
Bearer sk-your-api-key(default または svip グループのキー)を入力してください。
デフォルトのサンプルが入力されています。送信をクリックして結果をご確認ください。呼び出しが成功するごとに1回課金されます。
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 KBとなり、need_contentではその2倍以上になります。それに応じてクライアントのタイムアウトを設定してください。
エラーコード
| 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
このページは役に立ちましたか?