> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipellm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 总览

> PipeLLM WebSearch 是面向开发者和 Agent 的独立搜索与检索产品能力

PipeLLM WebSearch 是一条独立的产品能力线，用于实时搜索、检索和网页阅读。你既可以
通过 PipeLLM 的公共 API 直接调用，也可以通过 npm 包 `pipellm-websearch`
把它装进 OpenClaw。

## WebSearch 包含什么

| 入口 | 用途 |
| - | - |
| Search API | 在应用或后端里通过 HTTP 调用 PipeLLM WebSearch |
| npm 包 | 通过 npm 安装成 OpenClaw 插件 |

## 核心能力

* 通过 PipeLLM 托管的检索流程做实时网络搜索
* 在搜索结果中返回可选的富上下文页面内容
* 通过 OpenClaw 插件提供网页阅读和新闻搜索工具
* 复用同一套 PipeLLM API Key，按次计费

## 认证

使用和平台其他能力一致的 PipeLLM API Key：

```text theme={"dark"}
Authorization: Bearer $PIPELLM_API_KEY
```

## 公共路由

PipeLLM Gateway 当前对外公开了 4 条 WebSearch 路由：

| 路由 | 用途 | 查询参数 |
| - | - | - |
| `GET /v1/websearch/search` | 深度搜索，带检索和重排序 | `q` |
| `GET /v1/websearch/simple-search` | 快速搜索，只返回搜索摘要 | `q` |
| `GET /v1/websearch/reader` | 读取网页并返回干净文本 | `url` |
| `GET /v1/websearch/search-news` | 新闻搜索，带检索和重排序 | `q` |

这些路由是公共网关上的代理入口，背后映射到 WebSearch 服务的白名单端点。

## 价格

当前 WebSearch 按成功请求计费。PipeLLM 会根据公共路由自动设置内部模型名，客户端无需
传入额外的计费参数。

| 公共路由 | 内部模型名 | 每次成功请求价格 |
| - | - | - |
| `/v1/websearch/search` | `websearch-deepsearch` | \$0.08 |
| `/v1/websearch/simple-search` | `websearch` | \$0.01 |
| `/v1/websearch/reader` | `websearch-reader` | \$0.01 |
| `/v1/websearch/search-news` | `websearch-news` | \$0.08 |

<Note>
  WebSearch 请求和模型生成接口使用同一套账号鉴权，但在产品能力和计费上是独立的一条线。
</Note>

## 用量与报表

WebSearch 请求成功后，Metering 根据内部模型名计算固定价格，并把模型名和最终费用写入
现有用量及请求审计记录。Admin Report 直接按记录的模型名汇总：

* 请求数
* 记录的用量费用
* 应用 Admin Report 折扣后的收入

<Note>
  内部模型名只用于计量和报表，不会改变 WebSearch 响应体，API 客户端也不需要传入。
</Note>

## 路由映射

| 公共路由 | 内部服务路由 | 说明 |
| - | - | - |
| `/v1/websearch/search` | `/api/search` | 完整搜索 + 内容提取 + 重排序 |
| `/v1/websearch/simple-search` | `/api/simple-search` | 只做 Serper 搜索 |
| `/v1/websearch/reader` | `/api/reader` | 按 URL 读取单个页面 |
| `/v1/websearch/search-news` | `/api/search-news` | 新闻搜索 + 内容提取 + 重排序 |

## 从这里开始

<Columns cols={3}>
  <Card title="深度搜索" icon="magnifying-glass" href="/zh/websearch/search-api">
    完整搜索，带内容提取和重排序
  </Card>

  <Card title="快速搜索" icon="bolt" href="/zh/websearch/simple-search">
    只返回搜索摘要，不做深度检索
  </Card>

  <Card title="网页读取" icon="book" href="/zh/websearch/reader">
    读取网页并转成干净文本
  </Card>

  <Card title="新闻搜索" icon="newspaper" href="/zh/websearch/news-search">
    搜索近期新闻并返回检索结果
  </Card>

  <Card title="pipellm-websearch（npm）" icon="box" href="/zh/websearch/npm-package">
    从 npm 安装 OpenClaw 插件
  </Card>

  <Card title="OpenClaw" icon="terminal" href="/zh/integrations/openclaw">
    把编码 Agent 接到 PipeLLM 和 WebSearch
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.