If you’re a seller or doing market research, knowing a product’s ASIN can help you quickly find exact product matches, analyze competitor listings, and stay ahead in the marketplace. This article will show you simple, effective methods to scrape Amazon ASINs at scale. You will also learn about Bright Data’s solution, which can significantly speed up this process.
What is an ASIN on Amazon?
An ASIN is a 10-character code that combines letters and numbers (for example, B07PZF3QK9). Amazon assigns this unique code to every product in its catalogue, from books to electronics to clothing.
There are two simple ways to find any product’s ASIN:
1. Look at the product URL – the ASIN appears right after “/dp/” in the address bar.
2. Scroll down to the product information section on any Amazon listing – you’ll find the ASIN listed there.
How to Extract ASINs from Amazon
Scraping data from Amazon might seem straightforward initially, but it’s quite challenging due to their robust anti-scraping measures. Amazon actively protects against automated data collection through several sophisticated methods:
- CAPTCHA challenges that appear when suspicious activity is detected
- HTTP 503 errors that block access to requested pages
- Frequent website layout changes that break parsing logic
Here’s a screenshot of a typical HTTP 503 error triggered by Amazon:
You can try this simple script to scrape Amazon ASINs:
So, what is the solution for scraping Amazon ASINs? The most reliable approach involves using residential proxies from the best proxy providers along with proper HTTP headers.
Using Bright Data Proxies to Scrape Amazon ASINs
Bright Data is a leading proxy provider with a global network of proxies. It offers different types of proxies on both shared and private servers, catering to a wide range of use cases. These servers can route traffic using the HTTP, HTTPS, and SOCKS protocols.
Why Choose Bright Data for Amazon Scraping?
- Vast IP Network: Access to 72M+ IPs across 195 countries
- Precise Geolocation Targeting: Target specific cities, ZIP codes, or even carriers
- Multiple Proxy Types: Choose from residential, datacenter, mobile, or ISP proxies.
- High Reliability: 99.9% success rate with optional 100% uptime
- Flexible Scaling: Pay-as-you-go options available for businesses of all sizes
Setting Up Bright Data for Amazon Scraping
If you want to use Bright Data proxies for Amazon ASIN scraping, follow these simple steps:
Step 1: Sign Up for Bright Data
Visit the Bright Data website and create an account. If you already have an account, proceed to the next step.
Step 2: Create a New Proxy Zone
Log in, go to the Proxy & Scraping Infrastructure section, and click Add to create a new proxy zone. Select Residential proxies, which are the best option for avoiding anti-scraping restrictions as they use real device IPs.
Step 3: Configure Proxy Settings
Choose the regions or countries for browsing. Name your zone appropriately (e.g., “asin_scraping”).
Bright Data allows precise geolocation targeting, down to the city or ZIP code.
Step 4: Complete KYC Verification
For full access to Bright Data’s residential proxies, complete the KYC verification process.
Step 5: Start Using Proxies
Once the proxy zone is created, you’ll see credentials (host, port, username, password) to start scraping.
Yes, it’s that simple!
Implementing the Scraper
Step 1: Setting Up Browser Headers
Step 2: Configuring Proxy Settings
Step 3: Making Requests
Make a request using headers and proxies with the curl_cffi library:
Note: The curl_cffi
library is an excellent choice for web scraping, offering advanced browser impersonation capabilities that outperform the standard requests
library.
Step 4: Running Your Scraper
To execute your scraper, you’ll need to configure your target keywords. Here is an example:
Find the complete code here.
The scraper will output results to a CSV file containing:
Using Bright Data Amazon Scraper API to Extract ASINs
While proxy-based scraping works, using a Bright Data Amazon Scraper API offers significant advantages:
- No Infrastructure Management: No need to worry about proxies, IP rotations, or captchas
- Geo-Location Scraping: Scrape from any geographical region
- Simple Integration: Implementation in minutes with any programming language
- Multiple Data Delivery Options:
- Export to Amazon S3, Google Cloud, Azure, Snowflake, or SFTP
- Get data in JSON, NDJSON, CSV, or .gz formats
- GDPR & CCPA Compliant: Ensures privacy compliance for ethical web scraping
- 20 Free API Calls: Test the service before committing
- 24/7 Support: Dedicated support to assist with any API-related questions or issues
Setting Up the Amazon Scraper API
Setting up the API is simple and can be completed in a few steps.
Step 1: Access the API
Navigate to Web Scraper API and search for “amazon products search” under available APIs:
Click “Start setting an API call”:
Step 2: Get Your API Token
Click “Get API token”:
Select “Add token”:
Save your new API token securely:
Step 3: Configure Data Collection
In the Data Collection APIs tab:
- Specify keywords for product search
- Set target Amazon domains
- Define the number of pages to scrape
- Additional filters (optional)
Using the API with Python
Here’s an example Python script to trigger data collection and retrieve results:
To run this code, make sure to replace the following values:
API_TOKEN
with your actual API token.- Modify the
datasets
list to include the products or keywords you want to search for.
Here’s a sample JSON structure of the data retrieved:
You can view the full output by downloading this sample JSON file.
Conclusion
We have discussed the process of collecting Amazon ASINs using Python, but we’ve also faced several challenges along the way. Issues such as CAPTCHAs and rate limits can significantly hinder our data-gathering efforts. As a solution, we can use tools like Bright Data’s proxies or the Amazon Scraper API. These options can help speed up the process and help us bypass common obstacles. If you prefer to avoid the hassle of setting up your scraping tools altogether, Bright Data also offers ready-made Amazon datasets that you can use immediately.
Sign up now and start your free trial!
No credit card required