# Big Basket Data Extractor (`smacient/big-basket-data-extractor`) Actor

Search or browse BigBasket products by keyword or category, with real prices, stock, discounts, and ratings. Get results from any Indian city, or several cities at once, in a single run. Useful for price tracking, catalog research, and comparing deals across regions.

- **URL**: https://apify.com/smacient/big-basket-data-extractor.md
- **Developed by:** [Smacient](https://apify.com/smacient) (community)
- **Categories:** E-commerce, AI, Automation
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 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

## BigBasket Data Extractor

Search BigBasket products across one or many Indian cities in a single run. No BigBasket account needed, and no proxy setup on your end since city switching works on its own.

### Why this Actor

This Actor resolves any city or pincode you type, directly, within the same run. Search "milk" across Mumbai, Chennai, and Delhi at once and get a single dataset with a location column, ready to compare.

### What you get

- Product title, brand, and pack size
- Current price, MRP, and discount percentage
- Stock status
- Category
- Rating and review count
- Product image and URL

### Quick start

A small first run:

```json
{
  "searchTerms": ["milk"],
  "locations": ["Mumbai"],
  "maxResultsPerQuery": 5
}
```

### Comparing cities in one run

```json
{
  "searchTerms": ["milk"],
  "locations": ["Mumbai", "Chennai", "Delhi"],
  "maxResultsPerQuery": 20
}
```

Every row in the output is tagged with the city it came from, so comparing regions does not need separate runs or separate settings.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| searchTerms | array | \["milk"] | One or more keywords, e.g. "milk", "basmati rice". |
| brands | array | \[] | Optional. Only keep results from these brands. |
| locations | array | \[] | Optional. City names or pincodes. Add more than one to compare cities in a single run. Leave empty to use the default location. |
| maxResultsPerQuery | integer | 5 | Maximum products returned per search term, per location. |
| includeOutOfStock | boolean | true | Turn off to only return products currently available for delivery. |

### Output

A saved row looks like this:

```json
{
  "title": "Greek Yogurt",
  "brand": "Milky Mist",
  "price": 53,
  "mrp": 55,
  "discountPercent": 4,
  "currency": "INR",
  "inStock": true,
  "packSize": "100 g",
  "category": "Yogurt & Shrikhand",
  "rating": 3.9,
  "ratingCount": 1846,
  "location": "Mumbai, Maharashtra, India",
  "productUrl": "https://www.bigbasket.com/pd/40281258/milky-mist-greek-yogurt-natural-high-protein-no-added-sugar-100-g/",
  "imageUrl": "https://www.bbassets.com/media/uploads/p/l/40281258_3-milky-mist-greek-yogurt-natural-high-protein-no-added-sugar.jpg",
  "productId": "40281258",
  "scrapedAt": "2026-08-21T04:11:45.000Z"
}
```

Some fields are left out of a row entirely when BigBasket does not provide them for that product, rather than shown as empty.

### Common uses

- Compare grocery prices and discounts across brands and cities
- Track price and stock changes for the same products over time
- Feed current pricing into internal catalogs or dashboards

### Scheduling

To track prices or stock over time, save a working input as a Task, then attach a Schedule to it. Start with a daily schedule and a small result count, and increase only once the output looks right.

### Pricing

This Actor is priced per product saved to your dataset, so you only pay for results you actually receive. New accounts start with a set number of free results before any charge applies, no card required to try it.

### Responsible use

This Actor reads public product listings only. It does not require a BigBasket account and does not collect personal, payment, or order information. You are responsible for using the data in line with BigBasket's terms and the law in your jurisdiction.

### Limits

This Actor is not an official BigBasket product and is not affiliated with or endorsed by BigBasket. Some products may not expose every field, such as rating or discount, and those fields are left out of the row rather than shown as empty.

# Actor input Schema

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

One or more keywords, e.g. 'milk', 'basmati rice'.

## `brands` (type: `array`):

Optional. Only keep results from these brands. Leave empty to keep all brands.

## `locations` (type: `array`):

Optional. Type one or more city names (e.g. 'Mumbai') or pincodes (e.g. '400008'). Add more than one to get results from multiple cities in the same run. Leave empty to use the default location.

## `maxResultsPerQuery` (type: `integer`):

Caps how many products come back for each search term, for each location. The default is kept small for a quick first look. Raise it for a full run.

## `includeOutOfStock` (type: `boolean`):

Turn off to only return products currently available for delivery.

## Actor input object example

```json
{
  "searchTerms": [
    "milk"
  ],
  "brands": [],
  "locations": [],
  "maxResultsPerQuery": 5,
  "includeOutOfStock": 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": [
        "milk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("smacient/big-basket-data-extractor").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": ["milk"] }

# Run the Actor and wait for it to finish
run = client.actor("smacient/big-basket-data-extractor").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": [
    "milk"
  ]
}' |
apify call smacient/big-basket-data-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,smacient/big-basket-data-extractor"
        }
    }
}

```

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/W6CFnmedMcCXZnrqN/builds/JjPAvbJQmzvDcV8ph/openapi.json
