# Flipkart Product Scraper & Price Monitor (search, specs, stock) (`datahamster/flipkart-products`) Actor

Flipkart scraper for search results and product pages: title, brand, price, MRP, discount, rating, review counts, stock, category, specs and seller in one flat row. Also a Flipkart price tracker: monitor mode alerts on price and stock changes. Empty runs charge nothing.

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

## Pricing

from $1.50 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 & Price Monitor

Search Flipkart by keyword or feed it product URLs and get one flat row per product: price, MRP, discount, rating, rating and review counts, stock, image, category, and — when you ask for details — the full specification table, highlights, seller and delivery date. No login, no cookies, India exit by default so prices are the real INR prices Flipkart shows a shopper in India.

### What you get

One row per product (`id` = Flipkart product id, so the same item from a search and from a product URL is a single row):

`id`, `productId`, `url`, `title`, `brand`, `price`, `mrp`, `currency`, `discountPercent`, `rating`, `ratingCount`, `reviewCount`, `inStock`, `imageUrl`, `category`, `highlights`, `specs`, `seller`, `sellerRating`, `delivery`, `query`, `rank`, `page`, `source`, `scrapedAt`.

### Example output

Real rows from the example dataset.

Search row (`searches: ["headphones"]`, rank 1):

| Field | Value |
|---|---|
| `productId` | `ACCESZCHHGX9YFBN` |
| `title` | `Skullcandy Crusher Bluetooth Headset with Mic` |
| `brand` | `Skullcandy` |
| `price` / `mrp` / `discountPercent` | `6999` / `39999` / `82` |
| `rating` / `ratingCount` / `reviewCount` | `4.4` / `1098` / `209` |
| `inStock` | `true` |
| `category` | `Audio & Video > Headset > Headphones` |
| `url` | `https://www.flipkart.com/skullcandy-crusher-bluetooth-headset-mic/p/itmcb06279c54724?pid=ACCESZCHHGX9YFBN` |

The same product with `fetchDetails: true` adds:

| Field | Value |
|---|---|
| `seller` / `sellerRating` | `SuperComNet` / `4.1` |
| `delivery` | `Delivery by Wednesday, 16 Sep` |
| `highlights` | `["Up to 40 hrs of Battery Life", "With Deep Bass", "Bluetooth Connectivity"]` |
| `specs` | `{"Brand": "Skullcandy", "Model ID": "SCCRW", "Headphone Type": "On the Ear", "Color": "Black", ...}` (22 keys on this product) |
| `category` | `Audio & Video > Headset > Headphones > Wireless Headphones > Skullcandy Wireless Headphones` |

### Use cases

- **Price tracking.** Run a saved task in `monitor` mode on a list of product URLs or a keyword; you get rows only when price, stock or rating changed, plus a webhook or Telegram message.
- **Competitor and catalogue research.** Pull 120+ products for a keyword with MRP, discount and rating counts and see where a category really prices.
- **Assortment and spec sheets.** `fetchDetails` gives the full specification table as a dictionary, ready for a spreadsheet.

### Input

| Field | Meaning | Default |
|---|---|---|
| `searches` | Keywords or full Flipkart search URLs | `["headphones"]` |
| `productUrls` | Product URLs or bare product ids | empty |
| `maxPagesPerSearch` | Result pages per keyword, 40 products each (1-50) | `3` |
| `fetchDetails` | Open each product page for specs, highlights, seller, delivery | `false` |
| `minPrice`, `maxPrice` | Keep only products inside this INR range | empty |
| `strictQueryMatch` | Skip result pages Flipkart fills with unrelated products | `true` |
| `maxItems` | Stop after this many rows | `100` |
| `mode` | `scrape`, or `monitor` for only new/changed rows | `scrape` |
| `monitorKey`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor-mode state key and alert targets | empty |

### Pricing

| Event | Price |
|---|---|
| result | $0.0015 per product ($1.50 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0015 per new/changed product |

You are charged only for rows actually pushed. A run that finds nothing charges no result events.

### Why this actor

- Half the price per product of the other Flipkart scrapers on the Store.
- Search rows are already rich: price, MRP, discount, rating, both counts, stock and image come from the search page itself, so a 120-product sweep is 3 requests, not 123.
- Built-in monitor mode with webhook and Telegram alerts — price, stock and rating are the change fingerprint.
- The exit is pinned to India, so prices are INR and availability is the one Indian shoppers see.

### Limits (read these)

- **Flipkart never returns an empty search page.** A keyword that matches nothing gets a generic catalogue page of unrelated products. With `strictQueryMatch` on (the default) the actor recognises such a page — no breadcrumb category, and none of the first five titles containing a word of your keyword — skips it, stops paging that keyword and charges you nothing. A run like that ends with zero rows and `no_matches` in the run summary. Broad keywords whose products really do match (`birthday gift`) are kept.
- Flipkart repeats a card or two inside a page and between pages; rows are de-duplicated by product id, so a 3-page sweep usually yields a little under 120 rows. `rank` is the position Flipkart gave the card on the page, so it skips the numbers of the removed duplicates and is not a dense 1..N counter.
- `seller`, `sellerRating`, `delivery`, `specs` and `highlights` exist only on rows fetched with `fetchDetails` or from `productUrls`.
- `delivery` is the date Flipkart quotes for a generic Indian address, without a pincode; the exact date for your pincode can differ.
- Prices exclude bank/card offers and exchange discounts. `price` is the selling price, `mrp` the struck-through maximum retail price.
- No buyer reviews, no reviewer names, no seller contact details — only aggregate `rating`, `ratingCount` and `reviewCount`.

### FAQ

**Do I need a Flipkart account or cookies?** No. Every request is made as a logged-out visitor.

**Why are some prices different from what I see?** Flipkart personalises by location and shows bank-offer prices on the page; this actor returns the plain selling price from an Indian exit, without offers.

**My keyword returned nothing at all — is the actor broken?** No. Flipkart answers an unmatchable keyword with a page of unrelated products instead of an empty page; the actor drops that page rather than billing you for 40 irrelevant rows. Check your spelling, or set `strictQueryMatch: false` to see exactly what Flipkart returned.

**What happens when a product URL is dead?** Flipkart answers 200 with an empty shell. The row is skipped, not charged, and the run summary says why.

**How do I track prices?** Save the actor as a task with `mode: monitor` and your product URLs or keyword, schedule it, and set `webhookUrl` or the Telegram fields. Rows come back only when `price`, `inStock` or `rating` changed.

### Changelog

- 0.1: initial release — keyword search with 40 products per page, product-page details (specs, highlights, seller, delivery), price range filter, unrelated-result pages skipped and unbilled, monitor mode.

***

If this actor saved you time, a short review on its Store page genuinely helps other people find it. Found a bug or need a field that is missing? Open a ticket on the **Issues** tab.

# Actor input Schema

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

Stop after this many results (you are charged only for pushed items)

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

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorKey` (type: `string`):

Optional state key when not running as a saved task

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## `searches` (type: `array`):

Keywords to search Flipkart for, one per line, e.g. "headphones", "running shoes", "samsung 5g phone". A full search URL also works, e.g. "https://www.flipkart.com/search?q=air+purifier". One page returns up to 40 products.

## `productUrls` (type: `array`):

Known Flipkart product URLs or bare product ids (pid) to scrape directly, e.g. "https://www.flipkart.com/skullcandy-crusher-bluetooth-headset-mic/p/itmcb06279c54724?pid=ACCESZCHHGX9YFBN" or "ACCESZCHHGX9YFBN". These always come back with specs, highlights, seller and delivery date.

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

How many result pages to read per keyword, e.g. 3 = up to 120 products. Range 1-50.

## `fetchDetails` (type: `boolean`):

false = search rows only; they already carry price, MRP, discount, rating, counts, stock and image. true = open every product page as well for the specification table, highlights, seller name, seller rating and delivery date (one extra request per product, so runs take much longer). Example: false.

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

Skip products cheaper than this, e.g. 1000. Leave empty for no lower bound.

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

Skip products more expensive than this, e.g. 5000. Leave empty for no upper bound.

## `strictQueryMatch` (type: `boolean`):

Flipkart never returns an empty search page: a keyword it cannot match is answered with a page of unrelated products. true = skip search pages Flipkart fills with unrelated products when the keyword has no matches, so you are not charged for them. false = keep whatever Flipkart returns. Example: true.

## Actor input object example

```json
{
  "maxItems": 100,
  "mode": "scrape",
  "searches": [
    "headphones"
  ],
  "productUrls": [],
  "maxPagesPerSearch": 3,
  "fetchDetails": false,
  "strictQueryMatch": true
}
```

# Actor output Schema

## `results` (type: `string`):

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN\_SUMMARY record

# 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 = {
    "searches": [
        "headphones"
    ],
    "maxPagesPerSearch": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/flipkart-products").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 = {
    "searches": ["headphones"],
    "maxPagesPerSearch": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/flipkart-products").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 '{
  "searches": [
    "headphones"
  ],
  "maxPagesPerSearch": 3
}' |
apify call datahamster/flipkart-products --silent --output-dataset

```

## MCP server setup

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

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/bvnMoNt6Ok8kzV9c9/builds/xOMjozMJulcHunTLC/openapi.json
