Walmart 商品详情
提取 Walmart 商品页面 - 标题、价格、描述、图片、评分和评论。
API 用法
在 Crawling API 请求中添加 &scraper=walmart-product-details。在 url 参数中传入经过 URL 编码的目标 URL。
curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
--data-urlencode 'url=https://www.walmart.com/ip/Meta-Quest-3-512GB-Breakthrough-Mixed-Reality-Powerful-Performance-Asgard-s-Wrath-2/3551794083' \
--data-urlencode 'scraper=walmart-product-details' -Gfrom crawlbase import CrawlingAPI
api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
'https://www.walmart.com/ip/Meta-Quest-3-512GB-Breakthrough-Mixed-Reality-Powerful-Performance-Asgard-s-Wrath-2/3551794083',
{'scraper': 'walmart-product-details'}
)
import json
data = json.loads(res['body'])const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });
const res = await api.get(
'https://www.walmart.com/ip/Meta-Quest-3-512GB-Breakthrough-Mixed-Reality-Powerful-Performance-Asgard-s-Wrath-2/3551794083',
{ scraper: 'walmart-product-details' }
);
const data = JSON.parse(res.body);require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')
res = api.get('https://www.walmart.com/ip/Meta-Quest-3-512GB-Breakthrough-Mixed-Reality-Powerful-Performance-Asgard-s-Wrath-2/3551794083', scraper: 'walmart-product-details')
data = JSON.parse(res.body)示例输入 URL
在 url 参数中传入的 URL(为便于阅读已 URL 解码):
https://www.walmart.com/ip/Meta-Quest-3-512GB-Breakthrough-Mixed-Reality-Powerful-Performance-Asgard-s-Wrath-2/3551794083响应结构
JSON 响应体。当源页面缺少对应值时,字段类型可能为 null。
商品 ID。
标题。
品牌。
当前价格。
折扣前价格。
库存状态。
评分。
评论数量。
描述。
特性列表。
图片 URL。
规格键值对。
销售方。
示例响应
{
"product_id": "3551794083",
"title": "Meta Quest 3 512GB",
"brand": "Meta",
"price": "$649.99",
"availability": "In stock",
"rating": 4.7,
"reviews_count": 8420
}