# Get category products

Browse products by Flipkart category ID or URL, with prices, ratings, upstream filters and bounded pagination.

- Platform: [Flipkart Commerce](https://docs.upscrape.com/docs/platforms/flipkart)
- Capability ID: `flipkart.category.products`
- Cost: 1 credit per request
- Maximum runtime: 45 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": "0pm/fcn/821",
    "max_price": 2000,
    "sort": "popularity"
  },
  "capability": "flipkart.category.products"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | `string` | No | Category id from flipkart.search.categories, e.g. 0pm/fcn/821 |
| `filters` | `array<string>` | No | Filter params from flipkart.search.categories, e.g. facets.brand[]=boAt; forwarded to Flipkart, not a strict guarantee for each returned row (including ads). |
| `max_pages` | `integer` | No | Maximum number of result pages to fetch. From 1 to 20. |
| `max_price` | `integer` | No | Highest price in INR; forwarded to Flipkart, not a strict guarantee for each returned row (including ads). |
| `min_price` | `integer` | No | Lowest price in INR; forwarded to Flipkart, not a strict guarantee for each returned row (including ads). |
| `page` | `integer` | No | One-based result page to fetch. From 1 to 1000. |
| `sort` | `string` | No | Result order (default relevance) |
| `url` | `string` | No | Flipkart category URL (…/pr?sid=…) |

### Example input

```json
{
  "category_id": "0pm/fcn/821",
  "max_price": 2000,
  "sort": "popularity"
}
```

## 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 redacted fixture is an example, not a fixed response schema.

```json
{
  "breadcrumbs": [
    {
      "name": "Home",
      "url": "https://www.flipkart.com/"
    },
    {
      "name": "Audio & Video",
      "url": "https://www.flipkart.com/audio-video/pr?sid=0pm&marketplace=FLIPKART"
    },
    {
      "name": "Headset",
      "url": "https://www.flipkart.com/audio-video/headset/pr?sid=0pm,fcn&marketplace=FLIPKART"
    }
  ],
  "category_id": "0pm/fcn/821",
  "end_page": 1,
  "filters_applied": [
    "facets.price_range.from=Min,facets.price_range.to=2000"
  ],
  "has_more": true,
  "listings": [
    {
      "assured": true,
      "brand": "vivo",
      "currency": "INR",
      "discount_percent": 33,
      "image_url": "https://rukmini1.flixcart.com/image/800/800/xif0q/headphone/2/v/s/-original-imahpqfwsfhtsz4h.jpeg?q=80",
      "is_sponsored": true,
      "listing_id": "LSTACCHPQ3MYSAGHJXANFDZ9J",
      "mrp": 2999,
      "page": 1,
      "position": 1,
      "price": 1999,
      "product_id": "ACCHPQ3MYSAGHJXA",
      "rating": 4.4,
      "rating_count": 481,
      "review_count": 221,
      "title": "vivo Buds, 50Hrs Playback, Spatial Audio, Dual-Mic AI ENC, Dual-Device Pairing Bluetooth",
      "url": "https://www.flipkart.com/[redacted:token]/p/itmd8347620a3cca?pid=ACCHPQ3MYSAGHJXA"
    },
    {
      "assured": true,
      "brand": "vivo",
      "currency": "INR",
      "discount_percent": 33,
      "image_url": "https://rukmini1.flixcart.com/image/800/800/xif0q/headphone/q/3/y/-original-imahpqfxfekthwtn.jpeg?q=80",
      "is_sponsored": true,
      "listing_id": "LSTACCHPQ3MGSDXRGVZLPK9CA",
      "mrp": 2999,
      "page": 1,
      "position": 2,
      "price": 1999,
      "product_id": "ACCHPQ3MGSDXRGVZ",
      "rating": 4.4,
      "rating_count": 481,
      "review_count": 221,
      "title": "vivo Buds, 50Hrs Playback, Spatial Audio, Dual-Mic AI ENC, Dual-Device Pairing Bluetooth",
      "url": "https://www.flipkart.com/[redacted:token]/p/itm743e4f00add37?pid=ACCHPQ3MGSDXRGVZ"
    },
    {
      "assured": false,
      "brand": "boAt",
      "currency": "INR",
      "discount_percent": 75,
      "image_url": "https://rukmini1.flixcart.com/image/800/800/xif0q/headphone/t/q/0/-original-imagzuzzrfgytsfz.jpeg?q=80",
      "is_sponsored": true,
      "listing_id": "LSTACCFZ95MY8SGZQRTXDKJLC",
      "mrp": 3990,
      "page": 1,
      "position": 3,
      "price": 999,
      "product_id": "ACCFZ95MY8SGZQRT",
      "rating": 4.2,
      "rating_count": 688477,
      "review_count": 48119,
      "title": "boAt Rockerz 255 Pro+, 60H Battery, ASAP Charge, App Support Bluetooth",
      "url": "https://www.flipkart.com/[redacted:token]/p/itm4174f29ad0389?pid=ACCFZ95MY8SGZQRT"
    }
  ],
  "name": "Earphones",
  "pages_fetched": 1,
  "start_page": 1,
  "total_products": 82620
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `breadcrumbs` | `array` | 3 items |
| `breadcrumbs` | `array` | 3 items |
| `category_id` | `string` | 0pm/fcn/821 |
| `end_page` | `integer` | 1 |
| `filters_applied` | `array` | 1 items |
| `filters_applied` | `array` | 1 items |
| `has_more` | `boolean` | true |
| `listings` | `array` | 3 items |
| `listings` | `array` | 3 items |
| `name` | `string` | Earphones |
| `pages_fetched` | `integer` | 1 |
| `start_page` | `integer` | 1 |
| `total_products` | `integer` | 82620 |

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