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

> HTML 版本: https://runapi.ai/zh-TW/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-TW/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-TW/docs/guides/authentication.md)

---

## RunAPI 的更多內容

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

聯絡我們: contact@runapi.ai

## 結構化資料

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