Skip to content

dvishal485/flipkart-product-stock

Repository files navigation

Flipkart Pincode Specific Product Stock

API to scrapes product details and pincode specific stock from Flipkart.

The Flipkart Scrapper API could give the stock avalibility of a product in general and not in any specific reigion. This project is created to fill the gap in hole of specificity of product avalibility.

You can also deploy the API yourself on Heroku

Deploy

(API will be disabled at night, host your own to get access of API at those hours) : See Important Note


Features

You can fetch following product details from Flipkart :

  • Product Name

  • Current Price (specific to given pincode)

  • Original Price / MRP

  • Discount offered

  • Shareable URL (without unnecessary arguments)

  • Flipkart Assured or not (f-assured status)

  • Stock details

  • General Stock detail (without entering pincode)

  • Specific Stock detail (specific to given pincode)


Usage

  1. Using API

    API requires two arguments :

    • Flipkart Product URL

    • Pincode (defaults to 110051)

    Syntax URL : https://flipkart-product-stock.herokuapp.com/product?link={product_link}&pincode={pincode}

  2. Using Terminal Script

    One can also use the terminal-script.py provided in the root folder

    1. Clone the repository to your system.

    2. Install the python modules (one-time measure):

      pip install -r requirements.txt

    3. Run the script in the root directory :

      python terminal-script.py

    4. You will be asked for the product link and then the pincode of your location and will be reverted back with product and stock details


Important Note

As the API is hosted on Heroku's free limited dyno, the API hosted by developer will be unavalible during night ( 02:00 AM to 10:00 AM IST ). If you want to use the API at those hours, kindly host your own.


Sample

The API is easy to use and understand, but in case of any problem do check out the sample API usage and it's response.

Check out an example
{
  "name": "42 Years Chapterwise Topicwise Solved Papers (2020-1979) Iit Jee Chemistry  (English, Paperback, Shahi Ranjeet)",
  "current_price": 236,
  "original_price": 430,
  "discount": "45% off",
  "share_url": "https://dl.flipkart.com/s/WaqrsvNNNN",
  "fassured": true,
  "stock_details": {
    "general_stock": true,
    "pincode": "712702",
    "pincode_stock": false
  }
}

ToDo

  • Make an API usage guide
  • Add Deploy to Heroku button
  • Add Support for more Products
  • Get Product Price specific to the pincode
  • Improve accuracy (worked for all Flipkart links which were tested)

License & Copyright

About

Fetch Flipkart product details including name, price, MRP and Stock details in general as well as specific to a pincode

Topics

Resources

License

Stars

Watchers

Forks

Languages