> ## 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 读取网页并返回干净文本

如果你已经知道目标网页 URL，并希望让 PipeLLM WebSearch 抓取并转换成干净文本，
就使用这条路由。

## Endpoint

| 方法    | 端点                                           |
| ----- | -------------------------------------------- |
| `GET` | `https://api.pipellm.ai/v1/websearch/reader` |

## 认证

```text theme={null}
Authorization: Bearer $PIPELLM_API_KEY
```

## 查询参数

| 参数    | 类型     | 必填 | 描述         |
| ----- | ------ | -- | ---------- |
| `url` | string | 是  | 要读取的网页 URL |

## 请求示例

```bash theme={null}
curl -X GET "https://api.pipellm.ai/v1/websearch/reader?url=https://go.dev" \
  -H "Authorization: Bearer $PIPELLM_API_KEY"
```

## 响应结构

```json theme={null}
{
  "code": 200,
  "message": "ok",
  "content": "# The Go Programming Language\n\nGo is an open source programming language..."
}
```

## 错误结构

```json theme={null}
{
  "code": 400,
  "message": "url parameter is required"
}
```

## 说明

* 这条路由代理到内部 `/api/reader`。
* 这条接口返回的是 `content` 字段，而不是 `data`。
* `pipellm_web_reader` 对应的最直接 HTTP 路由就是它。
* 每次成功请求价格为 \$0.01，并以内部模型名 `websearch-reader` 记录。
* PipeLLM 会根据路由自动确定模型名，客户端不需要传入。

## 相关文档

<Columns cols={3}>
  <Card title="pipellm-websearch（npm）" icon="box" href="/websearch/npm-package.zh">
    在 OpenClaw 里启用网页读取工具
  </Card>

  <Card title="深度搜索" icon="magnifying-glass" href="/websearch/search-api.zh">
    如果你还不知道目标页面，先用搜索路由
  </Card>

  <Card title="WebSearch 总览" icon="globe" href="/websearch/overview.zh">
    查看产品总览和路由矩阵
  </Card>
</Columns>
