> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods.md).

# 集成方法

探索 Oxylabs 网页爬虫API 的三种集成方法（Realtime、Push-Pull、Proxy Endpoint），并了解它们在任务提交、格式和工作流方面的差异。

网页爬虫API 支持 **三种集成方式，** 每一种都有其独特优势：

* [**Push-Pull**](/products/cn/web-scraper-api/integration-methods/push-pull.md) **（支持批量查询）**。这种集成方式是 **异步的**。这意味着，在你提交任务后，我们会很快向你返回一个包含任务信息的 JSON，其中包括用于下载结果/检查任务状态的 URL。我们完成任务处理后，我们会 `POST` 将任务完成通知发送到你的服务器，此时你就可以下载结果了。这种集成方式还支持将结果直接上传到你的 AWS S3、Google Cloud 或任何兼容 S3 的存储。

{% hint style="success" %}
Push-Pull 是我们推荐的集成方式，适合可靠地处理大量数据。
{% endhint %}

* [**Realtime**](/products/cn/web-scraper-api/integration-methods/realtime.md)。这种方式也是同步的。也就是说，在发送任务提交请求后， **你必须保持连接打开** 直到我们成功完成你的任务或返回错误。这种集成方式最适合需要即时响应的实时数据提取。你可以发送包含爬取和解析参数的 JSON 负载，而 API 会自动处理代理管理、重试和机器人流量管理。
* [**Proxy Endpoint**](/products/cn/web-scraper-api/integration-methods/proxy-endpoint.md)。这种方式同样是同步的（和 Realtime 类似），但你不是通过 RESTful 接口使用我们的服务，而是 **可以像代理一样使用我们的端点**。如果你以前用过代理，只是想从我们这里获取可用的网页内容，就使用 Proxy Endpoint。

{% hint style="info" %}
所有 API 连接的生存时间（**TTL**）设置为 **150 秒**。需要注意的是，在极少数情况下，连接可能会在收到响应之前超时。系统负载或极其复杂的任务提交等因素都可能导致超时。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
