# Flipkart Scraper (`scrapedo/flipkart-scraper`) Actor

Scrape Flipkart search results and product pages: price, MRP, discount, rating, stock, key specs, plus seller, full specs and delivery date. Reads the page's JSON state, works on every category. Free trial without a token.

- **URL**: https://apify.com/scrapedo/flipkart-scraper.md
- **Developed by:** [scrapedo](https://apify.com/scrapedo) (community)
- **Stats:** 2 total users, 1 monthly users, 77.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Flipkart Scraper

Scrape [Flipkart.com](https://www.flipkart.com) search results and product pages: title, selling price, MRP, discount, rating and review counts, stock state, F-Assured and sponsored flags, and key specs. Turn on **Open each product page** to also get the seller, the full specification table, the star breakdown, aspect ratings, COD and return policy, and the delivery date.

**Free to try:** run it without any setup and get up to 50 products per run. Add your free Scrape.do API token to remove the limit.

### Why most Flipkart scrapers break

Flipkart rarely blocks a request. It breaks scrapers quietly:

- **Non-browser requests get an empty data object.** Default HTTP clients receive a page whose embedded JSON state is `{}`, so only the HTML is left.
- **CSS class names are hashed and change with each build.** The price and title selectors in most tutorials match nothing today.
- **Search results come in two layouts**, 24 list cards (laptops, phones) or 40 grid cards (shoes, fashion), each with its own classes.

This actor fetches every page through the [Scrape.do](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=flipkart-scraper) web scraping API with an Indian exit IP and reads the JSON state Flipkart embeds in the page instead of the HTML. One parser covers both layouts and survives class name changes. Sponsored placements that repeat the same product on later pages are removed.

### What data you get

| Field | Description |
|---|---|
| `productId`, `listingId` | Flipkart product id and the listing (seller offer) id |
| `title`, `subtitle` | Product name and variant line |
| `price`, `mrp`, `discountPct` | Selling price, maximum retail price (MRP) and Flipkart's discount, in rupees |
| `rating`, `ratingsCount`, `reviewsCount` | Average rating and counts |
| `availability` | `IN_STOCK`, `PRE_ORDER`, `NO_AVAILABLE_LISTING` and so on |
| `fAssured`, `sponsored` | F-Assured listing; sponsored placement |
| `keySpecs` | The short spec list shown on the search card |
| `url` | Product URL with `pid` and `lid`, so the page shows the same offer as the card |
| `searchQuery`, `scrapedAt` | What found the product, and when |

With **Open each product page** on, each item also has `brand`, `seller`, `sellerId`, `deliveryBy`, `starBreakdown` (5 to 1 stars), `aspectRatings` (for example Design, Battery), `cod`, `returnPolicy`, `offerCount` and `specs` (every row of the specification table, typically 25 to 70).

### How to use it

1. **Search terms:** add what you would type into Flipkart's search box, for example `laptop`.
2. **Price band (optional):** set a minimum and maximum price. Flipkart stops serving products after about 25 result pages, so split busy searches into bands; if a band still reaches page 25, halve it.
3. **URLs:** paste search result URLs or product URLs copied from Flipkart.
4. **Product pages:** turn on **Open each product page** for the seller, full specs and delivery date.

#### Input example

```json
{
    "searchQueries": ["laptop"],
    "minPrice": 50000,
    "maxPrice": 70000,
    "includeDetails": true,
    "maxItems": 200,
    "scrapeDoToken": "YOUR_SCRAPEDO_TOKEN"
}
```

#### Output example

Illustrative values (fictional product):

```json
{
    "productId": "COMEXAMPLE0001",
    "listingId": "LSTCOMEXAMPLE0001AAA",
    "title": "Nimbus Book 14 Example Core 7 - (16 GB/512 GB SSD)",
    "subtitle": "Grey, 1.6 kg",
    "price": 79990,
    "mrp": 123490,
    "discountPct": 35,
    "rating": 4.4,
    "ratingsCount": 6128,
    "reviewsCount": 557,
    "availability": "IN_STOCK",
    "fAssured": true,
    "sponsored": true,
    "keySpecs": ["Example Core 7 Processor", "16 GB RAM", "512 GB SSD"],
    "url": "https://www.flipkart.com/example-comexample0001/p/itmexample0001?pid=COMEXAMPLE0001&lid=LSTCOMEXAMPLE0001AAA",
    "seller": "ExampleRetail",
    "deliveryBy": "Monday, 2 Nov",
    "starBreakdown": { "5": 4093, "4": 1327, "3": 277, "2": 87, "1": 344 },
    "specs": { "Processor Name": "Core 7", "RAM": "16 GB", "SSD Capacity": "512 GB" },
    "searchQuery": "laptop",
    "scrapedAt": "2026-10-26T09:00:00.000Z"
}
```

Download the results as JSON, CSV, Excel or HTML from the run's **Output** tab, or pull them through the Apify API.

### Pricing and your Scrape.do token

There is no per-result fee for this actor; Apify only bills its normal platform usage. Pages are fetched through the Scrape.do web scraping API:

1. **Free trial, no token** – leave the **Scrape.do API token** field empty and you get up to 50 products per run.
2. **Your own Scrape.do token** – no product limit. Each Flipkart page costs 1 Scrape.do credit: one search page holds 24 or 40 products, and **Open each product page** adds one credit per product. [Create a free Scrape.do account](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=flipkart-scraper) to get a token; the free plan includes 1,000 credits a month.

### Tips

- **Product page prices can differ from the search card.** Several sellers can offer the same product; the `lid` in the URL decides which offer the page shows. The actor keeps it, so prices match the card.
- **Delivery dates** are Flipkart's estimate for its default location, not for a specific PIN code.
- **Prefer Python?** The same logic, plus a reviews scraper, is available as an open-source package: `pip install flipkart-scraping` ([GitHub](https://github.com/bugrahansss/flipkart-scraping)). More guides are on the [Scrape.do blog](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=flipkart-scraper).

### FAQ

**Does Flipkart have an API for this?** Flipkart's affiliate API serves product feeds to registered affiliates, and its seller APIs only cover a seller's own catalogue. For competitor prices, sellers, full specs and search positions, the practical source is the data the site already ships with every page.

**Is scraping Flipkart legal?** This actor collects publicly visible product data. You are responsible for following Flipkart's terms and the laws that apply to you. This is not legal advice.

**Something broke or a field is missing?** Open an issue in the Issues tab and we will look at it.

# Actor input Schema

## `searchQueries` (type: `array`):

What you would type into Flipkart's search box, for example "laptop" or "running shoes". Every unique product on the result pages is saved.

## `startUrls` (type: `array`):

Search result URLs (flipkart.com/search?q=...) or product URLs (.../p/itm...) copied from Flipkart.

## `minPrice` (type: `integer`):

Optional lower end of a price band for the search terms. Splitting a busy search into price bands gets past Flipkart's limit of about 25 result pages.

## `maxPrice` (type: `integer`):

Optional upper end of a price band for the search terms.

## `includeDetails` (type: `boolean`):

Also read each product page for the seller, full specification table, star breakdown, aspect ratings, COD, return policy and delivery date. Costs one extra request per product.

## `maxItems` (type: `integer`):

Stop after this many products. 0 means no limit (own token only). Free trial runs return up to 50 products.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to read for each search term or search URL. Flipkart stops serving products around page 25.

## `maxConcurrency` (type: `integer`):

Product pages fetched at the same time when you use your own token. Free trial runs use 3.

## `scrapeDoToken` (type: `string`):

Optional. Leave empty for the free trial (up to 50 products per run). Add your own Scrape.do token to remove the limit: https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=flipkart-scraper

## Actor input object example

```json
{
  "searchQueries": [
    "laptop"
  ],
  "includeDetails": false,
  "maxItems": 3,
  "maxPagesPerSearch": 5,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `products` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "laptop"
    ],
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapedo/flipkart-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["laptop"],
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapedo/flipkart-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "laptop"
  ],
  "maxItems": 3
}' |
apify call scrapedo/flipkart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapedo/flipkart-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/F2Y33RYQU0Uz9ENy3/builds/kJJnZLqacfH3OUdU9/openapi.json
