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 웹 검색 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"
}
]
}오른쪽 플레이그라운드에서 사용해 보십시오. Authorization에
Bearer sk-your-api-key(default 또는 svip 그룹의 키)를 입력하십시오.
기본 예제가 입력되어 있으므로 전송을 클릭하여 결과를 확인하십시오. 성공한 각 호출에는 한 번 과금됩니다.
localization은 사용자의 IP 주소(예: 8.8.8.8)를 받습니다. en-US과 같은 로케일 코드를 입력하면 400을 반환합니다.과금, 테스트 데이터 및 알아 두어야 할 사항은 개요에서 확인할 수 있습니다.
파라미터 참조
| 파라미터 | 유형 | 필수 | 설명 |
|---|---|---|---|
query | 문자열 | ✓ | 1~128자이며, 모두 공백일 수 없습니다. site:, -site:, "...", lang:, after:, before: 및 기타 연산자를 지원합니다 |
count | 정수 | 1~50, 기본값은 10입니다. 가격에는 영향을 주지 않습니다 | |
need_content | 불리언 | 기본값은 false입니다. true인 경우 요청 가능한 페이지 콘텐츠를 반환합니다. 모든 페이지에서 완전한 콘텐츠가 보장되지는 않습니다 | |
ori_question | 문자열 | 사용자의 원래 질문으로, 1~128자입니다 | |
localization | 문자열 | 사용자의 IP 주소(로케일 코드가 아님)이며, 지역화된 순위 지정에 사용됩니다 |
model 필드는 필요하지 않습니다. 알 수 없는 필드는 무시됩니다.
전송하기 전에 query의 길이를 확인하십시오. site:와 같은 연산자를 포함한 전체 쿼리는 128자 이내여야 합니다. 변경하지 않고 재시도하는 대신 키워드를 줄이거나 쿼리를 분할하십시오. ori_question 역시 128자를 초과할 수 없습니다.
응답 요약
{
"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를 사용합니다.- Search의 결과 URL 또는
content가 있다고 해서 해당 URL로 후속 Fetch 요청이 성공하는 것은 아닙니다. 제공된content를 재사용하고 완전성을 확인합니다. 요약만 제공되는 경우 요약이라고 명시합니다. 더 많은 콘텐츠가 필요하면 다른 접근 가능한 소스나 초록 페이지를 시도합니다. rerank_score≥ 1.5 및authority≥ 3은 고품질 결과를 나타내며 적절한 필터 기준입니다.count=50을 사용하면 응답 크기는 약 180 KB이며,need_content를 사용하면 그보다 두 배 이상 커집니다. 이에 맞춰 클라이언트 타임아웃을 설정합니다.
오류 코드
| HTTP | 메시지 예시 | 원인 및 해결 방법 | 과금 여부 |
|---|---|---|---|
| 400 | 'count' must be between 1 and 50 | count이 범위를 벗어남 | 아니요 |
| 400 | 'query' must not be empty / missing field 'query' | query가 없거나 비어 있음 | 아니요 |
| 400 | 'query' must be at most 128 characters | 쿼리가 너무 깁니다. 키워드를 줄이거나 쿼리를 분할한 후 재시도하십시오. | 아니요 |
| 400 | 'localization' must be a valid IP address | 로캘 코드가 전달되었습니다. IP를 보내거나 해당 필드를 제거하십시오. | 아니요 |
| 401 | Invalid token. | API 키가 유효하지 않거나 Authorization 헤더가 없습니다. | 아니요 |
| 429 | — | 업스트림 요청 제한(100 QPS)을 초과했습니다. 대기한 후 지연 시간을 늘려 가며 제한된 횟수만큼 재시도하십시오. | 아니요 |
| 500 | Internal Server Error | 업스트림 내부 오류입니다. 대기한 후 지연 시간을 늘려 가며 제한된 횟수만큼 재시도하십시오. | 아니요 |
| 503 | no available channels for model deepseek-search | 키의 그룹과 API 사용 가능 여부를 확인하십시오. ClaudeCode 그룹 키를 default / svip 키로 교체하십시오. | 아니요 |
| 504 | Request timeout | 업스트림 시간 초과입니다. 대기한 후 제한된 횟수만큼 재시도하십시오. 오류가 계속되면 오류 세부 정보를 보존하고 보고하십시오. | 아니요 |
shell_api_error만으로는 원인을 파악할 수 없습니다. HTTP 상태 코드와 원본 message을 사용하십시오. 503에 no available channels가 명시되어 있으면 먼저 키의 그룹과 API 활성화 여부를 확인하십시오.
일부 실패한 요청은 콘솔 과금 로그에 표시되지 않을 수 있습니다. 문제 해결을 위해 시간과 시간대, 전체 쿼리, API 경로, HTTP 상태, 오류 본문 및 요청 ID를 보관하십시오. API 키나 Authorization 헤더는 포함하지 마십시오. 자세한 내용은 개요를 참조하십시오.본문
application/json
이 페이지가 도움이 되었나요?