Package: amazon-scraper-api
Amazon ScraperOxylabs'Amazon Scraper APIallows users to easily scrape publicly-available data from any page on Amazon, such as reviews, pricing, product information and more. If you're interested in testing out this powerful tool, you cansign up for a free trial on the Oxylabs website.OverviewBelow is a quick overview of all the available datasourcevalues we support with Amazon.SourceDescriptionStructured dataamazonSubmit any Amazon URL you like.Depends on the URL.amazon_bestsellersList of best seller items in a taxonomy node of your choice.Yesamazon_pricingList of offers available for an ASIN of your choice.Yes.amazon_productProduct page of an ASIN of your choice.Yes.amazon_questionsQ&A page of an ASIN of your choice.Yes.amazon_reviewsReviews page of an ASIN of your choice.Yes.amazon_searchSearch results for a search term of your choice.Yes.amazon_sellersSeller information of a seller of your choice.Yes.URLTheamazonsource is designed to retrieve the content from various Amazon URLs. Instead of sending multiple parameters, you can provide us with a direct URL to the required Amazon page. We do not strip any parameters or alter your URLs in any way.Query parametersParameterDescriptionDefault ValuesourceData source.More info.N/AurlDirect URL (link) to Amazon page-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.-callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data, as long as the URL submitted is for one of the page types we can parse.false- required parameterPython code exampleIn the code example below, we make a request to retrieve the Amazon product page forB0BDJ279KF.importrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon','url':'https://www.amazon.co.uk/dp/B0BDJ279KF','parse':True}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('YOUR_USERNAME','YOUR_PASSWORD'),#Your credentials go herejson=payload,)# Instead of response with job status and results url, this will return the# JSON response with results.pprint(response.json())To see the response example with retrieved data, downloadthissample outputin JSON format.SearchTheamazon_searchsource is designed to retrieve Amazon search result pages.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_searchdomainDomain localization for Amazon. The full list of available domains can be foundhere.comqueryUTF-encoded keyword-start_pageStarting page number1pagesNumber of pages to retrieve1geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.-callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data.-context:category_idSearch for items in a particular browse node (product category).-context:merchant_idSearch for items sold by a particular seller.-- required parameterPython code exampleIn the code example below, we make a request to retrieve product page for ASIN3AA17D2BRD4YMT0Xonamazon.nlmarketplace. In case the ASIN provided is a parent ASIN, we ask Amazon to return a product page of an automatically-selected variation.importrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_search','domain':'nl','query':'adidas','start_page':11,'pages':10,'parse':True,'context':[{'key':'category_id','value':16391843031},{'key':'merchant_id','value':'3AA17D2BRD4YMT0X'}],}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())To see the response example with retrieved data, downloadthissample outputfile in JSON format.ProductTheamazon_productdata source is designed to retrieve Amazon product pages.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_productdomainDomain localization for Amazon. The full list of available domains can be foundhere.comquery10-symbol ASIN code-geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data.-context:autoselect_variantTo get accurate pricing/buybox data, set this parameter totrue(which tells us to append theth=1&psc=1URL parameters to the end of the product URL). To get an accurate representation of the parent ASIN's product page, omit this parameter or set it tofalse.false- required parameterPython code exampleIn the code example below, we make a request to retrieve product page for ASINB09RX4KS1Gonamazon.nlmarketplace. In case the ASIN provided is a parent ASIN, we ask Amazon to return a product page of an automatically-selected variation.importrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_product','domain':'nl','query':'B09RX4KS1G','parse':True,'context':[{'key':'autoselect_variant','value':True}],}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())To see the response example with retrieved data, downloadthissample outputfile in JSON format.Offer listingTheamazon_pricingdata source is designed to retrieve Amazon product offer listings.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_pricingdomainDomain localization for Amazon. The full list of available domains can be foundhere.comquery10-symbol ASIN code-start_pageStarting page number1pagesNumber of pages to retrieve1geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data.-- required parameterPython code exampleIn the code examples below, we make a request to retrieve product offer listing page for ASINB09RX4KS1Gonamazon.nlmarketplace.importrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_pricing','domain':'nl','query':'B09RX4KS1G','parse':True,}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())To see what the parsed output looks like, downloadthisJSON file.ReviewsTheamazon_reviewsdata source is designed to retrieve Amazon product review pages of an ASIN of your choice.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_reviewsdomainDomain localization for Amazon. The full list of available domains can be foundhere.comquery10-symbol ASIN code-geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktopstart_pageStarting page number1pagesNumber of pages to retrieve1renderEnables JavaScript rendering.More info.callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data.-- required parameterPython code exampleimportrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_reviews','domain':'nl','query':'B09RX4KS1G','parse':True,}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())To see the response example with retrieved data, download thissampleoutputfile in JSON format.Questions & AnswersTheamazon_questionsdata source is designed to retrieve any particular product's Questions & Answers pages.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_questionsdomainDomain localization for Amazon. The full list of available domains can be foundhere.comquery10-symbol ASIN code-geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.****callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data.-- required parameterPython code exampleimportrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_questions','domain':'nl','query':'B09RX4KS1G','parse':True,}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())To see the response example with retrieved data, download thissampleoutputfile in JSON format.Best SellersTheamazon_bestsellersdata source is designed to retrieve Amazon Best Sellers pages.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_bestsellersdomainDomain localization for Amazon. The full list of available domains can be foundhere.comqueryDepartment name. Example:Clothing, Shoes & Jewelry-start_pageStarting page number1pagesNumber of pages to retrieve1geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data.-context:category_idSearch for items in a particular browse node (product category).-- required parameterPython code exampleimportrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_bestsellers','domain':'de','query':'automotive','start_page':2,'parse':True,'context':[{'key':'category_id','value':82400031},],}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())To see the response example with retrieved data, download thissample outputfile in JSON format.SellersTheamazon_sellersdata source is designed to retrieve Amazon Sellers pages.Query parametersParameterDescriptionDefault ValuesourceData source.More info.amazon_sellersdomainDomain localization for Amazon. The full list of available domains can be foundhere.comquery13-character seller ID-geo_locationTheDeliver tolocation. See our guide to using this parameterhere.-user_agent_typeDevice type and browser. The full list can be foundhere.desktoprenderEnables JavaScript rendering.More info.callback_urlURL to your callback endpoint.More info.-parsetruewill return structured data. Please note that right now we only support parsed output fordesktopdevice type. However, there is no apparent reason to get sellers pages with any other device type, as seller data is going to be exactly the same across all devices.-- required parameterPython code exampleIn the code examples below, we make a request to retrieve the seller page for seller IDABNP0A7Y0QWBNonamazon.demarketplace.importrequestsfrompprintimportpprint# Structure payload.payload={'source':'amazon_sellers','domain':'de','query':'ABNP0A7Y0QWBN','parse':True}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Print prettified response to stdout.pprint(response.json())