Skip to content

arv-anshul/ecommerce-scrapper-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Scrapper API

LinkedIn Post GitHub Badge

Welcome to the E-commerce API project! 🌐 This API is designed to scrape valuable data from E-commerce websites, with a focus on Flipkart (for now).

🧐 What I Learned While Creating This API?

  • 🕵️ FastAPI Framework: Explored the ins and outs of the powerful FastAPI framework, leveraging its asynchronous capabilities for efficient and speedy data retrieval.
  • 🤓 HTTP Request Methods and Status Codes: Delved deeper into HTTP request methods at an intermediate level, mastering the use of various HTTP status codes for a more nuanced and controlled API interaction.
  • 💡 Error Handling and Exception Tricks: Implemented clever techniques to handle errors and exceptions, ensuring a robust and graceful API experience for users.
  • 🗺️ Pydantic Library and Modular Programming: Explored the versatility of the pydantic library for data validation and modular programming. Embraced object-oriented programming (OOPs) concepts for a more structured and maintainable codebase.
  • 🧪 Writing Tests: Implemented thorough tests for the FastAPI application, ensuring the reliability and correctness of every API endpoint.

🤝 What You Can Achieve With My APIs?

  • Data Analysis: Conduct in-depth data analysis on the information fetched from E-commerce websites. Gain insights into price variations, product specification differences, and overall market trends.
  • Machine Learning Integration: Leverage the scraped data to build machine learning models. Explore possibilities such as sentiment analysis, product price prediction (for items like Mobiles, Laptops, etc.), and other innovative applications.
  • Custom Use Cases: The versatility of this API allows you to tailor its application to your specific needs. Whether you're interested in market research, trend analysis, or creating unique machine learning applications, the possibilities are vast.
  • Data-Driven Decision Making: Empower your decision-making process with accurate and up-to-date data from E-commerce websites. Use the insights gained to make informed choices in various domains.

🧑‍💻 Tech Stacks

Stack Tech
Web scraping Python
Backend FastAPI
Data Validation Pydantic
Websites Flipkart
Curl Parser Python

🧩 Usage

  1. Clone this repo.
  2. Install the projects requirements with following command:
pip install -r requirements.txt
  1. Run the fastapi app.
uvicorn --reload ecommerce.api.app:app
  1. Now FastAPI instance is running on your system. So, you can access it on your localhost with the following url:
http://localhost:8000/

For better representation of the APIs head to:

http://localhost:8000/docs

📌 API Endpoints

🖼️ Screenshot of OpenAPI Docs

OpenAPI Docs