Anmelden

API-Nutzung

Fügen Sie &scraper=walmart-product-details zu einer Crawling API-Anfrage hinzu. URL-kodieren Sie die Ziel-URL im url-Parameter.

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)

Beispiel-Eingabe-URL

Die im url-Parameter übergebene URL (zur besseren Lesbarkeit URL-dekodiert):

https://www.walmart.com/ip/Meta-Quest-3-512GB-Breakthrough-Mixed-Reality-Powerful-Performance-Asgard-s-Wrath-2/3551794083

Response-Struktur

JSON-Response-Body. Feldtypen können null sein, wenn die Quellseite den Wert nicht enthält.

product_id
string
Produkt-ID.
title
string
Titel.
brand
string | null
Marke.
price
string
Aktueller Preis.
original_price
string | null
Preis vor Rabatt.
availability
string
Lagerstatus.
rating
number
Bewertung.
reviews_count
integer
Anzahl der Rezensionen.
description
string
Beschreibung.
features
array
Feature-Bulletpoints.
images
array
Bild-URLs.
specifications
object
Spezifikations-Schlüssel/Wert-Paare.
seller
string
Verkauft von.

Beispiel-Response

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