Walmart Product Search
Walmart Product Search 用于获取 Walmart 商品搜索结果。
- 按关键词抓取商品搜索结果
- 支持按页码继续读取结果
- 返回自然结果、推荐结果和筛选项
- 适合做商品检索和定制化电商结果整理
使用 XCrawl 获取 Walmart 商品搜索结果
使用方式
curl -s -X POST 'https://run.xcrawl.com/v1/data' \
-H 'Authorization: Bearer $XCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"engine": "walmart_search",
"location": "US",
"keyword_list": ["coffee"],
"start_page": 1,
"pages": 1
}'请求参数说明:
engine固定为walmart_searchlocation用于指定搜索地区keyword_list用于传入一个或多个关键词start_page用于指定起始页码pages用于指定抓取页数
响应示例
{
"result": [
{
"page": 2,
"total_page": 11,
"organic_results": [
{
"product_id": "264873080",
"title": "Black Rifle Coffee Company Beyond Black K-Cup Pods",
"line_price": "$16.96"
}
]
}
]
}参数说明
必填参数
| 参数 | 类型 | 说明 |
|---|---|---|
location | string | 指定搜索地区。 |
keyword_list | array | 传入一个或多个关键词。 |
start_page | number | 起始页码。 |
pages | number | 抓取页数。 |
参数补充说明
location默认值为USstart_page默认值为1pages默认值为1
响应字段
响应数据位于 result[]。
| 字段 | 类型 | 说明 |
|---|---|---|
page | number | 当前页码。 |
total_page | number | 总页数。 |
organic_results_counts | number | 自然结果数量。 |
other_options_to_consider_results_counts | number | 推荐结果数量。 |
organic_results | array | 自然结果列表。 |
other_options_to_consider_results | array | 推荐结果列表。 |
filters | array | 筛选项。 |
related_queries | array | 相关搜索。 |
商品结果字段
organic_results[] 和 other_options_to_consider_results[] 中常用字段包括:
| 字段 | 类型 | 说明 |
|---|---|---|
product_id | string | 商品 ID。 |
title | string | 商品标题。 |
thumbnail_url | string | 商品缩略图地址。 |
rating | number | 商品评分。 |
reviews | number | 评论数量。 |
seller_name | string | 卖家名称。 |
availability_status | string | 库存状态。 |
line_price | string | 标价。 |
unit_price | string | 单价。 |
product_page_url | string | 商品页链接。 |
