Parsing Flipkart using Java

Hi webscrappers,
Herewith I have given the example working java code to parse flipkart and take the price of the given book (isbn).

I have used Jsoup library. you can download from here,
Jar Download:
Jsoup Jar

Java Program:

package in.javadomain;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class FlipkartBookPrice {
	public static void main(String[] args) throws IOException {
		String bookIsbn = "9780070264984";
		String fkPrice = getFlipkartPrice(bookIsbn);
		System.out.println("Flipkart Price of " + bookIsbn + ": \n" + fkPrice);

	private static String getFlipkartPrice(String bookIsbnNo)
			throws IOException {
		String baseUrl = "" + bookIsbnNo
				+ "";
		String fkPrice = null;
		Document doc = Jsoup.connect(baseUrl).timeout(0).get();
		fkPrice ="").select("span.pprice")
		return fkPrice;

Flipkart Price of 9780070264984:
Rs. 436

776 total views, 1 views today


  • waqar

    hi ,
    can you plz help me , i want to call flipkart api to list adds on my website ho to do it with flipkart affiliation,
    i have created flipkart affiliation account but i dont now how to call it from java spring.

    • Flipkart affiliate is to display their product details in iframe or using scripts. Please be clear on doubts/clarifications to help you better.

Leave a Reply

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