> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# 怎么用 Web Search API 查新闻、论文、专利、商品或地点？为什么 news 没摘要、places 没 url？

> POST /v1/web/search 支持 8 种 type（web/news/images/videos/scholar/patents/shopping/places），单价均为 $0.005；news 不返回 snippet，places 不返回 url，且时间和域名筛选仅支持前 4 种。

在 `POST /v1/web/search` 中传入 `type` 即可切换 `web`（默认）、`news`、`images`、`videos`、`scholar`、`patents`、`shopping`、`places` 八种垂直搜索，无论选哪种类型或 `max_results`（`1–10`），单次成功费用均为 `$0.005`。不同类型字段不同：**`news` 不返回 `snippet`**（需要正文请用 `POST /v1/web/read` 读原文），**`places` 不返回 `url`**（官网和地址在 `website`、`address`、`phone` 字段里）。

## 8 种 `type` 的核心字段与筛选限制

| `type`     | 核心专属字段                                                                                             | 是否支持 `time_range` / `include_domains` / `exclude_domains`？ |
| ---------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `web`      | `snippet`、`published_at`                                                                           | 支持                                                         |
| `news`     | `source`、`published_at`、`image_url`（**无 `snippet`**）                                               | 支持                                                         |
| `images`   | `image_url`、`thumbnail_url`、`width`、`height`、`source`                                              | 支持                                                         |
| `videos`   | `source`、`duration`、`published_at`、`image_url`                                                     | 支持                                                         |
| `scholar`  | `publication_info`、`year`、`cited_by`、`pdf_url`                                                     | 不支持（传入会报 `400 bad_request`）                                |
| `patents`  | `publication_number`、`priority_date`、`filing_date`、`grant_date`、`inventor`、`assignee`、`pdf_url`    | 不支持                                                        |
| `shopping` | `source`、`price`、`rating`、`rating_count`、`image_url`                                               | 不支持                                                        |
| `places`   | `address`、`latitude`、`longitude`、`rating`、`rating_count`、`category`、`phone`、`website`（**无 `url`**） | 不支持                                                        |

## 示例：检索学术论文

```bash
curl -sS https://api.beatapi.io/v1/web/search \
  -H "Authorization: Bearer $BEATAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"retrieval augmented generation evaluation","type":"scholar","max_results":5}'
```

* **中日韩语言自动识别**：同时省略 `country` 和 `language` 时，中文、日文或韩文查询会自动按对应语言与地区检索。
* **避免 `400 bad_request`**：查 `scholar`、`patents`、`shopping`、`places` 时不要附带 `time_range` 或域名过滤参数。详见 [BeatAPI Web Search API](https://beatapi.io/zh/web-search-api) 与 [Web Search API 参考](/zh/web-search)。

## 相关文档

* [搜索还是读取](/zh/faq/web-search-vs-read) · [官方域名筛选](/zh/faq/web-official-domains) · [Web Search 任务指南](/zh/guides/web)

[返回Web Search问题索引](/zh/faq/web)。