产品
通过产品 ID 和门店规格抓取 Kroger 产品页数据,包括价格、库存和履约选项。
该 kroger_product 数据源旨在检索 Kroger 商品页面。
请求示例
在下面的示例中,我们发起请求以检索商品 ID 为 0021006550000的商品页面,并使用 ZIP 代码 65401指定配送地点,设置履约类型为 delivery,并将商店 ID 设为 1100002.
curl 'https://realtime.oxylabs.io/v1/queries' \\
--user 'USERNAME:PASSWORD' \\
-H 'Content-Type: application/json' \\
-d '{
"source": "kroger_product",
"product_id": "0021006550000",
"delivery_zip": "65401",
"fulfillment_type": "pickup",
"store_id": "01100002"
}'import requests
from pprint import pprint
# 结构化载荷。
payload = {
"source": "kroger_product",
"product_id": "0021006550000",
"delivery_zip": "65401",
"fulfillment_type": "pickup",
"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 商品页面的基础设置和自定义选项。
- 必填参数
本地化
可根据门店位置、配送区域和首选履约方式自定义结果。
delivery_zip
指定配送地点的 ZIP 代码。
-
在以下情况下需要 fulfillment_type 设置为 delivery.
fulfillment_type
指定订单履约方式。可用值: pickup, delivery, in_store.
in_store (如果仅 store_id 提供)
需要 store_id 为 pickup 和 in_store,或 delivery_zip 为 delivery.
依赖项说明:
pickup和in_store值使用store_id参数来确定正确的门店。delivery使用delivery_zip参数来指定送货地点。如果仅
store_id提供了,并且fulfillment_type未指定,则默认类型为in_store.
如果 fulfillment_type 和 store_id/delivery_zip 组合无效(Kroger 不支持),抓取的页面将返回 404 状态。
最后更新于
这有帮助吗?

