Documentation has been updated: see help center and changelog in one place.

构建请求

阅读有关如何开始并使用以下内容发出请求的详细指南 网页爬虫API 针对不同网站。

搜索引擎

快速开始

选择您想要抓取的搜索引擎: Google, Bing, 其他搜索引擎.

请求示例

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_search",
        "query": "adidas"
    }'

在我们的示例中,我们使用同步的 Realtime 集成方法。如果您想使用 Proxy Endpoint 或异步的 Push-Pull 集成,请参阅 集成方法 部分。

构建请求

  1. 选择您的集成方式:同步(Realtime, Proxy Endpoint)或异步(Push-Pull).

  2. 在构建请求时,包含以下要素:

  1. 端点:

POST https://realtime.oxylabs.io/v1/queries
USERNAME:PASSWORD
  1. 内容类型。提交作业时,请始终添加此标头:

Content-Type: application/json
  1. 有效载荷:

    1. source - 此参数设置将用于处理您的请求的爬虫。

    2. URLquery - 提供 URLquery 以指定您想要抓取页面的类型。请参阅下表及相应的目标子页面,了解何时使用每个参数的详细指南。

    3. 其他参数:可选地,您可以包含其他参数,例如 geo_location, user_agent_type, parse, render 等等,以自定义您的抓取请求。

{
    "source": "google_search",
    "query": "adidas",
    "geo_location": "California,United States",
    "parse": true
}
目标
来源(抓取 URL)
来源(使用 Query)

google

google_search,

google_ads,

google_lens,

google_maps,

google_travel_hotels,

google_suggest,

google_trends_explore

bing

bing_search

universal

使用 query 参数不受支持

电商平台

快速开始

选择您要抓取的在线市场: Amazon, Google Shopping, Walmart, Best Buy, Etsy, 目标, 其他网站.

请求示例

curl 'https://realtime.oxylabs.io/v1/queries' \
--user "USERNAME:PASSWORD" \
-H "Content-Type: application/json" \
-d '{
        "source": "amazon_product",
        "query": "B07FZ8S74R",
        "geo_location": "90210",
        "parse": true
    }'

在我们的示例中,我们使用同步的 Realtime 集成方法。如果您想使用 Proxy Endpoint 或异步的 Push-Pull 集成,请参阅 集成方法 部分。

构建请求

  1. 选择您的集成方式:同步(Realtime, Proxy Endpoint)或异步(Push-Pull).

  2. 在构建请求时,包含以下要素:

  1. 端点:

POST https://realtime.oxylabs.io/v1/queries
USERNAME:PASSWORD
  1. 内容类型。提交作业时,请始终添加此标头:

Content-Type: application/json
  1. 有效载荷:

    1. source - 此参数设置将用于处理您的请求的爬虫。

    2. URLquery - 提供 URLquery 以指定您想要抓取页面的类型。请参阅下表及相应的目标子页面,了解何时使用每个参数的详细指南。

    3. 其他参数:可选地,您可以包含其他参数,例如 geo_location, user_agent_type, parse, render 等等,以自定义您的抓取请求。

{
    "source": "amazon_product",
    "query": "B07FZ8S74R",
    "geo_location": "90210",
    "parse": true
}
目标
来源(抓取 URL)
来源(使用 Query)

amazon

amazon_product,

amazon_search,

amazon_pricing,

amazon_sellers,

amazon_bestsellers,

amazon_questions

google

google_shopping_product,

google_shopping_search,

google_shopping_pricing

universal

使用 query 参数不受支持

其他网站

快速开始

使用我们的任意 URL 抓取 universal 源。您也可以添加 附加参数.

请求示例

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "universal",
        "url": "https://sandbox.oxylabs.io/"
    }'

在我们的示例中,我们使用同步的 Realtime 集成方法。如果您想使用 Proxy Endpoint 或异步的 Push-Pull 集成,请参阅 集成方法 部分。

构建请求

  1. 选择您的集成方式:同步(Realtime, Proxy Endpoint)或异步(Push-Pull).

  2. 在构建请求时,包含以下要素:

  1. 端点:

POST https://realtime.oxylabs.io/v1/queries
USERNAME:PASSWORD
  1. 内容类型。提交作业时,请始终添加此标头:

Content-Type: application/json
  1. 有效载荷.

    1. source - 此参数设置将用于处理您的请求的爬虫。

    2. URL - 提供 URL 您想抓取的目标的示例,例如:

      1. 房地产: Idealista、Redfin、Zillow、Zoopla

      2. 旅行: Airbnb、Agoda、Booking、TripAdvisor

      3. 汽车行业: Crunchbase、ZoomInfo、AngelList、Product Hunt

      4. 公司数据: Netflix、SoundCloud、YouTube、IMDb

      5. 娱乐: AutoEurope、Autotrader、RockAuto、Halfords

      6. 任何其他.

    3. 其他参数:可选地,您可以包含其他参数,例如 geo_location, user_agent_type,等等,以自定义您的抓取请求。

    {
        "source": "universal",
        "url": "https://www.zillow.com/homedetails/10066-Cielo-Dr-Beverly-Hills-CA-90210/243990393_zpid/"
    }

如果您在发出第一次请求时需要任何帮助,欢迎通过24/7在线客服与我们联系。

此处提供的所有信息均按“原样”提供,仅供参考。对于您使用本页所含任何信息,我们不做任何陈述并且否认一切责任。在进行任何形式的抓取活动之前,您应咨询法律顾问并仔细阅读相关网站的服务条款或获得抓取许可。

最后更新于

这有帮助吗?