# BigBasket Catalogue by Subcategory & Pincode (`ikmal_suzali_atr/bigbasket-catalog`) Actor

Every product on a BigBasket subcategory listing per pincode: id, name, brand, pack size, price, MRP, discount, rating, stock, ETA, sponsored (Osmos) flag and service area. Browserless HTTP, sessions re-minted every 6 calls. Dual-mode: the same code runs as an ATR BullMQ worker.

- **URL**: https://apify.com/ikmal\_suzali\_atr/bigbasket-catalog.md
- **Developed by:** [AtTheRate AI](https://apify.com/ikmal_suzali_atr) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## BigBasket Catalogue by Subcategory & Pincode

Pulls every product on a BigBasket subcategory listing, priced and stocked for the Indian pincode you give, with sponsored slots identified. Rows carry pack size, unit, rating, delivery estimate and base price per unit, which is what makes like-for-like grocery price comparison across Indian cities possible.

### What you get

- Shelf order in `page` and `position`, price economics in `price`, `original_price` and `discount_percent`, and exact price-per-unit from `base_price` and `base_unit`.
- A real sponsored flag: `is_sponsored`, with `ad_id`, `ad_position` and `ad_type` for the paid slots.
- Pack detail in `pack_size` and `unit`; social proof in `rating` and `review_count`.
- Delivery and identity: `eta`, `ean`, `id`, `name`, `brand`, `image_url`, `product_url` and the `tlc_slug`, `mlc_slug`, `llc_slug` path.
- Location honesty: every row carries its `pincode` and `store_id`, and a pincode with no usable 10-minute store is skipped with a warning, never answered with another area's data.

### Input

Both `categories` and `pincodes` are required.

```json
{
  "categories": ["chips-corn-snacks"],
  "pincodes": ["400001", "560038"],
  "maxPages": 0,
  "expandSubcategories": false,
  "concurrency": 2,
  "delayMs": 700,
  "callsPerSession": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "IN"
  }
}
```

- `categories`: slugs such as `chips-corn-snacks`, or category URLs. Top-level slugs work too.
- `pincodes`: 6-digit Indian pincodes, for example `400001`.
- `maxPages`: pages per subcategory, 0 means all, at 20 a page. `expandSubcategories` also crawls each subcategory's children.
- `proxyConfiguration`: residential IN is the default.

### Output

One row per product, per subcategory, per pincode. The run above returned 87 rows over 4 pages for two pincodes, 8 of them sponsored.

```json
{
  "pincode": "400001",
  "store_id": "10221",
  "category": "chips-corn-snacks",
  "page": 1,
  "position": 1,
  "id": "40269332",
  "name": "Classic Salted Potato Chips",
  "brand": "Lay's",
  "pack_size": "52 g",
  "price": 20,
  "discount_percent": null,
  "base_price": 38.46,
  "rating": 4.4,
  "in_stock": true,
  "is_sponsored": false,
  "eta": "10 mins",
  "product_url": "https://www.bigbasket.com/pd/40269332/",
  "fetched_at": "2026-09-12T12:02:51.640Z"
}
```

`seller` is always null: BigBasket is a first-party retailer and exposes no seller. `original_price` and `discount_percent` are null on undiscounted items, `ad_id`, `ad_position` and `ad_type` on organic rows.

### Use cases

- Cross-retailer price comparison from `base_price` and `base_unit`, which normalise pack-size differences away.
- Daily discount tracking per city, and ad-slot share of voice from `is_sponsored` per `brand`, with `ad_position` for slot quality.
- Assortment gaps from the `id` and `ean` sets, and delivery mapping from `eta` and `store_id`, across a wide pincode list.

### Notes and limits

- BigBasket rate-limits each session after roughly 7 calls, so it is re-minted every 6. Leave `callsPerSession` alone unless the site has changed; a run across two pincodes typically mints three sessions.
- 20 products per page. Some served points resolve to a store that answers nothing at all, even for a search as common as milk. That is probed at session start and the location is reported unserved, naming the store, with a hint to try a nearby pincode.
- A slug BigBasket does not recognise yields a landing page, reported with a warning and zero rows.
- The serviceability check sometimes redirects on a valid pincode. That is logged and the run continues rather than failing.
- Sponsored placements come from BigBasket's own ad stack, so `is_sponsored` is a billed slot, not a guess.

### FAQ

**Do I need a proxy?** A residential proxy in India is recommended and is the default. BigBasket answers 403 to egress it dislikes, and the run then stops with that message.

**How many results can I get?** Whole subcategories, 20 per page with no cap when `maxPages` is 0, across any number of pincodes.

**Does it need login or an API key?** No BigBasket account or key of your own is required.

**Why does a valid pincode sometimes return nothing?** The 10-minute store covering that point may carry no searchable catalogue. Rather than fall back to another store and mislabel the data, the location is reported unserved and the store named, so you can retry nearby.

# Actor input Schema

## `categories` (type: `array`):

BigBasket category slugs ("fresh-vegetables", "chips-corn-snacks") or category URLs (https://www.bigbasket.com/pc/fruits-vegetables/fresh-vegetables/). Any level works (top-level "fruits-vegetables" too). Enable "Include subcategories" to crawl children from BigBasket's category tree.

## `pincodes` (type: `array`):

Indian 6-digit pincodes. Each is resolved to coordinates and the `_bb_lat_long` store cookie is set from them (bbnow 10-minute store must cover the point; a store that answers nothing for "milk" is reported as unserved — try a nearby pincode); unresolvable or unserved pincodes are skipped with a warning. Every row carries its pincode.

## `maxPages` (type: `integer`):

0 = all (20 products per page).

## `expandSubcategories` (type: `boolean`):

Also crawl each subcategory's children from the category tree.

## `concurrency` (type: `integer`):

1–4.

## `delayMs` (type: `integer`):

Pause between page fetches.

## `callsPerSession` (type: `integer`):

Re-mint the session after this many page fetches.

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

On the Apify platform this decides egress; a residential proxy in India is recommended. On our own servers it is ignored and our residential proxy is used.

## Actor input object example

```json
{
  "categories": [
    "chips-corn-snacks"
  ],
  "pincodes": [
    "400001"
  ],
  "maxPages": 0,
  "expandSubcategories": false,
  "concurrency": 2,
  "delayMs": 700,
  "callsPerSession": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IN"
  }
}
```

# Actor output Schema

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

One row per product.

## `summary` (type: `string`):

Counts for the run: what was requested, captured, skipped and failed.

# 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 = {
    "categories": [
        "chips-corn-snacks"
    ],
    "pincodes": [
        "400001"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ikmal_suzali_atr/bigbasket-catalog").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 = {
    "categories": ["chips-corn-snacks"],
    "pincodes": ["400001"],
}

# Run the Actor and wait for it to finish
run = client.actor("ikmal_suzali_atr/bigbasket-catalog").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 '{
  "categories": [
    "chips-corn-snacks"
  ],
  "pincodes": [
    "400001"
  ]
}' |
apify call ikmal_suzali_atr/bigbasket-catalog --silent --output-dataset

```

## MCP server setup

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

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/cw8SGNgDRmh8NXhHo/builds/tSpfugDqXpW0px8Nk/openapi.json
