# Bigbasket — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Browse and search BigBasket's online grocery catalog. Retrieve product details, pricing, stock availability, category trees, search suggestions, homepage promotions, and delivery coverage — all in one API.

**Category:** Food & Dining | **Website:** [bigbasket.com/](https://bigbasket.com/) | **Docs:** [parse.bot/marketplace/eb1e37ae-38a9-45fa-be86-b8647b788924/bigbasket-com-api](https://parse.bot/marketplace/eb1e37ae-38a9-45fa-be86-b8647b788924/bigbasket-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Returns the full hierarchical category tree with up to 3 levels of nesting. Each category includes id, name, slug, URL, level, children (nested subcategories), and banner list. Useful for discovering category slugs for get_category_products.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_products

Browse products in a category by slug. Returns paginated product listings with pricing, availability, applicable filters, and sort options. Category slugs are obtainable from get_categories. Each page returns up to 40 products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug from the category tree (e.g. 'fruits-vegetables', 'foodgrains-oil-masala', 'electronics'). |
| `filters` | string | No | Filter string to narrow results (e.g. 'brand:Amul'). Passed to upstream; filtering effectiveness may vary. |
| `page` | integer | No | Page number for pagination (1-based). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","filters":"<string>","page":"<integer>"}'
```

### get_cities_served

Get the list of all cities where BigBasket delivers. Returns over 2000 cities with state information and customer support hours.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_cities_served \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_homepage_sections

Get current promotional sections and featured products from the homepage. Returns carousel sections with products, banners, and collage blocks. Section types include SKUDeckCarousel (with products), LinearCollage (with image blocks), Banner, and BannerCarousel.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_homepage_sections \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_availability

Check product availability, delivery time, and current price. Returns stock status, estimated delivery time, MRP, selling price, and product information tabs (About, How to Use, Other Product Info).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID (e.g. '40075897'). Obtainable from search_products results. |
| `product_slug` | string | Yes | Product URL slug (e.g. 'bb-royal-sona-masoori-rice-raw-rice-super-premium-10-kg'). Extractable from search_products results URL path segment after /pd/<id>/. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_product_availability \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>","product_slug":"<string>"}'
```

### get_product_details

Get full details for a specific product including all size variants, images at multiple resolutions, brand, pricing, availability, tabs (about, nutritional info, how to use), breadcrumb trail, rating info, and tags. Returns a children array containing all product variants.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID (e.g. '40075897'). Obtainable from search_products results. |
| `product_slug` | string | Yes | Product URL slug (e.g. 'bb-royal-sona-masoori-rice-raw-rice-super-premium-10-kg'). Extractable from search_products results URL path segment after /pd/<id>/. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>","product_slug":"<string>"}'
```

### get_search_suggestions

Get autocomplete search suggestions for a partial query. Returns matching products with pricing and images, brand suggestions, and category suggestions. Useful for typeahead/autocomplete UIs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `term` | string | Yes | Partial search term (minimum 2 characters, e.g. 'ri', 'choc', 'tom'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/get_search_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"term":"<string>"}'
```

### search_products

Full-text search over BigBasket's product catalog by keyword. Returns paginated product listings with pricing, availability, applicable filters, and sort options. Each result includes a product ID and slug usable in get_product_details and get_product_availability. Paginated via integer page number; each page returns up to 40 products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `filters` | string | No | Filter string to narrow results (e.g. 'brand:Amul'). Passed to upstream; filtering effectiveness may vary. |
| `page` | integer | No | Page number for pagination (1-based). |
| `query` | string | Yes | Search keyword (e.g. 'milk', 'rice', 'tomato'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bigbasket-com-api-eb1e37ae/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filters":"<string>","page":"<integer>","query":"<string>"}'
```
