> ## 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 实时请求

## 简介

实时集成将整个作业请求放入一个由 API 形成的 URL 中。

#### Post 端点：

`scraper-api.decodo.com/v2/scrape`

#### 示例：

<CodeGroup>
  ```shellscript cURL theme={null}
  # update 'TOKEN VALUE' with your authorization token
  curl --request 'POST' \
          --url 'https://scraper-api.decodo.com/v2/scrape' \
          --header 'Accept: application/json' \
          --header 'Authorization: Basic TOKEN VALUE' \ 
          --header 'Content-Type: application/json' \
          --data '
      {
        "url": "https://ip.decodo.com"
      }
  '
  ```
</CodeGroup>

#### 响应示例：

<CodeGroup>
  ```json JSON expandable theme={null}
  {
    "results": [
        {
            "content": "{\n    \"browser\": {\n        \"name\": \"Firefox\",\n        \"version\": \"123.0\"\n    },\n    \"platform\": {\n        \"name\": \"Windows\",\n        \"os\": \"Windows 10\",\n        \"type\": \"desktop\"\n    },\n    \"engine\": {\n        \"name\": \"Gecko\",\n        \"version\": \"20100101\"\n    },\n    \"isp\": {\n        \"isp\": \"Cogent Communications\",\n        \"asn\": 174,\n        \"domain\": \"\",\n        \"organization\": \"Cogent Communications\"\n    },\n    \"city\": {\n        \"name\": \"New York\",\n        \"code\": \"NY\",\n        \"state\": \"New York\",\n        \"time_zone\": \"America/New_York\",\n        \"zip_code\": \"10118\",\n        \"latitude\": 40.7126,\n        \"longitude\": -74.0066\n    },\n    \"proxy\": {\n        \"ip\": \"149.115.134.88\"\n    },\n    \"country\": {\n        \"code\": \"US\",\n        \"name\": \"United States\",\n        \"continent\": \"North America\"\n    }\n}\n",
            "headers": {
                "content-length": "813",
                "content-type": "application/json",
                "date": "Wed, 28 Jan 2026 14:06:35 GMT",
                "server": "nginx"
            },
            "cookies": [],
            "status_code": 200,
            "task_id": "7422278918918391809",
            "created_at": "2026-01-28 14:06:33",
            "updated_at": "2026-01-28 14:06:35"
        }
    ]
  }
  ```
</CodeGroup>

***

## 快速开始

1. 发送查询。要指定它，您可以添加[**参数**](https://help.decodo.com/docs/cn/web-scraping-api-parameters)。
   * 您需要以与发布 `JSON` 参数相同的方式发布查询参数。
   * 不要忘记输入您的凭据（令牌）。[**如何找到它？**](https://help.decodo.com/docs/cn/web-scraping-api-quick-start#authentication)
2. 网页抓取 API 检索您需要的内容。
3. 数据应该以 `HTTP` 状态码 **`200`** 返回，并且应该以 `JSON` 格式解析或包含原始 `HTML`。

<Note>
  ### 保持连接打开

  * 如果在作业完成之前关闭连接，数据将丢失。
  * 打开连接的**超时限制**为 `150` 秒。在极少数负载过重的情况下，我们可能无法将数据传递给您。
  * 您可以使用相同的连接收集数据并获得即时响应。
</Note>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
