> ## 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.

# 读取网页

> 抓取 URL 并返回干净文本。

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

## Endpoint

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

## 认证

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

## 查询参数

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

## 请求示例

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

## 响应结构

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

## 错误结构

```json theme={"dark"}
{
  "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="/zh/websearch/npm-package">
    在 OpenClaw 里启用网页读取工具
  </Card>

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

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


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