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

# 参数概述

> 网页抓取 API 参数

> [!NOTE]
>
> 请注意，支持的参数可能会因目标模板而略有不同。[**了解更多**](https://help.decodo.com/docs/cn/web-scraping-api-targets.md#/)。

| 参数 | 默认值 | 描述 | 示例 |
| :- | :- | :- | :- |
| `proxy_pool` | `premium` | `standard` 处理简单页面； `Premium` 解决复杂的反机器人措施，用于目标模板 | `standard` |
| `url` 或 `query` | `null` | 必填。某些[**目标模板**](https://help.decodo.com/docs/cn/web-scraping-api-targets.md)支持 `query` 参数，否则需要 `url`。 | `https://ip.decodo.com` |
| `target` | `null` | 特定[**目标模板**](https://help.decodo.com/docs/cn/web-scraping-api-targets.md#/)所必需 | `google_search` |
| `headless` | `null` 某些目标模板默认强制 JS 渲染 | `html` 值启用 JavaScript 渲染。[了解更多。](https://help.decodo.com/docs/cn/web-scraping-api-javascript-rendering.md) `png` 值启用截图响应。[了解更多。](https://help.decodo.com/docs/cn/web-scraping-api-screenshot-response.md) | `html` |
| `geo` | 自动随机化 | 结果所依赖的地理位置。[**了解更多**](https://help.decodo.com/docs/cn/web-scraping-api-localisation.md)。 | `United States` |
| `domain` | `com` | 指定顶级域名：**com**、**co.uk**、**fr** 等。 | `com` |
| `locale` | 与 `domain` 参数匹配 | 这将更改搜索页面的网页界面语言（而非结果）。 示例：– en-US – en-GB | `en-gb` |
| `headers` | `null` | 向目标请求添加请求头。 | `User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36` |
| `cookies` | `null` | 客户端 cookie。允许用户像已登录一样打开页面。 | `Cookie: sessionid=8e1f3b56-7abc-47e6-b2e2-1d273b0a1c4d; logged_in=true; locale=en-US` |
| `force_cookies` | `false` | 默认情况下，用户提供的 cookie 不会转发到目标。 将此参数设置为 `true` 以覆盖此行为。 | `true` |
| `force_headers` | `false` | 默认情况下，用户提供的请求头不会转发到目标。 将此参数设置为 `true` 以覆盖此行为。 | `true` |
| `device_type` | `desktop` | 设备类型和浏览器。[了解更多。](https://help.decodo.com/docs/cn/web-scraping-api-device-types.md) | `desktop` |
| `parse` | `false` | 对于某些目标模板，提供专用解析器。 要检索结构化数据，请将 `parse` 参数设置为 `true`。[了解更多。](https://help.decodo.com/docs/cn/web-scraping-api-parsing.md#/) | `true` |
| `session_id` | `null` | 会话，用于在最多 10 分钟内为多个请求重复使用相同的 IP | `1234` |
| `http_method` | `GET` | 用于发出 `POST` 请求而不是 `GET`。 | `POST` |
| `payload` | `null` | Base64 编码的 `POST` 请求正文。当 `http_method` 为 `POST` 时使用。 | `{foo: bar}` |
| `successful_status_codes` | `null` | 定义一个或多个您认为成功并希望获取其内容的 `HTTP` 响应代码。 | `401`、`404` |
| `markdown` | `false` | 将 HTML 输出解析为 Markdown。在将结果输入 LLM 模型时减少令牌数。[了解更多。](https://help.decodo.com/docs/cn/web-scraping-api-markdown-response.md) | `true` |
| `xhr` | `false` | 检索 XHR 和 fetch 请求列表。[了解更多。](https://help.decodo.com/docs/cn/web-scraping-api-fetch-and-xhr.md) | `true` |

> [card] [支持](https://direct.lc.chat/12092754)
>
> 需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
> 您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。

> [card] [反馈](mailto:feedback@decodo.com)
>
> 找不到您要找的内容？请求一篇文章！ \
> 有反馈意见？分享您对我们如何改进的想法。


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