> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# BigBasket Products API

> Live product data from BigBasket - search, browse a category or a brand, or fetch specific product URLs, for the store serving any Indian pincode.

`POST /v1/data/bigbasket/products/run`

**Pricing:** $0.001 per product ($1.00 per 1,000).

A search query, a category + sub-category, a brand, or product URLs - plus a pincode, city or lat/lon.

## Ways to call it

* **Search**: set `query` (optional: `city`, `pincode`, `lat`, `lon`, `maxResults`)
* **Category**: set `category`, `sub_category` (optional: `city`, `pincode`, `lat`, `lon`, `maxResults`)
* **Brand**: set `brand` (optional: `city`, `pincode`, `lat`, `lon`, `maxResults`)
* **URL**: set `urls` (optional: `city`, `pincode`, `lat`, `lon`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**query** `string`

What to search for (e.g. milk, chocolate).

**category** `string`

Top-level category (e.g. Atta, rice, dal & more).

32 allowed values, for example `Atta, rice, dal & more`, `Baby care`, `Bakery & batters`, `Bath, body & oral care`, `Beauty & cosmetics`, `Biscuits & cookies`, `Cleaners & repellents`, `Dairy`, `Dry fruits & cereals`, `Eggs, meat & fish`. Fetch the full list with `GET /v1/data/bigbasket/products?expand=options`.

**sub\_category** `string`

Sub-category within it (e.g. Aashirvaad).

432 allowed values, for example `Aashirvaad`, `Atta & flours`, `Chakki fresh`, `Daawat`, `Dals & pulses`, `Fortune`, `Millets & more`, `Multigrain`, `Organic atta`, `Organic picks`. Fetch the full list with `GET /v1/data/bigbasket/products?expand=options`.

**brand** `string`

Brand - pick from the list. Returns every product that brand sells at the store serving your location.

8446 allowed values, for example `100 Miles` (100-miles), `100 Pipers` (100-pipers), `109f`, `10on Tissues` (10on-tissues), `10x`, `137 Degree` (137-degree), `14th Century` (14th-century), `1600 Ad Coffee` (1600-ad-coffee), `18 Herbs` (18-herbs), `180 Degree Oven` (180-degree-oven). Fetch the full list with `GET /v1/data/bigbasket/products?expand=options`.

**urls** `string[]`

One or more product page URLs (one per line).

**lat** `number`

Or target by coordinates: latitude (use with longitude).

Min `-90`; max `90`; use together with `lon`.

**lon** `number`

Or target by coordinates: longitude (use with latitude).

Min `-180`; max `180`; use together with `lat`.

**city** `string`

City - filters the pincode list.

384 allowed values, for example `New Delhi`, `Delhi`, `Faridabad`, `Greater Faridabad`, `Palwal`, `Gurugram`, `Gurgaon`, `Rewari`, `Rohtak`, `Jhajjar`. Fetch the full list with `GET /v1/data/bigbasket/products?expand=options`.

**pincode** `string`

Pincode - pick a city first.

1927 allowed values, for example `110001` (110001 (New Delhi)), `110002` (110002 (New Delhi)), `110003` (110003 (New Delhi)), `110005` (110005 (New Delhi)), `110006` (110006 (New Delhi)), `110007` (110007 (New Delhi)), `110008` (110008 (New Delhi)), `110009` (110009 (New Delhi)), `110010` (110010 (New Delhi)), `110012` (110012 (New Delhi)). Fetch the full list with `GET /v1/data/bigbasket/products?expand=options`.

**maxResults** `integer`

How many products to return. Use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/bigbasket/products/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "query": "chocolate",
    "city": "Bengaluru",
    "pincode": "560095"
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/bigbasket/products/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "query": "chocolate",
    "city": "Bengaluru",
    "pincode": "560095"
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/bigbasket/products/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "query": "chocolate",
  "city": "Bengaluru",
  "pincode": "560095"
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one product, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `productName` | Product Name | text |
| `brand` | Brand | text |
| `variantId` | Variant ID | text |
| `productId` | Product ID | text |
| `price` | Price | currency |
| `mrp` | MRP | currency |
| `discount` | Discount % | percentage |
| `packSize` | Pack Size | text |
| `inStock` | In Stock | boolean |
| `stockCount` | Stock Count | number |
| `rating` | Rating | rating |
| `ratingCount` | Rating Count | number |
| `category` | Category | text |
| `rank` | Rank | number |
| `sponsored` | Sponsored | boolean |
| `images` | Images | array |
| `productUrl` | Product URL | url |
| `description` | Description | text |
| `countryOfOrigin` | Country of Origin | text |
| `manufacturer` | Manufacturer | text |
| `seller` | Seller | text |
| `specifications` | Specifications | object\_array |
| `storeId` | Store ID | text |
| `latitude` | Latitude | number |
| `longitude` | Longitude | number |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "bigbasket/products",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "rating": 4.2,
      "productId": "253514",
      "countryOfOrigin": null,
      "images": [
        "https://www.bbassets.com/media/uploads/p/l/40024667_16-cadbury-dairy-milk-shots.jpg",
        "https://www.bbassets.com/media/uploads/p/l/40024667-2_14-cadbury-dairy-milk-shots.jpg"
      ],
      "mrp": 10.0,
      "brand": "Cadbury Dairy Milk",
      "variantId": "40024667",
      "rank": 1,
      "manufacturer": null,
      "sponsored": false,
      "seller": null,
      "inStock": true,
      "ratingCount": 10312,
      "packSize": "16 g",
      "description": null,
      "stockCount": 1,
      "longitude": 77.613,
      "category": "Chocolates",
      "specifications": [],
      "latitude": 12.9355,
      "productName": "Shots Chocolate Balls",
      "productUrl": "https://www.bigbasket.com/pd/40024667/cadbury-dairy-milk-shots-18-g-pouch/",
      "discount": 0.0,
      "storeId": "18648",
      "price": 10.0
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.