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

Scrapes Flipkart product listings — price, discount, rating, reviews and specifications — from India's largest online marketplace.

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

## Pricing

from $2.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?

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

Collect product listings from Flipkart — India's largest online marketplace —
with prices, discounts, ratings, reviews and key specifications.

### How to use it

1. Go to Flipkart and search, or open a category you care about.
2. Narrow it down with the filters on the page — brand, price range, rating,
   discount, availability, or a sort order.
3. Copy the address from your browser's address bar.
4. Paste it into **Flipkart search links** and run the Actor.

Every filter you set is respected, because the Actor follows the link you give
it. Paste several links at once, one per line, and they all land in the same
results table.

### What you get

For every product:

- Full product name, the brand, and the variant line — size, colour, weight
- Current price in rupees, the price before discount, and the discount as both
  a percentage and an amount
- Star rating, the number of ratings, and the number of written reviews —
  Flipkart counts these separately
- Category and the key specifications the listing highlights
- Whether it is in stock
- Product photos and a direct link to the product page

### What you can do with it

- Track competitor prices and how deeply they discount
- Watch a category for new arrivals or price drops
- Compare the same product across sellers and variants
- Find the best-rated products in a category and what they charge
- Build a price history by running the same search on a schedule

### Good to know

Flipkart shows about 24 products per page. Set **Max results per search** to
control how far each link is followed.

Ratings and reviews are reported separately: many more shoppers leave a star
rating than write a review, so the two numbers differ a lot.

Products with a hidden or unavailable price come through with an empty price
rather than a zero.

Flipkart describes fashion listings more briefly than electronics: shoes and
clothing carry a brand line but no star rating, category or specification list,
because the site does not put those on the card. Electronics carry all of them.

# Actor input Schema

## `search_urls` (type: `array`):

Search or category links, one per line. Search on Flipkart with whatever filters you want — brand, price range, rating, discount, sort order — then copy the address bar. Every filter in the link is honoured.

## `max_results_per_search` (type: `integer`):

Stops after this many products for each link. Flipkart shows about 24 per page.

## `proxy_country` (type: `string`):

A 2-letter country code to browse from. India suits Flipkart best.

## Actor input object example

```json
{
  "search_urls": [
    "https://www.flipkart.com/search?q=laptop",
    "https://www.flipkart.com/search?q=running+shoes&sort=price_asc"
  ],
  "max_results_per_search": 200,
  "proxy_country": "IN"
}
```

# Actor output Schema

## `dataset` (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 = {
    "search_urls": [
        "https://www.flipkart.com/search?q=laptop",
        "https://www.flipkart.com/search?q=running+shoes&sort=price_asc"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mina_safwat/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 = { "search_urls": [
        "https://www.flipkart.com/search?q=laptop",
        "https://www.flipkart.com/search?q=running+shoes&sort=price_asc",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/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 '{
  "search_urls": [
    "https://www.flipkart.com/search?q=laptop",
    "https://www.flipkart.com/search?q=running+shoes&sort=price_asc"
  ]
}' |
apify call mina_safwat/flipkart-scraper --silent --output-dataset

```

## MCP server setup

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