# Discover categories

Discover chainable category links from the home page or a selected category ID/URL. Results cover the selected page scope.

- Platform: [Flipkart Minutes](https://docs.upscrape.com/docs/platforms/flipkart-minutes)
- Capability ID: `flipkart-minutes.categories.list`
- Cost: 8 credits per request
- Maximum runtime: 120 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": {
    "city": "Bengaluru",
    "latitude": 12.9352403,
    "longitude": 77.624532,
    "neighbourhood": "Koramangala",
    "parent_category_id": "hloc/0071",
    "pincode": "560034",
    "state": "Karnataka"
  },
  "capability": "flipkart-minutes.categories.list"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | `string` | Yes | City name. |
| `latitude` | `number` | Yes | Latitude in decimal degrees. From -90 to 90. |
| `limit` | `integer` | No | Maximum number of results to return. From 1 to 500. Default: `100`. |
| `longitude` | `number` | Yes | Longitude in decimal degrees. From -180 to 180. |
| `neighbourhood` | `string` | Yes |  |
| `parent_category_id` | `string` | No | Parent category identifier. |
| `parent_category_url` | `string` | No | First-party /hyperlocal/.../pr URL returned by category discovery; provide this or parent_category_id, not both. |
| `pincode` | `string` | Yes | Postal code (PIN) that sets the delivery location. |
| `state` | `string` | Yes | State or region name. |

### Example input

```json
{
  "city": "Bengaluru",
  "latitude": 12.9352403,
  "longitude": 77.624532,
  "neighbourhood": "Koramangala",
  "parent_category_id": "hloc/0071",
  "pincode": "560034",
  "state": "Karnataka"
}
```

## Response

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

Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

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

```json
{
  "categories": [
    {
      "category_id": "hloc/0071/7102",
      "discovered_in": "/hyperlocal/Fruits/pr?marketplace=HYPERLOCAL&sid=hloc%2F0071",
      "name": "Fresh Fruits",
      "url": "https://www.flipkart.com/hyperlocal/hloc/7102/pr?marketplace=HYPERLOCAL&sid=hloc%2F0071%2F7102"
    },
    {
      "category_id": "hloc/0071/yhjl",
      "discovered_in": "/hyperlocal/Fruits/pr?marketplace=HYPERLOCAL&sid=hloc%2F0071",
      "name": "Gourmet",
      "url": "https://www.flipkart.com/hyperlocal/hloc/yhjl/pr?marketplace=HYPERLOCAL&sid=hloc%2F0071%2Fyhjl"
    },
    {
      "category_id": "hloc/0071/7113",
      "discovered_in": "/hyperlocal/Fruits/pr?marketplace=HYPERLOCAL&sid=hloc%2F0071",
      "name": "Apple Orchard",
      "url": "https://www.flipkart.com/hyperlocal/hloc/7113/pr?marketplace=HYPERLOCAL&sid=hloc%2F0071%2F7113"
    }
  ],
  "observed_at": "2026-10-04T10:26:44Z",
  "scope_limited": true,
  "store": {
    "eta_seconds": 473,
    "store_id": "ben_017_wh_hl_01"
  },
  "truncated": false
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `categories` | `array` | 3 items |
| `categories` | `array` | 3 items |
| `observed_at` | `string` | 2026-10-04T10:26:44Z |
| `scope_limited` | `boolean` | true |
| `store` | `object` | 2 fields |
| `store.eta_seconds` | `integer` | 473 |
| `store.store_id` | `string` | ben_017_wh_hl_01 |
| `truncated` | `boolean` | false |

## 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)
