Anmelden

API-Verwendung

Fügen Sie &scraper=google-product-offers 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.google.com/shopping/product/7015446445080090940/offers' \
  --data-urlencode 'scraper=google-product-offers' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.google.com/shopping/product/7015446445080090940/offers',
    {'scraper': 'google-product-offers'}
)

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.google.com/shopping/product/7015446445080090940/offers',
  { scraper: 'google-product-offers' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.google.com/shopping/product/7015446445080090940/offers', scraper: 'google-product-offers')
data = JSON.parse(res.body)

Beispiel-Eingabe-URL

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

https://www.google.com/shopping/product/7015446445080090940/offers

Response-Struktur

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

product_title
string
Produktname wie angezeigt.
offers
array
Händlerangebote.
offers[].seller
string
Name des Händlers.
offers[].price
string
Angegebener Preis.
offers[].shipping
string | null
Versandkosten oder Hinweis.
offers[].condition
string
Neu / Gebraucht / Generalüberholt.
offers[].seller_rating
number | null
Aggregierte Verkäuferbewertung.
offers[].url
string
Click-out-URL zum Händler.

Beispiel-Response

{
  "product_title": "Sony WH-1000XM5 Wireless Headphones",
  "offers": [
    {
      "seller": "Best Buy",
      "price": "$348.00",
      "shipping": "Free shipping",
      "condition": "New",
      "seller_rating": 4.8,
      "url": "https://www.bestbuy.com/site/..."
    }
  ]
}