# List categories

List Blinkit departments and shelves for a location, with IDs for browsing category products.

- Platform: [Blinkit](https://docs.upscrape.com/docs/platforms/blinkit)
- Capability ID: `blinkit.categories`
- Cost: 1 credit per request
- Maximum runtime: 30 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "category_id": 96263,
    "pincode": "560102"
  },
  "capability": "blinkit.categories"
}'
```

## Input

Choose exactly one location: a six-digit pincode, a place name in location_query, or both latitude and longitude. Do not combine location modes. A pincode represents one delivery point, not every address in the area.

To limit the shelves to one department, pass its returned department ID in category_id. Use returned shelf IDs for category product requests.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | `integer` | No | Current department ID returned by blinkit.categories; limits the response to that department’s shelves. These IDs differ from legacy /cn department-link IDs. At least 1. |
| `latitude` | `number` | No | Latitude of the delivery address. From -90 to 90. |
| `location_query` | `string` | No | Free-text Indian location resolved before fetching location-dependent Blinkit data. |
| `longitude` | `number` | No | Longitude of the delivery address. From -180 to 180. |
| `pincode` | `string` | No | Six-digit Indian pincode; surrounding whitespace is allowed and trimmed. Do not combine with coordinates. |

### Example input

```json
{
  "category_id": 96263,
  "pincode": "560102"
}
```

## Response

Successful output is returned in `results[0].data`.

Departments and shelves are location-specific. Use the returned identifiers rather than assuming IDs from a copied legacy link are interchangeable.

### Illustrative sample output

This example shows one response. Values and optional fields vary with the data available.

```json
{
  "count": 10,
  "departments": [
    {
      "category_id": 96263,
      "category_name": "Dairy, Bread & Eggs",
      "default_subcategory_id": "922"
    }
  ],
  "groups": [
    {
      "categories": [
        {
          "category_id": 96263,
          "category_name": "Dairy, Bread & Eggs",
          "image_url": "https://cdn.grofers.com/app/images/collections/groupings/grouping_asset_Milk_1706513334099",
          "rank": 1,
          "subcategory_id": "922",
          "subcategory_name": "Milk"
        },
        {
          "category_id": 96263,
          "category_name": "Dairy, Bread & Eggs",
          "image_url": "https://cdn.grofers.com/app/images/collections/groupings/grouping_asset_Bread_&_Pav_1706513373124",
          "rank": 2,
          "subcategory_id": "953",
          "subcategory_name": "Bread & Pav"
        },
        {
          "category_id": 96263,
          "category_name": "Dairy, Bread & Eggs",
          "image_url": "https://cdn.grofers.com/app/images/collections/groupings/grouping_asset_Eggs_1706513645206",
          "rank": 3,
          "subcategory_id": "1200",
          "subcategory_name": "Eggs"
        }
      ],
      "display_name": "Grocery & Kitchen",
      "group_name": "grocery-kitchen",
      "rank": 1
    }
  ],
  "results": [
    {
      "category_id": 96263,
      "category_name": "Dairy, Bread & Eggs",
      "image_url": "https://cdn.grofers.com/app/images/collections/groupings/grouping_asset_Milk_1706513334099",
      "rank": 1,
      "subcategory_id": "922",
      "subcategory_name": "Milk"
    },
    {
      "category_id": 96263,
      "category_name": "Dairy, Bread & Eggs",
      "image_url": "https://cdn.grofers.com/app/images/collections/groupings/grouping_asset_Bread_&_Pav_1706513373124",
      "rank": 2,
      "subcategory_id": "953",
      "subcategory_name": "Bread & Pav"
    },
    {
      "category_id": 96263,
      "category_name": "Dairy, Bread & Eggs",
      "image_url": "https://cdn.grofers.com/app/images/collections/groupings/grouping_asset_Eggs_1706513645206",
      "rank": 3,
      "subcategory_id": "1200",
      "subcategory_name": "Eggs"
    }
  ]
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `count` | `integer` | 10 |
| `departments` | `array` | 1 items |
| `departments` | `array` | 1 items |
| `groups` | `array` | 1 items |
| `groups` | `array` | 1 items |
| `results` | `array` | 3 items |
| `results` | `array` | 3 items |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
