# Nykaa Fashion — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse Nykaa Fashion's product catalog to discover clothing, accessories, and beauty items across multiple categories. Get detailed product information including prices, descriptions, and availability to help you find exactly what you're looking for.

**Category:** E-commerce | **Website:** [nykaafashion.com/](https://nykaafashion.com/) | **Docs:** [parse.bot/marketplace/c93fa9a2-e3eb-46cd-a5a1-0619c1f0c454/nykaafashion-com-api](https://parse.bot/marketplace/c93fa9a2-e3eb-46cd-a5a1-0619c1f0c454/nykaafashion-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-nykaafashion-com-api-c93fa9a2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_category_products

Browse products in a specific category or brand by its relative URL path. The category_url is obtained from get_category_tree results (action_url field). Returns paginated product listings with the same shape as search_products. Each page returns approximately 36-40 products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_url` | string | Yes | Relative URL path of the category (e.g. '/women/c/6557', '/men/c/6823', '/kids/c/6266'). Obtained from get_category_tree action_url fields. |
| `page` | integer | No | Page number for pagination. |
| `sort` | string | No | Sort criteria for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nykaafashion-com-api-c93fa9a2/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_url":"<string>","page":"<integer>","sort":"<string>"}'
```

### get_category_tree

Retrieve the full category hierarchy including top-level categories (Women, Men, Kids), subcategories, and brands. Returns a nested tree structure rooted at 'Nykaa' with category IDs, names, images, and action_url paths suitable for get_category_products. Single-page response with no pagination.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nykaafashion-com-api-c93fa9a2/get_category_tree \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Get full details of a specific product including pricing, size options, materials, care instructions, delivery info, and brand information. Requires both the product ID and URL slug which are derived from search_products or get_category_products results: product_id from results[*].id, slug from results[*].actionUrl by removing the '/p/{id}' suffix and leading slash.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID from search or category results (e.g. '12345678'). Found in search_products or get_category_products results[*].id. |
| `slug` | string | Yes | Product URL slug derived from actionUrl. Remove the leading '/' and '/p/{id}' suffix from the actionUrl (e.g. actionUrl '/the-souled-store-vanguard-lavender-women-sneakers/p/23555172' becomes 'the-souled-store-vanguard-lavender-women-sneakers'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nykaafashion-com-api-c93fa9a2/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>","slug":"<string>"}'
```

### get_search_suggestions

Get search autocomplete suggestions for a partial query. Returns brand and keyword suggestions with match counts and URLs. Useful for discovering brand names and popular search terms before calling search_products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial search term to get suggestions for (e.g. 'red', 'dre', 'nike'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nykaafashion-com-api-c93fa9a2/get_search_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_products

Search for products by keyword. Returns paginated results with product listings including prices, images, sizes, and offers. Some queries may redirect to a category page when Nykaa detects an exact category match. Supports sorting by various criteria. Each page returns approximately 36-40 products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword (e.g. 'sneakers', 'jeans', 'kurta'). |
| `sort` | string | No | Sort criteria for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nykaafashion-com-api-c93fa9a2/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","sort":"<string>"}'
```
