> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Nykaa API

> Search Nykaa and read its product pages as JSON: ranked products with prices, ratings, review counts and brands, and each product's price, stock, seller, images, specs and options.

Search Nykaa (nykaa.com) and read its product pages through the async task API. Send `COMMERCE_SERP` with `site` `nykaa` to get the products a search shows, in the store's order, or `COMMERCE_PRODUCT` with a product's `url` to read that product. A completed search or product page costs **0.5 credits**.

## Search

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_SERP", "payload": { "site": "nykaa", "query": "sunscreen", "limit": 3 } }'
```

Submit the task, then poll `GET /v1/async/task/{id}` or receive its webhook. See [Async tasks](https://docs.querying.ai/concepts/async-tasks.md).

### Parameters

* `site`: Required. `nykaa`.
* `query`: Required. The search query, 1-500 characters.
* `limit`: Optional integer from 1 to 40, default 20.
* `country`: Optional. Defaults to `IN`, the store's country. Any other country is rejected with `422 REGION_UNSUPPORTED`.

Only the payload fields listed above are accepted. Omit `include`: even `include: {}` returns `422 VALIDATION_ERROR` on `payload.include` before credits are held.

### Response example

```json theme={"theme":"css-variables"}
{
  "site": "nykaa",
  "query": "sunscreen",
  "country": "IN",
  "returnedCount": 3,
  "products": [
    {
      "rank": 1,
      "productId": "6951199",
      "title": "Beauty Of Joseon Relief Sunscreen Rice + Probiotics SPF 50+ PA++++",
      "url": "https://www.nykaa.com/beauty-of-joseon-relief-sunscreen-rice-probiotics-spf-50-pa/p/16900408",
      "price": 1570,
      "currency": "INR",
      "rating": 4.4,
      "reviewCount": 23582,
      "brand": "Beauty of Joseon",
      "imageUrl": "https://images-static.nykaa.com/media/catalog/product/tr:h-200,w-200,cm-pad_resize/4/c/4c49d98BEAAR00000010b_1.jpg"
    },
    {
      "rank": 2,
      "productId": "14558391",
      "title": "Dot & Key Strawberry Dew Tinted Sunscreen SPF 50+ PA++++",
      "url": "https://www.nykaa.com/dot-key-strawberry-dew-tinted-sunscreen-spf-50-pa/p/14558391",
      "price": 500,
      "currency": "INR",
      "rating": 4.3,
      "reviewCount": 36470,
      "brand": "Dot & Key",
      "imageUrl": "https://images-static.nykaa.com/media/catalog/product/tr:h-200,w-200,cm-pad_resize/0/4/040e1b88906147701775_j1.jpg"
    },
    {
      "rank": 3,
      "productId": "20714391",
      "title": "ISDIN Fotoprotector Fusion Water Magic SPF 50 PA ++++",
      "url": "https://www.nykaa.com/isdin-fotoprotector-fusion-water-magic-spf-50/p/20714391",
      "price": 2850,
      "currency": "INR",
      "rating": 4.6,
      "reviewCount": 6476,
      "brand": "ISDIN",
      "imageUrl": "https://images-static.nykaa.com/media/catalog/product/tr:h-200,w-200,cm-pad_resize/3/d/3dd2633ISDIN00000015_1q.jpg"
    }
  ]
}
```

### Result fields

* `site`, `query` and `country` echo the request. `returnedCount` is the number of entries in `products`.
* Each product includes `rank`, `productId`, `title` and `url`. `productId` is the store's own product ID. `rank` follows the store's default order, and listings the store marks as sponsored are left out.
* `price`, `rating`, `reviewCount`, `imageUrl` and `brand` appear when the results page shows them. `price` is a number in the product's `currency` (ISO 4217); when sizes are priced apart, it is the lowest one.
* `rating` uses a five-point scale. Abbreviated review counts such as 999+ are left out.
* Each search returns products from the store's first results page, which has 20 places, sponsored listings included. For a search that names a category, Nykaa shows the category page, and the products come from that page.

## Product page

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_PRODUCT", "payload": { "url": "https://www.nykaa.com/beauty-of-joseon-relief-sunscreen-rice-probiotics-spf-50-pa/p/16900408" } }'
```

### Parameters

* `url`: Required. A product page on Nykaa, up to 2,048 characters: `nykaa.com/{name}/p/{id}`. Product `url` values from a search work as they are. Parameters the result does not depend on, such as tracking codes, are dropped before the page is read.
* `country`: Optional. Defaults to `IN`, the page's country. Any other country is rejected with `422 REGION_UNSUPPORTED`.

Only the payload fields listed above are accepted. Omit `include`: even `include: {}` returns `422 VALIDATION_ERROR` on `payload.include` before credits are held.

### Response example

```json theme={"theme":"css-variables"}
{
  "site": "nykaa",
  "country": "IN",
  "url": "https://www.nykaa.com/beauty-of-joseon-relief-sunscreen-rice-probiotics-spf-50-pa/p/16900408",
  "productId": "16900408",
  "title": "Beauty of Joseon Relief Sunscreen Rice + Probiotics SPF 50+ PA++++",
  "brand": "Beauty of Joseon",
  "price": 1570,
  "currency": "INR",
  "inStock": true,
  "seller": "Nykaa E retail limited",
  "rating": 4.4,
  "reviewCount": 23582,
  "images": [
    "https://images-static.nykaa.com/media/catalog/product/9/d/9d01a90BEAAR00000010_1.jpg",
    "https://images-static.nykaa.com/media/catalog/product/9/d/9d01a90BEAAR00000010_2.jpg"
  ],
  "description": "What it's like when you actually use it",
  "specs": [
    { "name": "Country of origin", "value": "South Korea" },
    { "name": "Expiry", "value": "15 January 2029" }
  ],
  "options": [{ "name": "Weight", "values": ["10ml", "50ml"] }],
  "categories": ["Skin", "Sun Care", "Face Sunscreen"]
}
```

### Result fields

* `site`, `country`, `url` and `productId` identify the page. `url` is the page that was read, and `productId` matches the one a search returns. For a product with shades or sizes, a search returns the ID of one option, and this read returns the ID of the product page.
* `title` is always present. `brand`, `price`, `listPrice`, `currency`, `inStock`, `seller`, `rating`, `reviewCount`, `images`, `description`, `specs`, `options` and `categories` appear when the page shows them.
* `price` is what a shopper pays as the page first shows it, before coupons and delivery, in `currency` (ISO 4217). `listPrice` is the regular price the page strikes through, present when it is above `price`. `inStock` is the product's stock status. `seller` is the merchant selling it.
* `rating` uses a five-point scale with two decimals. `reviewCount` is the number of reviews.
* `images` lists up to 30 photos from the product's gallery, in page order.
* `description` is plain text with one line per paragraph, up to 10,000 characters; text that appears only inside images is not included.
* `specs` lists up to 100 `{ name, value }` pairs from the product details. `options` lists up to 20 choices such as size or color, each with up to 100 `values`; the other fields describe the choice the page opens on. `categories` runs from the broadest category to the narrowest, up to 10 levels.

## Errors and billing

* A search that returns no products ends as a failed task.
* A product page the store answers with 404 or 410, such as a removed product, ends the task with `PAGE_UNAVAILABLE`, and the message carries the store's answer. When the store refuses the read with 403, 412, 429 or 435, the task waits and asks again for up to 6 minutes. Other failed reads, and a refusal that lasts longer, end with `ENGINE_NO_RESULT`.
* Only completed tasks are charged: 0.5 credits for a search or a product page.

## Related

* [Flipkart](https://docs.querying.ai/engines/flipkart.md)
* [Myntra](https://docs.querying.ai/engines/myntra.md)
* [All Commerce stores](https://docs.querying.ai/engines/overview.md#commerce)
* [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.