---
title: DeepSeek Search | RunAPI
description: 透過 RunAPI 的 DeepSeek 相容 Search 操作傳送請求。
url: https://runapi.ai/zh-HK/docs/api/deepseek/search.md
canonical: https://runapi.ai/zh-HK/docs/api/deepseek/search
locale: zh-HK
---

> HTML 版本: https://runapi.ai/zh-HK/docs/api/deepseek/search
> 智能代理網站索引: https://runapi.ai/llms.txt

# DeepSeek Search

## 概覽

此路徑選擇同步搜尋。無需提供模型，不支援串流回應。未知欄位會被接受但忽略。

### 快速入門

1. 建立 API 金鑰並將其設定為 RUNAPI_API_KEY。
2. 傳送文件所列的 JSON 請求主體，無需提供模型。
3. 讀取 JSON 回應並處理文件所列的協定錯誤。

## 端點

POST /v1/tools/search

基礎 URL: https://runapi.ai

合約版本: v1

建議的身份驗證方式: Authorization: Bearer YOUR_API_TOKEN

## 身份驗證載體

RunAPI 接受以下列出的每種載體。生成的範例使用協議的首選標頭。

- `Authorization: Bearer YOUR_API_TOKEN` (建議)
- `x-api-key: YOUR_API_TOKEN`
- `x-goog-api-key: YOUR_API_TOKEN`
- `?key=YOUR_API_TOKEN`

## 相容模型

開啟模型頁面以查看當前定價、速率限制及商業用途詳情。

- [deepseek-search](https://runapi.ai/zh-HK/models/deepseek-search)

## 請求合約

此路徑選擇同步搜尋。無需提供模型，不支援串流回應。未知欄位會被接受但忽略。

### JSON 內文

必填: `query`

```json
{
  "count": {
    "description": "請求的結果數量，範圍為 1 到 50。",
    "maximum": 50,
    "minimum": 1,
    "type": "integer"
  },
  "localization": {
    "description": "本地化提示，例如最終使用者的 IP 地址。",
    "type": "string"
  },
  "need_content": {
    "description": "請求在搜尋結果中包含頁面內容。",
    "type": "boolean"
  },
  "ori_question": {
    "description": "原始問題，長度為 1–128 個 Unicode 字元。Null 視為未提供。",
    "maxLength": 128,
    "minLength": 1,
    "type": [
      "string",
      "null"
    ]
  },
  "query": {
    "description": "搜尋查詢，長度為 1–128 個 Unicode 字元，不能全部為空白字元。",
    "maxLength": 128,
    "minLength": 1,
    "type": "string"
  }
}
```

### 請求範例

```json
{
  "count": 5,
  "localization": "203.0.113.7",
  "need_content": true,
  "ori_question": null,
  "query": "DeepSeek V4 release"
}
```

## 同步回應

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"
    }
  ]
}
```

## 協定錯誤：invalid_request

HTTP 400

### 結構描述

```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"
  }
}
```

## 協定錯誤：rate_limited

HTTP 429

### 結構描述

```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"
  }
}
```

## 協定錯誤：unavailable

HTTP 503

### 結構描述

```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": "Service temporarily unavailable",
    "type": "service_unavailable"
  }
}
```

## 已生成的程式碼範例

每個 cURL、JavaScript 及 Python 範例均透過此合約發送已驗證的請求，無需使用特定協議的 SDK。

### curl

```curl
curl -X POST https://runapi.ai/v1/tools/search \
  -H Authorization:\ Bearer\ YOUR_API_TOKEN \
  -H Content-Type:\ application/json \
  -d \{\"query\":\"DeepSeek\ V4\ release\",\"count\":5,\"ori_question\":null,\"localization\":\"203.0.113.7\",\"need_content\":true\}
```

### javascript

```javascript
const response = await fetch("https://runapi.ai/v1/tools/search", {
  method: "POST",
  headers: {
  "Authorization": "Bearer YOUR_API_TOKEN",
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "query": "DeepSeek V4 release",
  "count": 5,
  "ori_question": null,
  "localization": "203.0.113.7",
  "need_content": true
})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
```

### python

#### 安裝

```bash
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())
```

## 相關指南

- [身份驗證](https://runapi.ai/zh-HK/docs/guides/authentication.md)

---

## RunAPI 的更多內容

- [首頁](https://runapi.ai/zh-HK/.md)
- [模型目錄](https://runapi.ai/zh-HK/models.md)
- [收費](https://runapi.ai/zh-HK/pricing.md)
- [服務商](https://runapi.ai/zh-HK/models)
- [文件](https://runapi.ai/zh-HK/docs/guides)
- [SDK](https://runapi.ai/zh-HK/sdk.md)
- [CLI](https://runapi.ai/zh-HK/cli.md)
- [MCP Server](https://runapi.ai/zh-HK/mcp.md)
- [x402](https://runapi.ai/zh-HK/x402.md)
- [Claude Code 與 Cursor](https://runapi.ai/zh-HK/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-HK/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-HK/openrouter-alternative.md)
- [企業版](https://runapi.ai/zh-HK/contact.md)
- [聯絡](https://runapi.ai/zh-HK/contact.md)
- [條款](https://runapi.ai/zh-HK/terms.md)
- [私隱](https://runapi.ai/zh-HK/privacy.md)
- [智能代理網站索引](https://runapi.ai/llms.txt)

聯絡我們: contact@runapi.ai

## 結構化資料

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-HK/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-HKicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "TechArticle",
    "headline": "DeepSeek Search",
    "description": "透過 RunAPI 的 DeepSeek 相容 Search 操作傳送請求。",
    "url": "https://runapi.ai/zh-HK/docs/api/deepseek/search",
    "mainEntityOfPage": "https://runapi.ai/zh-HK/docs/api/deepseek/search"
  }
]
```
