A Python-based web scraping project that extracts product details from Amazon search result pages and saves them into a CSV file for further analysis.
β οΈ This project is for educational purposes only.
- Scrapes Amazon search result pages
- Extracts:
- Product URL
- Product title
- Price
- Rating
- Number of reviews
- ASIN
- Product description
- Saves structured data into a CSV file
- Supports scraping multiple URLs using an input file
- Python
- Requests
- BeautifulSoup (bs4)
- CSV module
Amazon-Scraping-With-Python
β
βββ amazon_scraping.py # Main scraping script
βββ url.txt # Input file containing Amazon search URLs
βββ out.csv # Output file with scraped product data- Reads Amazon search URLs from
url.txt - Sends HTTP requests with browser-like headers
- Parses HTML using BeautifulSoup
- Extracts product-level information
- Writes the extracted data into
out.csv
pip install requests beautifulsoup4 lxml2οΈβ£ Add URLs
Add Amazon search URLs (one per line) inside:
url.txt3οΈβ£ Run the Script
python amazon_scraping.py4οΈβ£ Output
Scraped data will be saved to:
out.csv-
Product Url
-
Product Title
-
Price
-
Rating
-
Number of Review
-
ASIN
-
Product Description
-
Amazon may block requests if scraping is excessive
-
Use delays responsibly (time.sleep)
-
Follow Amazonβs Terms of Service
Built as a Python automation and web scraping practice project to understand real-world data extraction workflows.