登录

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' -G
from 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

product_id
字符串
商品 ID。
title
字符串
标题。
brand
字符串 | null
品牌。
price
字符串
当前价格。
original_price
字符串 | null
折扣前价格。
availability
字符串
库存状态。
rating
数字
评分。
reviews_count
整数
评论数量。
description
字符串
描述。
features
数组
特性列表。
images
数组
图片 URL。
specifications
对象
规格键值对。
seller
字符串
销售方。

示例响应

{
  "product_id": "3551794083",
  "title": "Meta Quest 3 512GB",
  "brand": "Meta",
  "price": "$649.99",
  "availability": "In stock",
  "rating": 4.7,
  "reviews_count": 8420
}