Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itzdm/amazon-flipkart-scrap
This project is a Python Flask API designed to scrape product information from Amazon and Flipkart websites. It retrieves product details such as title, price, image, and rating from the provided URLs.
https://github.com/itzdm/amazon-flipkart-scrap
Last synced: 22 days ago
JSON representation
This project is a Python Flask API designed to scrape product information from Amazon and Flipkart websites. It retrieves product details such as title, price, image, and rating from the provided URLs.
- Host: GitHub
- URL: https://github.com/itzdm/amazon-flipkart-scrap
- Owner: itzDM
- Created: 2024-02-20T16:46:24.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-11T17:57:52.000Z (11 months ago)
- Last Synced: 2024-03-11T19:05:17.334Z (11 months ago)
- Language: Python
- Homepage: https://amazon-flipkart-scrap.vercel.app
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Flask API for Scraping Amazon and Flipkart
This project is a Python Flask API designed to scrape product information from Amazon and Flipkart websites. It retrieves product details such as title, price, image, and rating from the provided URLs. This API can be integrated into various applications to fetch real-time data from these e-commerce platforms.
## Response Format
The API responds with JSON data containing the following fields:
- `title`: The title of the product.
- `currentPrice`: The price of the product(float).
- `img`: The URL of the product image.
- `rating`: The rating of the product(float).
- `company`: The name Of Company.
- `url`:Url Of Product.Example response:
```json
{
"title": "Example Product",
"currentPrice": 19.99,
"img": "https://example.com/product_image.jpg",
"rating": 4.5,
"company": "amazon",
"url": "https://www.amazon.com/example-product"
}
```## Clone
1. Clone this repository to your local machine:
```
git clone https://github.com/itzDM/Amazon-flipkart-scrap.git
```2. Navigate to the project directory:
```
cd your_project
```3. Install the required dependencies:
```
pip install -r requirements.txt
```## Usage
1. Run the Flask API:
```
python api/app.py
```2. Once the server is running, you can make HTTP requests to the following endpoints:
3. (GET method) Copy the URL And Replace 'ProductCopyUrl' with product Url
```
http://yourLocalHost/?url=ProductCopyUrl````
4. (POST method) Copy the URL And Replace 'ProductCopyUrl' with product Url
```
http://yourLocalHost/```
Body Data
```json
{
"url": "ProductCopyUrl"
}
```## Disclaimer
This project is for educational purposes only. Scraping e-commerce websites may violate their terms of service. Use responsibly and respect the terms and conditions of the websites you scrape.