# BigBasket Categories API Documentation

<p><strong>BigBasket Categories API</strong> returns the public category tree for a delivery pincode. Each category has a path and an id that the search route accepts unchanged. This is the public id source for BigBasket search.</p><p>Send a supported six-digit Indian pincode. Costs 1 credit per successful request. Failed and empty answers are free.</p>

- **Documentation:** [https://scrappa.co/docs/bigbasket-api/bigbasket_categories](https://scrappa.co/docs/bigbasket-api/bigbasket_categories)
- **API group:** BigBasket API
- **Endpoint:** `GET https://scrappa.co/api/bigbasket/categories`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `pincode` | string | Yes | Supported six-digit Indian delivery pincode, e.g. 110001 |

## Example response

```json
{
    "data": {
        "count": 2,
        "pincode": "110001",
        "categories": [
            {
                "id": "fruits-vegetables",
                "name": "Fruits & Vegetables",
                "path": "fruits-vegetables",
                "parent": null
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "categories"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Unsupported pincode | The pincode is not supported. Not billed. |
| 503 | Upstream unavailable | BigBasket could not be reached. Not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
