2

I want to fetch product data from Flipkart for which Flipkart provide Product Feed API. I wanted to know how to use the json or xml provided to fetch data for my site preferably in Django. Please explain explicitly as I have no idea on how to do this.

Here is the link for flipkart API: http://www.flipkart.com/affiliate/apifaq

Pawneet Singh
  • 95
  • 1
  • 5

1 Answers1

3

Hope this helps.

import urllib2

def your_function():
    response = urllib2.urlopen("https://affiliate-api.flipkart.net/affiliate/product/xml?id=XXX")
    json_data = response.read()
    return json_data # use this in any of your views to read json with product details
brianpck
  • 8,084
  • 1
  • 22
  • 33
kartikmaji
  • 946
  • 7
  • 22