Anmelden

API-Nutzung

Fügen Sie &scraper=walmart-category zu einem Crawling API-Request hinzu. URL-kodieren Sie die Ziel-URL im Parameter url.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.walmart.com/browse/home/dorm-decor/4044_1225301_1225229_7471338' \
  --data-urlencode 'scraper=walmart-category' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.walmart.com/browse/home/dorm-decor/4044_1225301_1225229_7471338',
    {'scraper': 'walmart-category'}
)

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/browse/home/dorm-decor/4044_1225301_1225229_7471338',
  { scraper: 'walmart-category' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.walmart.com/browse/home/dorm-decor/4044_1225301_1225229_7471338', scraper: 'walmart-category')
data = JSON.parse(res.body)

Beispiel-Eingabe-URL

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

https://www.walmart.com/browse/home/dorm-decor/4044_1225301_1225229_7471338

Response-Struktur

JSON-Response-Body. Feldtypen können null sein, wenn die Quellseite den Wert auslässt.

category_path
array
Breadcrumb vom Root bis zur aktuellen Kategorie.
category_title
string
Kategorietitel.
total_products
integer | null
Gesamtzahl der Produkte.
filters
array
Filteroptionen.
products
array
Produktübersichten (gleiche Struktur wie walmart-serp).

Beispiel-Response

{
  "category_path": ["Home", "Dorm Decor"],
  "category_title": "Dorm Decor",
  "total_products": 1240,
  "products": [
    {
      "product_id": "3551794083",
      "title": "LED String Lights",
      "price": "$12.99"
    }
  ]
}