APIリファレンス
DeepSeek Search
RunAPI の DeepSeek 互換 Search 操作でリクエストを送信します。
01
概要
このパスで選択される同期検索です。モデルは不要で、ストリーミングはサポートされません。未知のフィールドは受け付けられますが無視されます。
クイックスタート
- APIキーを作成し、RUNAPI_API_KEYとして設定します。
- 記載された JSON ボディを送信します。モデルは不要です。
- JSON レスポンスを読み取り、記載されたプロトコルエラーを処理します。
エンドポイント
- ベース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())