# Search listings

Return current Flipkart search listings with prices, ratings, ads/promotions, and optional pagination depth.

- Platform: [Flipkart Commerce](https://docs.upscrape.com/docs/platforms/flipkart)
- Capability ID: `flipkart.search.listings`
- 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 YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "max_pages": 1,
    "page": 1,
    "query": "iphone"
  },
  "capability": "flipkart.search.listings"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `max_pages` | `integer` | No | Max pages supplied for this request. |
| `page` | `integer` | No | One-based result page to fetch. |
| `query` | `string` | Yes | Search query. |

### Example input

```json
{
  "max_pages": 1,
  "page": 1,
  "query": "iphone"
}
```

## 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
{
  "end_page": 1,
  "has_more": true,
  "listings": [
    {
      "assured": true,
      "brand": "Apple",
      "currency": "INR",
      "discount_percent": 3,
      "image_url": "https://rukminim1.flixcart.com/image/800/800/xif0q/mobile/h/d/9/-original-imagtc2qzgnnuhxh.jpeg?q=80&crop=false",
      "is_sponsored": false,
      "listing_id": "LSTMOBGTAGPTB3VS24WCTBCFM",
      "mrp": 59900,
      "page": 1,
      "position": 1,
      "price": 57749,
      "product_id": "MOBGTAGPTB3VS24W",
      "rating": 4.6,
      "rating_count": 247095,
      "review_count": 9623,
      "title": "Apple iPhone 15 (Black, 128 GB)",
      "url": "https://www.flipkart.com/apple-iphone-15-black-128-gb/p/itm6ac6485515ae4?pid=MOBGTAGPTB3VS24W"
    },
    {
      "assured": true,
      "brand": "Apple",
      "currency": "INR",
      "discount_percent": 1,
      "image_url": "https://rukminim1.flixcart.com/image/800/800/xif0q/mobile/n/v/e/-original-imahft5gfchxyewy.jpeg?q=80&crop=false",
      "is_sponsored": false,
      "listing_id": "LSTMOBHFN6YNAG4ZTHSWUQQUI",
      "mrp": 82900,
      "page": 1,
      "position": 2,
      "price": 81900,
      "product_id": "MOBHFN6YNAG4ZTHS",
      "rating": 4.6,
      "rating_count": 22617,
      "review_count": 1660,
      "title": "Apple iPhone 17 (Sage, 256 GB)",
      "url": "https://www.flipkart.com/apple-iphone-17-sage-256-gb/p/itmcfa57eff7729c?pid=MOBHFN6YNAG4ZTHS"
    },
    {
      "assured": true,
      "brand": "Apple",
      "currency": "INR",
      "discount_percent": 5,
      "image_url": "https://rukminim1.flixcart.com/image/800/800/xif0q/mobile/h/u/i/-original-imahgfmyczqxhtm2.jpeg?q=80&crop=false",
      "is_sponsored": false,
      "listing_id": "LSTMOBH4DQF849HCG6GXHBPXY",
      "mrp": 69900,
      "page": 1,
      "position": 3,
      "price": 65900,
      "product_id": "MOBH4DQF849HCG6G",
      "rating": 4.6,
      "rating_count": 196318,
      "review_count": 8459,
      "title": "Apple iPhone 16 (White, 128 GB)",
      "url": "https://www.flipkart.com/apple-iphone-16-white-128-gb/p/itm7c0281cd247be?pid=MOBH4DQF849HCG6G"
    }
  ],
  "pages_fetched": 1,
  "query": "iphone",
  "start_page": 1
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `end_page` | `integer` | 1 |
| `has_more` | `boolean` | true |
| `listings` | `array` | 3 items |
| `listings` | `array` | 3 items |
| `pages_fetched` | `integer` | 1 |
| `query` | `string` | iphone |
| `start_page` | `integer` | 1 |

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