# Flipkart Search API Documentation

<p><strong>Flipkart Search API Documentation</strong> Search Flipkart, the largest online marketplace in India, or browse a category by store id. Filter by brand and price range and sort by relevance, popularity, price or newest. Every item has the sale price and the list price (MRP) as numbers in rupees, the discount percent, brand, rating with count, stock state, key specs and full size photos. The answer also holds the total, the page count, the filter facets with counts, the category breadcrumbs and the categories a broad search falls into (use their category value as the category parameter). A page holds up to 24 items (40 for fashion); sponsored cards are removed, so a page can hold fewer. Flipkart sometimes lists cards outside a price range or without a price; Scrappa drops them, so a page with a price range can hold fewer items, and pagination.per_page is the real count. Every returned item matches your brand and price filters; an unknown brand returns 422. The id of an item works unchanged in the product, offers, delivery and reviews endpoints. Cost: 1 credit per request, only for successful requests. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/flipkart-api/flipkart_search](https://scrappa.co/docs/flipkart-api/flipkart_search)
- **API group:** Flipkart API
- **Endpoint:** `GET https://scrappa.co/api/flipkart/search`

## 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 |
| --- | --- | --- | --- |
| `query` | string | No | Search words, for example iphone. Send a query, a category or both. |
| `category` | string | No | Flipkart store id (sid) from the breadcrumbs of a search result, for example tyy,4io for Mobiles. Send a query, a category or both. |
| `brand` | string | No | Brand name as the brand facet shows it, for example Nike. Flipkart applies a brand only when the search falls into one category: for a broad search send a category from data.categories. Every returned item has this brand; an unknown brand returns 422. |
| `min_price` | integer | No | Lowest price in rupees. Every returned item costs at least this much. |
| `max_price` | integer | No | Highest price in rupees. Every returned item costs at most this much. |
| `sort` | string | No | relevance (default), popularity, price_asc, price_desc or recency_desc. |
| `page` | integer | No | Page number, 1 to 100. A page past the last page returns an empty list, never the first page. |

## Example response

```json
{
    "data": {
        "sort": "price_asc",
        "items": [
            {
                "id": "MOBEXRGVPHW9QZ2S",
                "url": "https://www.flipkart.com/apple-iphone-8-space-grey-64-gb/p/itmexrgvkkvhjhuk?pid=MOBEXRGVPHW9QZ2S",
                "brand": "Apple",
                "price": 39900,
                "title": "Apple iPhone 8 (Space Grey, 64 GB)",
                "images": [
                    "https://rukminim1.flixcart.com/image/1500/1500/j7ksia80/mobile/z/2/s/apple-iphone-8-mq6k2hn-a-original-imaexsbztghyprcg.jpeg?q=70",
                    "https://rukminim1.flixcart.com/image/1500/1500/j7ksia80/mobile/e/w/v/apple-iphone-8-mq7f2hn-a-original-imaexsbza3tjzcxf.jpeg?q=70"
                ],
                "rating": {
                    "count": 10993,
                    "score": 4.5,
                    "review_count": 776
                },
                "category": "Handset",
                "currency": "INR",
                "in_stock": false,
                "subtitle": null,
                "key_specs": [
                    "64 GB ROM",
                    "11.94 cm (4.7 inch) Retina HD Display",
                    "12MP Rear Camera | 7MP Front Camera",
                    "A11 Bionic Chip with 64-bit Architecture, Neural Engine, Embedded M11 Motion Coprocessor Processor",
                    "iOS 13 Compatible"
                ],
                "listing_id": "LSTMOBEXRGVPHW9QZ2SXQ2WFU",
                "availability": "Currently unavailable",
                "original_price": 39900,
                "discount_percent": null
            },
            {
                "id": "MOBFWQ6BTFFJKGKE",
                "url": "https://www.flipkart.com/apple-iphone-11-purple-64-gb/p/itm2b8d03427ddac?pid=MOBFWQ6BTFFJKGKE",
                "brand": "Apple",
                "price": 43900,
                "title": "Apple iPhone 11 (Purple, 64 GB)",
                "images": [
                    "https://rukminim1.flixcart.com/image/1500/1500/k2jbyq80pkrrdj/mobile-refurbished/y/k/z/iphone-11-64-a-mwlx2hn-a-apple-0-original-imafkg24ymsjav9h.jpeg?q=70",
                    "https://rukminim1.flixcart.com/image/1500/1500/kgiaykw0/mobile/g/k/e/apple-iphone-11-mhdf3hn-a-original-imafwqepygpnkgez.jpeg?q=70"
                ],
                "rating": {
                    "count": 179698,
                    "score": 4.6,
                    "review_count": 10643
                },
                "category": "Handset",
                "currency": "INR",
                "in_stock": false,
                "subtitle": null,
                "key_specs": [
                    "64 GB ROM",
                    "15.49 cm (6.1 inch) Liquid Retina HD Display",
                    "12MP + 12MP | 12MP Front Camera",
                    "A13 Bionic Chip Processor"
                ],
                "listing_id": "LSTMOBFWQ6BTFFJKGKEPHMT2V",
                "availability": "Currently unavailable",
                "original_price": 43900,
                "discount_percent": null
            }
        ],
        "facets": [
            {
                "id": "internal_storage",
                "title": "Internal Storage",
                "values": [
                    {
                        "count": 183,
                        "value": "256 GB & Above",
                        "selected": false
                    },
                    {
                        "count": 66,
                        "value": "128 - 255.9 GB",
                        "selected": false
                    },
                    {
                        "count": 30,
                        "value": "64 - 127.9 GB",
                        "selected": false
                    }
                ]
            },
            {
                "id": "brand",
                "title": "Brand",
                "values": [
                    {
                        "count": 429,
                        "value": "Apple",
                        "selected": false
                    }
                ]
            }
        ],
        "filters": {
            "brand": null,
            "query": "iphone",
            "category": null,
            "max_price": null,
            "min_price": null
        },
        "currency": "INR",
        "categories": [
            {
                "title": "Watches",
                "total": 69192,
                "category": "r18",
                "children": [
                    {
                        "title": "Wrist Watches",
                        "total": 38551,
                        "category": "f13",
                        "children": []
                    }
                ]
            }
        ],
        "pagination": {
            "total": 429,
            "has_more": true,
            "per_page": 24,
            "total_pages": 18,
            "current_page": 1
        },
        "breadcrumbs": [
            {
                "title": "Mobiles & Accessories",
                "category": "tyy"
            },
            {
                "title": "Mobiles",
                "category": "tyy,4io"
            }
        ],
        "sponsored_removed": 0
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billable. |
| 422 | Unknown Brand | Flipkart ignores a brand it does not know and answers the unfiltered list. Scrappa never returns that list and answers 422 instead. This response is not billable. |
| 503 | Upstream Unavailable | Flipkart did not answer or sent data Scrappa cannot read. This response is not billable. Retry later. |

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