Amazon SERP
Parse an Amazon search results page into a structured array of products with prices, ratings, and pagination info.
API usage
Add &scraper=amazon-serp to a Crawling API request. URL-encode the target URL in the url parameter.
curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
--data-urlencode 'url=https://www.amazon.com/s?k=games' \
--data-urlencode 'scraper=amazon-serp' -Gfrom crawlbase import CrawlingAPI
api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
'https://www.amazon.com/s?k=games',
{'scraper': 'amazon-serp'}
)
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.amazon.com/s?k=games',
{ scraper: 'amazon-serp' }
);
const data = JSON.parse(res.body);require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')
res = api.get('https://www.amazon.com/s?k=games', scraper: 'amazon-serp')
data = JSON.parse(res.body)Example input URL
The URL passed in the url parameter (URL-decoded for readability):
https://www.amazon.com/s?k=gamesResponse shape
JSON response body. Field types may be null when the source page omits the value.
Search query that produced these results.
Reported total result count.
Current page number.
Per-product results (see fields below).
Product ASIN.
Product title.
Displayed price.
Star rating.
Review count.
Thumbnail URL.
Absolute product URL.
True if the listing is a Sponsored ad.
Sample response
{
"query": "games",
"total_results": 60000,
"page": 1,
"products": [
{
"asin": "B0CRJYSL5G",
"title": "Catan: 5th Edition",
"price": "$44.97",
"rating": 4.8,
"reviews_count": 5732,
"image": "https://m.media-amazon.com/images/I/...jpg",
"url": "https://www.amazon.com/dp/B0CRJYSL5G",
"sponsored": false
}
]
}
