Search
了解如何使用网页爬虫 API 获取 Walmart 搜索结果。了解其请求参数和结构化数据输出。
请求示例
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "walmart_search",
"query": "iphone",
"parse": true
}'import requests
from pprint import pprint
# 构建负载。
payload = {
'source': 'walmart_search',
'query': 'iphone',
'parse': True,
}
# 获取响应。
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'),
json=payload,
)
# 该请求不会返回带有作业状态和结果 URL 的响应,而是返回
# 包含结果的 JSON 响应。
pprint(response.json())请求参数值
通用
参数
说明
默认值
本地化
参数
说明
类型
分页
参数
说明
默认值
结构化数据
输出数据字典
HTML 示例
JSON 结构
键
说明
类型
General

Key (general)
说明
类型
Price

Key (price)
说明
类型
Rating

Key (rating)
说明
类型
Seller
Key (seller)
说明
类型
Variants

Key (variants)
说明
类型
Fulfillment

Key (fulfillment)
说明
类型
Facets
Key (facets)
说明
类型
Location

Key (location)
说明
类型
Page details
Key (page_details)
说明
键
最后更新于
这有帮助吗?

