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

# 网页检索

> 使用 Venice Web Search 查找最新来源，并使用 Venice Web Scrape 将选定页面提取为 Markdown。

Venice 提供了独立的 API 分别用于发现网页和提取内容：

* **Web Search** 返回包含标题、URL、摘要和日期的结构化结果。
* **Web Scrape** 将选定的公开页面转换为 Markdown。

当你的应用在推理之前需要获取最新、可核查的源材料时，请将它们组合使用。

## 搜索网络

向 Search API 发送查询：

```bash theme={"system"}
curl https://api.venice.ai/api/v1/augment/search \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"latest developments in decentralized AI"}'
```

Brave 是默认的提供商，并提供零数据保留。Google 也可用，其查询会通过 Venice 匿名代理。有关提供商选择及完整响应架构，请参阅 [Web Search API 参考](/api-reference/endpoint/augment/search)。

## 抓取页面

选择结果后，将其公开 URL 发送到 Scrape API：

```bash theme={"system"}
curl https://api.venice.ai/api/v1/augment/scrape \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/article"}'
```

该端点以 Markdown 形式返回页面内容。它会优先请求站点原生的 Markdown 版本（若可用），否则使用基于浏览器的提取方式。

## 搜索到抓取的工作流

<Steps>
  <Step title="搜索">
    提交一个聚焦的查询并收集结构化结果。
  </Step>

  <Step title="选择来源">
    在获取页面内容之前，按相关性、域名和日期筛选结果。
  </Step>

  <Step title="抓取">
    仅从你的应用打算使用的页面中提取 Markdown。
  </Step>

  <Step title="使用或存储内容">
    将 Markdown 包含在提示中、创建嵌入、进行缓存，或保留源 URL 以供引用。
  </Step>
</Steps>

## 独立搜索还是模型网页搜索？

当你的应用需要控制来源选择或希望复用检索到的内容时，请使用独立的 API。当你希望 Venice 在单次推理请求中处理检索时，请在模型请求中启用网页搜索。

| 需求           | 方式            |
| ------------ | ------------- |
| 在推理前检查或筛选结果  | 独立 Web Search |
| 提取特定的已知 URL  | 独立 Web Scrape |
| 缓存或复用检索到的内容  | 独立 API        |
| 让模型自动检索最新上下文 | 模型网页搜索        |

<Warning>
  Web Search 和 Web Scrape 是实验性 API。其请求和响应格式可能会在不另行通知的情况下发生变化。Web Scrape 仅接受可公开访问的页面，屏蔽自动化访问的站点可能会被拒绝。
</Warning>

## 相关资源

* [Web Search API 参考](/api-reference/endpoint/augment/search)
* [Web Scrape API 参考](/api-reference/endpoint/augment/scrape)
* [私密研究 Agent](/guides/projects/private-research-agent)
* [嵌入](/guides/features/embeddings)
