For the complete documentation index, see llms.txt. This page is also available as Markdown.

URL

通过直接 URL 抓取任意 Kroger 页面,支持门店特定结果、配送 ZIP 代码和履约类型选择。

你可以通过向我们的服务提供自己的 URL 来获取 Kroger 结果。我们可以返回你想要的任何 Kroger 页面 HTML。

请求示例

下面的示例演示如何根据特定商品查询、价格范围和门店位置检索 Kroger 搜索结果页。

curl 'https://realtime.oxylabs.io/v1/queries' \\
--user 'USERNAME:PASSWORD' \\
-H 'Content-Type: application/json' \\
-d '{
        "source": "kroger",
        "url": "https://www.kroger.com/search?query=adidas&price=10.00-15.00",
        "store_id": "01100002"
    }'
import requests
from pprint import pprint

# 结构化载荷。
payload = {
    "source": "kroger",
    "url": "https://www.kroger.com/search?query=adidas&price=10.00-15.00",
    "store_id": "01100002",
}

# 获取响应。
response = requests.request(
    "POST",
    "https://realtime.oxylabs.io/v1/queries",
    auth=("USERNAME", "PASSWORD"),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())

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

请求参数值

通用

抓取 Kroger 市场的基本设置和自定义选项。

参数
描述
默认值

source

设置抓取器。

kroger

url

任意页面的直接 URL(链接)。

-

render

设置为时启用 JavaScript 渲染 html. 更多信息.

-

callback_url

回调端点的 URL。 更多信息

-

user_agent_type

设备类型和浏览器。完整列表可在 此处.

desktop

- 必填参数

本地化

可根据门店位置、配送区域和首选履约方式自定义结果。

参数
描述
默认值
依赖项

store_id

指定门店。查看可用值 此处。ID 必须以 '0' 开头。

-

在以下情况下需要 fulfillment_type 设置为 pickupin_store.

delivery_zip

指定配送地点的 ZIP 代码。

-

在以下情况下需要 fulfillment_type 设置为 delivery.

fulfillment_type

指定订单履约方式。可用值: pickup, delivery, in_store.

pickup (如果仅 store_id 提供)

需要 store_id 用于 pickupin_store,或 delivery_zip 用于 delivery.

依赖关系说明:

  • pickupin_store 值使用 store_id 参数来确定正确的门店。

  • delivery 使用 delivery_zip 参数来指定送货地点。

  • 如果仅 store_id 提供了,并且 fulfillment_type 未指定,则默认类型为 pickup.

最后更新于

这有帮助吗?