How to Use Flipkart API to Fetch Products with PHP


For affiliate marketers, coupon websites and comparison websites, Flipkart offers its API. With its API, one can get products, prices, deals and even orders done by one’s affiliate. Most of the companies still rely on crawling or using but use of API is not recommended for better management. If you are one of those who want to get products from Flipkart by using its API, you must know how to use curl. Because I will be using CURL in this code.

For using the API, you must first have affiliate account. If you are reading this post, It means you already have one. I also recommend you to check the Affiliate management program by Techlomedia Gadgets. Basically this program is for those who are related to smartphones affiliate. But you can contact for more custom banners.

Now come to the Flipkart API.

You can get the products feed by using this URL:

If you prefer XML, you can use this URL

Here, add your tracking id of Flipkart where it asks.

This URL will give you the URLs of different flipkart categories. If you want to fetch data from all categories, you can get it. You can also just use it for specific data.

Just parse this JSON to get URLs. For these categories specific URLs, we need authentication. You will be provided the authentication credentials in your Flipkart affiliate section.

This code will give only 50 products of that specific category. You will also get the URL to the next 50 products in each iteration until there is no product left. You can access next URL with this line:

I didn’t want to share my credential or affiliate tracking in code. This is why, you will have to test the code with your own affilaite tracking and credentials.

If you have any confusion, you can ask in comments.



Written by Deepanker

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.


Leave a Reply
  1. Thanks a Lot Bro . A detailed code without any confusion. You saved my time. Hope we’ll meet in future -> I owe you a party 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *


Turn a DIV into a Clickable Link

Secure way of storing password with PHP

Secure way of storing password with PHP