# Flipkart Product Scraper (`datablow/flipkart-scraper`) Actor

Scrape Flipkart products, prices, MRP, discounts, images, technical specifications, ratings, reviews, and seller details

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

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Product Scraper (Apify Actor)

A high-performance, production-ready Apify Actor for scraping product data from [Flipkart](https://www.flipkart.com). Built using the official **Camoufox + Playwright + TypeScript (Crawlee)** template.

Camoufox is an anti-detect C++ fork of Firefox engineered to look identical to real human browsers at the engine level, seamlessly bypassing Akamai Bot Manager and Cloudflare anti-scraping defenses without triggering captchas or blocks.

***

### Features

- 🔍 **Flexible Inputs**: Search by keywords (e.g., `["smart watch", "iphone 15", "running shoes"]`) or pass direct category, search, or product detail URLs.
- ⚡ **Dual Scraping Modes**:
  - **Deep Detail Mode (`scrapeProductDetails: true`)**: Navigates into each product page to extract complete technical specifications, full high-res image galleries, seller info, ratings breakdown, and bullet-point highlights.
  - **Fast Listing Mode (`scrapeProductDetails: false`)**: Extracts items directly from search and category listing cards for ultra-fast scraping with minimal compute unit consumption.
- 🖼️ **High-Resolution Images**: Automatically detects and upgrades Flipkart thumbnail CDN URLs (`/image/128/128/`) to full high-resolution image URLs (`/image/1664/1664/`).
- 🏷️ **Comprehensive Pricing**: Extracts current discounted price, original MRP, discount percentage, and currency (`INR`).
- 📊 **Structured Technical Specifications**: Converts Flipkart's complex specification tables into organized nested categories (General, Display, Platform, Memory, Camera, Battery, Warranty, etc.).
- ⭐ **Ratings & Reviews**: Captures overall rating score, total ratings count, and total reviews count.
- 🏪 **Seller Insights**: Extracts seller name and seller performance rating score.
- 🔗 **Clean Canonical URLs**: Removes dynamic tracking and session tokens while preserving canonical product IDs (`pid`).
- 📄 **Automatic Pagination**: Seamlessly navigates search result pages up to user-defined limits.

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchTerms` | `Array<string>` | `["wireless earbuds"]` | Keywords to search on Flipkart. |
| `startUrls` | `Array<object>` | `[]` | Direct Flipkart URLs (Search, Category, or Product Detail pages). |
| `maxItems` | `Integer` | `20` | Maximum number of products to scrape into the dataset. |
| `maxPagesPerQuery` | `Integer` | `2` | Maximum pagination depth per search term. |
| `scrapeProductDetails` | `Boolean` | `true` | Extract full specs, high-res images & seller info (`true`) or fast summary from cards (`false`). |
| `proxyConfiguration` | `Object` | *Apify Proxy* | Proxy configuration. Residential proxy is recommended for high-volume runs. |

#### Example Input

```json
{
  "searchTerms": [
    "gaming laptop",
    "noise cancelling headphones"
  ],
  "maxItems": 50,
  "maxPagesPerQuery": 3,
  "scrapeProductDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### Output Dataset Schema

Each product record pushed to the Apify dataset contains:

```json
{
  "id": "MOBGTAGPTB3VS24W",
  "title": "Apple iPhone 15 (Black, 128 GB)",
  "brand": "Apple",
  "currentPrice": 65999,
  "originalPrice": 79900,
  "discountPercent": "17% off",
  "currency": "INR",
  "rating": 4.6,
  "ratingCount": 18234,
  "reviewCount": 1420,
  "inStock": true,
  "url": "https://www.flipkart.com/apple-iphone-15-black-128-gb/p/itm6ac6485515ae4?pid=MOBGTAGPTB3VS24W",
  "mainImage": "https://rukminim2.flixcart.com/image/1664/1664/xif0q/mobile/k/l/l/-original-imagtc5fz9spysyk.jpeg",
  "images": [
    "https://rukminim2.flixcart.com/image/1664/1664/xif0q/mobile/k/l/l/-original-imagtc5fz9spysyk.jpeg",
    "https://rukminim2.flixcart.com/image/1664/1664/xif0q/mobile/y/p/5/-original-imagtc5fzh362k3h.jpeg",
    "https://rukminim2.flixcart.com/image/1664/1664/xif0q/mobile/8/e/b/-original-imagtc5fcz3ghhfh.jpeg"
  ],
  "highlights": [
    "128 GB ROM",
    "15.49 cm (6.1 inch) Super Retina XDR Display",
    "48MP + 12MP | 12MP Front Camera",
    "A16 Bionic Chip, 6 Core Processor"
  ],
  "description": "Dynamic Island bubbles up alerts and Live Activities — so you don’t miss them while you’re doing something else...",
  "specifications": {
    "General": {
      "In The Box": "Handset, USB-C Charge Cable, Documentation",
      "Model Number": "MTP03HN/A",
      "Model Name": "iPhone 15",
      "Color": "Black",
      "SIM Type": "Dual Sim(Nano + eSIM)"
    },
    "Display Features": {
      "Display Size": "15.49 cm (6.1 inch)",
      "Resolution": "2556 x 1179 Pixels",
      "Resolution Type": "Super Retina XDR Display"
    },
    "Os & Processor Features": {
      "Operating System": "iOS 17",
      "Processor Type": "A16 Bionic Chip, 6 Core Processor"
    }
  },
  "seller": {
    "name": "SuperComNet",
    "rating": 4.5
  },
  "breadcrumbs": [
    "Mobiles & Accessories",
    "Mobiles",
    "Apple Mobiles"
  ],
  "searchQuery": "gaming laptop",
  "scrapedAt": "2026-09-11T14:55:00.000Z"
}
```

***

### Local Development & Testing

1. **Install dependencies**:
   ```bash
   npm install
   ```

2. **Run in development mode**:
   ```bash
   npm run start:dev
   ```

3. **Build TypeScript**:
   ```bash
   npm run build
   ```

4. **Run production build**:
   ```bash
   npm run start:prod
   ```

***

### Deploy to Apify

To deploy this Actor to your Apify account:

```bash
apify login
apify push
```

The Actor will be built in the Apify Cloud using the provided Dockerfile with pre-configured Camoufox stealth browser and ready for scheduled runs, API triggers, and integrations.

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search on Flipkart (e.g., 'iphone 15', 'bluetooth speaker', 'laptop').

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

Direct Flipkart URLs (Search result pages, category pages, or individual product pages).

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

Maximum number of product items to scrape and output into the dataset.

## `maxPagesPerQuery` (type: `integer`):

Maximum number of search result pages to paginate through per search query.

## `scrapeProductDetails` (type: `boolean`):

If enabled, navigates to each product detail page to extract all specifications, full high-res gallery images, seller info, and highlights. If disabled, extracts summary data directly from search listing cards.

## `proxyConfiguration` (type: `object`):

Proxy configuration. Using Apify Residential Proxy is highly recommended to bypass Flipkart bot detection.

## Actor input object example

```json
{
  "searchTerms": [
    "wireless earbuds"
  ],
  "startUrls": [],
  "maxItems": 20,
  "maxPagesPerQuery": 2,
  "scrapeProductDetails": true
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerms": [
        "wireless earbuds"
    ],
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("datablow/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 = {
    "searchTerms": ["wireless earbuds"],
    "startUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("datablow/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 '{
  "searchTerms": [
    "wireless earbuds"
  ],
  "startUrls": []
}' |
apify call datablow/flipkart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datablow/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/eiSzMiTmNs7x2WGWL/builds/1AJg9PUviMDocvZYl/openapi.json
