Amazon is one of the biggest e-commerce retailers in the world and a popular web scraping target.
Amazon is using its own proprietary web scraping protection mechanisms that are constantly evolving.
This makes it difficult to scrape Amazon data reliably and this is where web scraping APIs come in handy.
Overall, most web scraping APIs we've tested through our benchmarks
perform well for Amazon at $2.81 per 1,000 scrape requests on average.
Amazon.com scraping API benchmarks
Scrapeway runs bi-weekly benchmarks for Amazon Products against the most popular web scraping APIs. Here's the ranking for this period:
Web scraping API benchmark for amazon.com — success rate, speed, cost per 1,000 requests. Data: 2026-05-02 to 2026-05-08.
Amazon is relatively easy to scrape as it's mostly static content with
a few dynamic elements so headless browser use is not required.
That being said, Amazon has a lot of anti-scraping mechanisms in place, so it's recommended to use
a reliable web scraping service that can bypass the constantly changing anti-scraping measures.
See benchmarks for the most up-to-date results.
Here's an example Amazon web scraper using Python and each web scraping API service implementation:
Code example
amazon_scraper.py
fromparselimportSelector# install using `pip install scrapfly-sdk`fromscrapflyimportScrapflyClient,ScrapeConfig,ScrapeApiResponse# create an API client instanceclient=ScrapflyClient(key="YOUR API KEY")# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:api_result=client.scrape(ScrapeConfig(url=url,asp=True,render_js=True,cache=False,cache_ttl=900,country='us',rendering_stage='domcontentloaded',url='https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/',method='GET',))returnapi_result.selectorurl="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# install using `pip install scrapfly-sdk`
from scrapfly import ScrapflyClient, ScrapeConfig, ScrapeApiResponse
# create an API client instance
client = ScrapflyClient(key="YOUR API KEY")
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
api_result = client.scrape(ScrapeConfig(
url=url,
asp=True,
render_js=True,
cache=False,
cache_ttl=900,
country='us',
rendering_stage='domcontentloaded',
url='https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/',
method='GET',
))
return api_result.selector
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# create an API client instance# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# create an API client instance
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# scrapingdog has no integration but we can use httpx# install using `pip install httpx`importhttpx# create an API client instanceclient=httpx.Client(timeout=180)# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:payload={"api_key":"YOUR API KEY","url":url,"api_url":"https://api.scrapingdog.com/amazon/product","domain":"com","asin":"B0F6VKZ4FB","country":"us",}api_result=client.post("https://api.scrapingdog.com/scrape",json=payload,)data=api_result.json()assertdata['success'],f"scrape failed: {data['message']}"returnSelector(data['html'])url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# scrapingdog has no integration but we can use httpx
# install using `pip install httpx`
import httpx
# create an API client instance
client = httpx.Client(timeout=180)
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
payload = {
"api_key": "YOUR API KEY",
"url": url,
"api_url": "https://api.scrapingdog.com/amazon/product",
"domain": "com",
"asin": "B0F6VKZ4FB",
"country": "us",
}
api_result = client.post(
"https://api.scrapingdog.com/scrape",
json=payload,
)
data = api_result.json()
assert data['success'], f"scrape failed: {data['message']}"
return Selector(data['html'])
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# webscrapingapi has a Python SDK but it's not great, use httpx instead:# `pip install httpx`importhttpx# create an API client instanceclient=httpx.Client(timeout=180)# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:api_result=client.get(url,headers=headers,params={"url":url,"api_key":"YOUR API KEY",# NOTE: add your API KEY here!"timeout":60_000,"render_js":"False","url":"https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/","method":"GET",},)assertapi_result.status_code==200,api_result.reason_phrasereturnSelector(api_result.text)url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# webscrapingapi has a Python SDK but it's not great, use httpx instead:
# `pip install httpx`
import httpx
# create an API client instance
client = httpx.Client(timeout=180)
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
api_result = client.get(
url,
headers=headers,
params={
"url": url,
"api_key": "YOUR API KEY", # NOTE: add your API KEY here!
"timeout": 60_000,
"render_js": "False",
"url": "https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/",
"method": "GET",
},
)
assert api_result.status_code == 200, api_result.reason_phrase
return Selector(api_result.text)
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# install using `pip install scraperapi`fromscraper_apiimportScraperAPIClient# create an API client instanceclient=ScraperAPIClient(api_key="YOUR API KEY")# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:api_result=client.get(url=url,headers=headersor{},render=False,url=https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/,method=GET,)assertapi_result.ok,api_result.textreturnSelector(api_result.text)url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# install using `pip install scraperapi`
from scraper_api import ScraperAPIClient
# create an API client instance
client = ScraperAPIClient(api_key="YOUR API KEY")
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
api_result = client.get(
url=url,
headers=headers or {},
render=False,
url=https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/,
method=GET,
)
assert api_result.ok, api_result.text
return Selector(api_result.text)
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# install using `pip install zenrows`fromzenrowsimportZenRowsClient# create an API client instanceclient=ZenRowsClient(apikey="YOUR API KEY")# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:api_result=client.get(url,headers=headers,params={"json_response":"True",})assertapi_result.ok,api_result.textdata=api_result.json()returnSelector(data['html'])url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# install using `pip install zenrows`
from zenrows import ZenRowsClient
# create an API client instance
client = ZenRowsClient(apikey="YOUR API KEY")
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
api_result = client.get(
url,
headers=headers,
params={
"json_response": "True",
}
)
assert api_result.ok, api_result.text
data = api_result.json()
return Selector(data['html'])
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# install using `pip install scrapingant-client`fromscrapingant_clientimportScrapingAntClient# create an API client instanceclient=ScrapingAntClient(token="YOUR API KEY")# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:api_result=client.general_request(url,json=True,proxy_type='residential',url='https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/',method='GET',)assertapi_result.ok,api_result.textreturnSelector(api_result.text)url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# install using `pip install scrapingant-client`
from scrapingant_client import ScrapingAntClient
# create an API client instance
client = ScrapingAntClient(token="YOUR API KEY")
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
api_result = client.general_request(
url,
json=True,
proxy_type='residential',
url='https://www.amazon.com/-/es/LetsJoli-Sujetadores-gelatina-varillas-cobertura/dp/B0F6VKZ4FB/',
method='GET',
)
assert api_result.ok, api_result.text
return Selector(api_result.text)
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
fromparselimportSelector# install using `pip install scrapingbee`fromscrapingbeeimportScrapingBeeClient# create an API client instanceclient=ScrapingBeeClient(api_key="YOUR API KEY")# create scrape function that returns HTML parser for a given URLdefscrape(url:str,country:str="",render_js=False,headers:dict=None)->Selector:api_result=client.get(url,headers=headers,params={"json_response":True,"transparent_status_code":True,})assertapi_result.ok,api_result.textdata=api_result.json()returnSelector(data['body'])url="https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"selector=scrape(url)data={"url":url,"name":selector.css("#productTitle::text").get("").strip(),"asin":selector.css("input[name=ASIN]::attr(value)").get("").strip(),"price":selector.css('span.a-price ::text').get(),# ...}frompprintimportpprintpprint(data)
Output$ python amazon_scraper.py
{
'asin': 'B0B92489PD',
'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
'battery life, adjustable front light, and 16 GB storage – Without '
'Lockscreen Ads – Black',
'price': '$99.99',
'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}
from parsel import Selector
# install using `pip install scrapingbee`
from scrapingbee import ScrapingBeeClient
# create an API client instance
client = ScrapingBeeClient(api_key="YOUR API KEY")
# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
api_result = client.get(
url,
headers=headers,
params={
"json_response": True,
"transparent_status_code": True,
}
)
assert api_result.ok, api_result.text
data = api_result.json()
return Selector(data['body'])
url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
"url": url,
"name": selector.css("#productTitle::text").get("").strip(),
"asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
"price": selector.css('span.a-price ::text').get(),
# ...
}
from pprint import pprint
pprint(data)
As seen above, Amazon scraping in Python is relatively straight-forward using
common Python tools for HTML parsing.
Why scrape Amazon Products?
Amazon is a popular target for web scraping because it has a large amount of
e-commerce data that can be used for various purposes, such as price monitoring,
market research, and competitive analysis.
With price monitoring scraping we can keep track the product historic pricing data and
take advantage of market fluctuations to make better purchasing decisions.
Market research scraping, and especially review scraping, can help us understand customer
preferences through sentiment analysis, identify trends through statistics,
and make informed decisions about product development and marketing strategies.
Amazon is also often scraped by Amazon sellers themselves to monitor competition and adjust their pricing strategy.
Finally, Amazon contains so much data that it can be used in AI and machine learning models to predict trends and make better business decisions.