API 레퍼런스
DeepSeek Search
RunAPI의 DeepSeek 호환 Search 작업으로 요청을 보냅니다.
01
개요
이 경로로 선택되는 동기식 검색입니다. 모델이 필요하지 않으며 스트리밍은 지원하지 않습니다. 알 수 없는 필드는 허용되지만 무시됩니다.
빠른 시작
- API 키를 만들고 RUNAPI_API_KEY로 설정합니다.
- 문서에 명시된 JSON 본문을 보냅니다. 모델은 필요하지 않습니다.
- JSON 응답을 읽고 문서에 명시된 프로토콜 오류를 처리합니다.
엔드포인트
- Base URL
https://runapi.ai- 계약 버전
v1- 권장 인증 방식
Authorization: Bearer YOUR_API_TOKEN
02
인증 정보 전달 방식
RunAPI는 아래 나열된 각 캐리어를 허용합니다. 생성된 샘플은 프로토콜의 기본 헤더를 사용합니다.
- header - 권장
Authorization: Bearer YOUR_API_TOKEN- header
x-api-key: YOUR_API_TOKEN- header
x-goog-api-key: YOUR_API_TOKEN- query
?key=YOUR_API_TOKEN
03
호환 모델
현재 가격, 속도 제한 및 상업적 이용 세부 정보는 모델 페이지를 여십시오.
호환 모델 1개 보기
04
JSON 본문요청 계약
이 경로로 선택되는 동기식 검색입니다. 모델이 필요하지 않으며 스트리밍은 지원하지 않습니다. 알 수 없는 필드는 허용되지만 무시됩니다.
JSON 본문필드 5개
countinteger
선택
요청할 결과 수로, 1부터 50까지입니다.
localizationstring
선택
최종 사용자의 IP 주소 등 지역 정보 힌트입니다.
need_contentboolean
선택
검색 결과에 페이지 콘텐츠를 요청합니다.
ori_question["string", "null"]
선택
1–128 Unicode 문자의 원래 질문입니다. Null은 생략된 것으로 처리됩니다.
querystring
필수
1–128 Unicode 문자의 검색 쿼리이며, 공백만으로 구성할 수 없습니다.
요청 예시
JSON
{
"count": 5,
"localization": "203.0.113.7",
"need_content": true,
"ori_question": null,
"query": "DeepSeek V4 release"
}
05
HTTP 200
동기 응답
스키마
JSON
{
"additionalProperties": true,
"properties": {
"results": {
"description": "검색 결과입니다. 빈 배열도 성공 응답이며 요금이 부과되지 않습니다.",
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
}
},
"required": [
"results"
],
"type": "object"
}
예시
JSON
{
"results": [
{
"snippet": "Browse DeepSeek models and API documentation.",
"title": "DeepSeek models on RunAPI",
"url": "https://runapi.ai/models/deepseek"
}
]
}
06
HTTP 400
프로토콜 오류: invalid_request
스키마
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
예시
JSON
{
"error": {
"message": "'query' is required",
"type": "invalid_request_error"
}
}
07
HTTP 429
프로토콜 오류: rate_limited
스키마
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
예시
JSON
{
"error": {
"message": "Too many requests, please retry later",
"type": "rate_limit_error"
}
}
09
생성된 코드 샘플
각 cURL, JavaScript, Python 예제는 프로토콜별 SDK 없이도 이 계약에서 검증된 요청을 전송합니다.
설치
Shell
pip install requests
PYTHON
import requests
response = requests.post(
"https://runapi.ai/v1/tools/search",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json"},
json={"query": "DeepSeek V4 release", "count": 5, "ori_question": None, "localization": "203.0.113.7", "need_content": True}
)
response.raise_for_status()
print(response.json())