# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/bigbasket/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/bigbasket/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/get-category-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/get-cities-served \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/get-homepage-sections \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/get-product-availability \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/get-search-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bigbasket/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"filters":"<string>","page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.