crawlbaseDocs
Se connecter

Utilisation de l'API

Ajoutez &scraper=walmart-product-details à une requête Crawling API. Encodez l'URL cible au format URL dans le paramètre 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)

Exemple d'URL d'entrée

L'URL passée dans le paramètre url (décodée pour plus de lisibilité) :

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

Structure de la réponse

Corps de la réponse JSON. Les types de champs peuvent être null lorsque la page source omet la valeur.

product_id
chaîne
ID du produit.
title
chaîne
Titre.
brand
chaîne | null
Marque.
price
chaîne
Prix actuel.
original_price
chaîne | null
Prix avant remise.
availability
chaîne
État du stock.
rating
nombre
Note.
reviews_count
entier
Nombre d'avis.
description
chaîne
Description.
features
tableau
Caractéristiques en liste.
images
tableau
URLs des images.
specifications
objet
Paires clé/valeur des spécifications.
seller
chaîne
Vendu par.

Exemple de réponse

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