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

Scrape Flipkart, India's leading e-commerce platform. Search products, browse categories, or fetch individual product pages. Extracts title, price, discount, ratings, seller, brand, specifications, and availability.

- **URL**: https://apify.com/crawlerbros/flipkart-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Flipkart Scraper

Scrape **Flipkart** — India's largest e-commerce marketplace with 450+ million products. Search products by keyword, browse category pages, or fetch individual product URLs. Extracts title, price, original price, discount percentage, ratings, review counts, brand, key specifications, and availability. No API key or login required.

### What this actor does

- **Three modes:** `search` (keyword search), `byCategory` (browse category URL), `byUrl` (fetch specific product URLs)
- **Filters:** price range (min/max in INR), minimum rating
- **Sort options:** relevance, price low-to-high, price high-to-low, popularity, newest, highest rated
- **Rich pricing data:** sale price, original MRP, discount percentage, currency (INR)
- **Pagination:** automatically pages through results up to your `maxItems` limit
- **Empty fields are omitted** — only populated fields appear in output records

### Output per product

- `productId` — Flipkart product PID identifier
- `itemId` — Flipkart internal item identifier
- `title` — full product title as shown on Flipkart
- `url` — full URL to the product listing
- `brand` — brand name (extracted from title)
- `price` — current sale price in INR
- `originalPrice` — original MRP in INR (when discounted)
- `discountPercent` — discount percentage off original price (when > 0)
- `currency` — always `INR`
- `rating` — average product rating (1.0–5.0)
- `reviewCount` — total number of ratings
- `keySpecs` — array of key product specifications (processor, RAM, storage, etc.)
- `imageUrl` — main product image (400×400, HTTPS)
- `availability` — product availability status
- `seller` — seller name (when available)
- `recordType` — always `product`
- `scrapedAt` — UTC timestamp of when the record was scraped

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `byCategory` / `byUrl` |
| `searchQuery` | string | `laptop` | Keyword search query (mode=search) |
| `categoryUrl` | string | – | Flipkart category URL, e.g. `https://www.flipkart.com/laptops/pr?sid=6bo%2Cb5g` (mode=byCategory) |
| `startUrls` | array | – | List of Flipkart product URLs (mode=byUrl) |
| `sortBy` | string | `relevance` | Sort order: `relevance`, `price_asc`, `price_desc`, `popularity`, `newest`, `rating` |
| `minPrice` | integer | – | Minimum price filter in INR |
| `maxPrice` | integer | – | Maximum price filter in INR |
| `minRating` | number | – | Minimum product rating (1.0–5.0) |
| `maxItems` | integer | `20` | Maximum products to return (1–500) |

#### Example: search for laptops under ₹60,000

```json
{
  "mode": "search",
  "searchQuery": "laptop",
  "maxPrice": 60000,
  "minRating": 4.0,
  "sortBy": "price_asc",
  "maxItems": 50
}
````

#### Example: browse a category

```json
{
  "mode": "byCategory",
  "categoryUrl": "https://www.flipkart.com/laptops/pr?sid=6bo%2Cb5g",
  "sortBy": "popularity",
  "maxItems": 100
}
```

#### Example: fetch specific product URLs

```json
{
  "mode": "byUrl",
  "startUrls": [
    {"url": "https://www.flipkart.com/asus-expertbook-laptop/p/itm0af4b?pid=COMH8Z2Q"},
    {"url": "https://www.flipkart.com/samsung-galaxy-s24/p/itm123?pid=SMSG123"}
  ]
}
```

#### Example: top-rated smartphones under ₹30,000

```json
{
  "mode": "search",
  "searchQuery": "smartphone",
  "maxPrice": 30000,
  "minRating": 4.2,
  "sortBy": "rating",
  "maxItems": 30
}
```

### Use cases

- **Price monitoring** — track product prices across India's largest marketplace
- **Competitive analysis** — compare pricing and ratings across brands on Flipkart
- **Market research** — analyze product specifications, pricing trends, and top sellers
- **Discount hunting** — find the best deals by filtering by discount percentage
- **Product catalog enrichment** — collect specifications and images for product databases
- **E-commerce intelligence** — monitor category trends, new arrivals, and bestsellers

### FAQ

**What is Flipkart?**
Flipkart is India's largest e-commerce marketplace, founded in 2007 and acquired by Walmart in 2018. It serves over 400 million registered customers with 450+ million product listings across categories including electronics, fashion, home goods, grocery, and more.

**What currency are prices in?**
All prices are in Indian Rupees (INR). The `currency` field in every record confirms this.

**Why might some products be missing `originalPrice` or `discountPercent`?**
If a product is not currently on sale (i.e., the sale price equals the original MRP), these fields are omitted. Only products with an active discount show these fields.

**How many results can I get per run?**
Set `maxItems` up to 500. Flipkart shows approximately 5–24 products per page depending on the category; the actor paginates automatically.

**Can I filter products by specific brands?**
Use the `searchQuery` to include brand names (e.g., `"Samsung 4K TV"` or `"Apple iPhone"`). Category URLs from Flipkart may also include brand filter parameters that the actor will preserve.

**Why does the `keySpecs` field have multiple values?**
Flipkart provides 3–5 key specifications per product (processor type, RAM, storage, OS, display size, etc.) as a quick summary. These are stored as an array of strings.

**Does this actor require cookies or login?**
No. This actor scrapes Flipkart's public product listings without any authentication. The `searchQuery` prefill produces results immediately on the free Apify plan.

**Is this actor affiliated with Flipkart?**
No. This is an independent third-party scraper that uses Flipkart's public website. It is not affiliated with, endorsed by, or connected to Flipkart Internet Private Limited or Walmart Inc.

# Actor input Schema

## `mode` (type: `string`):

How to find products on Flipkart.

## `searchQuery` (type: `string`):

Keyword(s) to search on Flipkart. (mode=search)

## `categoryUrl` (type: `string`):

Full Flipkart category or browse URL, e.g. https://www.flipkart.com/laptops/pr?sid=6bo%2Cb5g (mode=byCategory)

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

List of Flipkart product URLs to scrape, e.g. https://www.flipkart.com/product-name/p/itm... (mode=byUrl)

## `sortBy` (type: `string`):

Sort order for search/category results.

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

Minimum price filter in Indian Rupees.

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

Maximum price filter in Indian Rupees.

## `minRating` (type: `number`):

Minimum product rating (1.0–5.0). Leave empty for no filter.

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

Maximum number of products to scrape (1–500).

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "laptop",
  "startUrls": [],
  "sortBy": "relevance",
  "maxItems": 20
}
```

# Actor output Schema

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

Dataset containing all scraped Flipkart product listings.

# 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 = {
    "mode": "search",
    "searchQuery": "laptop",
    "startUrls": [],
    "sortBy": "relevance",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/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 = {
    "mode": "search",
    "searchQuery": "laptop",
    "startUrls": [],
    "sortBy": "relevance",
    "maxItems": 20,
}

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

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

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

```

## CLI example

```bash
echo '{
  "mode": "search",
  "searchQuery": "laptop",
  "startUrls": [],
  "sortBy": "relevance",
  "maxItems": 20
}' |
apify call crawlerbros/flipkart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/flipkart-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Flipkart Scraper",
        "description": "Scrape Flipkart, India's leading e-commerce platform. Search products, browse categories, or fetch individual product pages. Extracts title, price, discount, ratings, seller, brand, specifications, and availability.",
        "version": "1.0",
        "x-build-id": "jOjCjKV5qtyoMmLU7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~flipkart-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-flipkart-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~flipkart-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-flipkart-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~flipkart-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-flipkart-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "byCategory",
                            "byUrl"
                        ],
                        "type": "string",
                        "description": "How to find products on Flipkart.",
                        "default": "search"
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Keyword(s) to search on Flipkart. (mode=search)"
                    },
                    "categoryUrl": {
                        "title": "Category URL",
                        "type": "string",
                        "description": "Full Flipkart category or browse URL, e.g. https://www.flipkart.com/laptops/pr?sid=6bo%2Cb5g (mode=byCategory)"
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of Flipkart product URLs to scrape, e.g. https://www.flipkart.com/product-name/p/itm... (mode=byUrl)",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "relevance",
                            "price_asc",
                            "price_desc",
                            "popularity",
                            "newest",
                            "rating"
                        ],
                        "type": "string",
                        "description": "Sort order for search/category results.",
                        "default": "relevance"
                    },
                    "minPrice": {
                        "title": "Minimum Price (INR)",
                        "minimum": 0,
                        "maximum": 10000000,
                        "type": "integer",
                        "description": "Minimum price filter in Indian Rupees."
                    },
                    "maxPrice": {
                        "title": "Maximum Price (INR)",
                        "minimum": 0,
                        "maximum": 10000000,
                        "type": "integer",
                        "description": "Maximum price filter in Indian Rupees."
                    },
                    "minRating": {
                        "title": "Minimum Rating",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "number",
                        "description": "Minimum product rating (1.0–5.0). Leave empty for no filter."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of products to scrape (1–500).",
                        "default": 20
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
