# Myntra Product Scraper (`khadinakbar/myntra-product-scraper`) Actor

Scrape Myntra.com products by keyword, listing/category URL, or product URL/ID — price, MRP, discount, brand, rating, sizes, stock, seller, images, and specs. HTTP-only, MCP-ready.

- **URL**: https://apify.com/khadinakbar/myntra-product-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** E-commerce, MCP servers, Automation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 product scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Myntra Product Scraper

Scrape **Myntra.com** fashion products at scale — by keyword search, listing/category URL, or product URL/ID. Returns clean, structured JSON with price, MRP, discount, brand, rating, sizes, stock, seller, images, and full specifications. HTTP-only (no browser), MCP-ready for AI agents.

### What it does

Give it a **keyword** (`nike running shoes`), one or more **listing/category URLs** (`https://www.myntra.com/men-tshirts`), or **product URLs / IDs** — the actor auto-detects the mode and returns one structured record per product.

- **Search mode** — keyword → paginated product cards (fast, cheap).
- **Listing mode** — category/filter/sort URLs → paginated product cards.
- **Detail mode** — product URL or numeric ID → full product-detail record (sizes, seller, specs, images, description).
- **Enrich mode** — turn on `enrichDetails` to follow every search/listing result to its detail page.

### When to use it

- **Price & discount monitoring** across brands and categories on Myntra.
- **Competitive / assortment analysis** — catalog breadth, MRP vs selling price, stock.
- **Fashion trend research** — colours, article types, ratings, review counts.
- **Catalog enrichment** — resolve a list of product IDs into full detail records.
- **Feeding AI agents** — narrow input, structured JSON out, predictable per-item pricing.

Do **not** use this for Myntra user accounts, orders, or checkout — it only reads public product data.

### Output

| Field | Type | Description |
|---|---|---|
| `source` | string | `search` (listing card) or `detail` (product page) |
| `productId` | string | Myntra style/product id |
| `productName` / `name` | string | Product title |
| `brand` | string | Brand name |
| `gender` | string | Men / Women / Unisex / Boys / Girls |
| `mrp` | integer | Maximum retail price (₹) |
| `price` | integer | Selling price after discount (₹) |
| `discountPercent` | integer | Discount % (0–100) |
| `rating` | number | Average star rating (0–5) |
| `ratingCount` | integer | Number of ratings |
| `sizes` | array | Sizes (strings on cards; `{label,available,skuId}` on detail) |
| `inStock` | boolean | Any size in stock |
| `seller` | string | Selected seller (detail) |
| `specifications` | object | Fabric, fit, pattern, etc. (detail) |
| `description` | string | Plain-text description (detail) |
| `image` / `images` | string / array | Product image URL(s) |
| `url` | string | Canonical Myntra product URL |
| `scrapedAt` | string | ISO 8601 timestamp |

### Pricing (Pay-Per-Event)

| Event | Price |
|---|---|
| Actor start | $0.00005 |
| Product scraped (search/listing card) | **$0.003** |
| Product detail scraped (full PDP / enriched) | **$0.005** |

A 100-product keyword search costs ~**$0.30**. 100 enriched detail records cost ~**$0.50**. No monthly subscription — pay only for what you scrape. Pay-Per-Usage (compute + proxy) is also available.

### Example input

Keyword search:

```json
{
  "search": "nike running shoes",
  "maxItems": 100
}
````

Category listing, enriched with full detail:

```json
{
  "startUrls": ["https://www.myntra.com/men-tshirts"],
  "enrichDetails": true,
  "maxItems": 50
}
```

Specific products by URL and ID:

```json
{
  "startUrls": ["https://www.myntra.com/tshirts/roadster/.../42879609/buy"],
  "productIds": ["42879609", "2chrome"]
}
```

### Run via API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~myntra-product-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "search": "women kurta", "maxItems": 50 }'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("khadinakbar/myntra-product-scraper").call(
    run_input={"search": "women kurta", "maxItems": 50}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["brand"], item.get("price"), item["url"])
```

### Use with AI agents (MCP)

This actor is MCP-ready. Point any MCP client at `https://mcp.apify.com?tools=khadinakbar/myntra-product-scraper` and the agent can call it with a single keyword or URL and receive structured product JSON, billed per result.

### How it works

Myntra server-renders all product data into a `window.__myx` JSON island on every search, listing, and product page. The actor fetches that HTML using **impit** — a Rust TLS impersonator that presents a genuine Chrome fingerprint, defeating Myntra's Akamai JA3/JA4 bot detection that blocks ordinary HTTP clients. No headless browser is used, so runs are fast and cheap. Sessions rotate, requests retry with exponential backoff, and a circuit breaker aborts cleanly if the target blocks persistently.

### FAQ

**Does it need login or cookies?** No. Only public product data is read.

**Which proxy should I use?** The default Apify datacenter proxy is sufficient — the TLS fingerprint, not the IP, is what passes Myntra's anti-bot. Switch to residential only if you see blocks.

**How many products per search?** Up to `maxItems` (default 100). Myntra returns ~50 products per page and the actor paginates automatically.

**Do I get reviews?** Rating value and review count are included. Full review text is out of scope for this actor.

**What if a product is unavailable?** You still get the record with `inStock: false` and available sizes empty.

### Legal

This actor scrapes only publicly available product information from Myntra.com. Use it in compliance with Myntra's Terms of Service and applicable laws (including the DPDP Act and GDPR where relevant). Do not use scraped data to infringe intellectual property or for any unlawful purpose. You are responsible for how you use the output. This actor is not affiliated with, endorsed by, or sponsored by Myntra or Flipkart.

# Actor input Schema

## `search` (type: `string`):

Free-text keyword run against Myntra search (e.g. 'nike running shoes', 'women kurta'). Returns paginated product cards. Leave empty if you are using Start URLs or Product IDs instead. NOT a URL — for a specific listing page use Start URLs.

## `startUrls` (type: `array`):

Myntra listing/category URLs (e.g. https://www.myntra.com/men-tshirts) or product URLs (ending in /<id>/buy). Each is auto-detected: listing pages are paginated, product pages return full detail. Use this to scrape an exact category, a filtered/sorted listing, or specific products. NOT for free-text search — use Search keyword for that.

## `productIds` (type: `array`):

Bare numeric Myntra product/style IDs (e.g. 42879609) to scrape full product-detail records. Each ID is resolved directly to its detail page. Use when you already have IDs and do not need search. NOT brand names — these must be the numeric IDs from a product URL.

## `enrichDetails` (type: `boolean`):

When enabled, each search/listing result is followed to its product-detail page for sizes, seller, specs, images, and description (billed at the higher detail rate). When disabled, only fast listing-card fields are returned. Defaults to false. Ignored for Product IDs, which always return full detail.

## `maxItems` (type: `integer`):

Maximum number of product records to return across all inputs (hard cap on billing). Pagination stops once this is reached. Defaults to 100. Set lower for a quick sample or higher for bulk catalog pulls.

## `pincode` (type: `string`):

Indian 6-digit delivery pincode used for price and serviceability context (e.g. '110001' for Delhi). Affects regional pricing and stock signals. Defaults to 110001. Most users can leave this as-is.

## `proxyConfiguration` (type: `object`):

Proxy used for requests. Defaults to Apify Proxy (datacenter), which is required — Myntra blocks Apify's raw server IP, while the actor's TLS fingerprint is what passes the anti-bot. Switch to residential or provide custom proxy URLs only if you observe blocks. Disabling the proxy falls back to Apify Proxy automatically.

## Actor input object example

```json
{
  "search": "women floral dress",
  "startUrls": [],
  "productIds": [],
  "enrichDetails": false,
  "maxItems": 100,
  "pincode": "110001",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

All product records from searches, listings, and detail pages. Download as JSON, CSV, Excel, HTML, or RSS.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "search": "nike running shoes",
    "startUrls": [],
    "productIds": [],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/myntra-product-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "search": "nike running shoes",
    "startUrls": [],
    "productIds": [],
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/myntra-product-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "search": "nike running shoes",
  "startUrls": [],
  "productIds": [],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call khadinakbar/myntra-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/myntra-product-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Myntra Product Scraper",
        "description": "Scrape Myntra.com products by keyword, listing/category URL, or product URL/ID — price, MRP, discount, brand, rating, sizes, stock, seller, images, and specs. HTTP-only, MCP-ready.",
        "version": "1.0",
        "x-build-id": "V2BxWlT3xtdJ3payj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~myntra-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-myntra-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/khadinakbar~myntra-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-myntra-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/khadinakbar~myntra-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-myntra-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "search": {
                        "title": "Search keyword",
                        "type": "string",
                        "description": "Free-text keyword run against Myntra search (e.g. 'nike running shoes', 'women kurta'). Returns paginated product cards. Leave empty if you are using Start URLs or Product IDs instead. NOT a URL — for a specific listing page use Start URLs."
                    },
                    "startUrls": {
                        "title": "Start URLs (listing or product)",
                        "type": "array",
                        "description": "Myntra listing/category URLs (e.g. https://www.myntra.com/men-tshirts) or product URLs (ending in /<id>/buy). Each is auto-detected: listing pages are paginated, product pages return full detail. Use this to scrape an exact category, a filtered/sorted listing, or specific products. NOT for free-text search — use Search keyword for that.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "productIds": {
                        "title": "Product IDs",
                        "type": "array",
                        "description": "Bare numeric Myntra product/style IDs (e.g. 42879609) to scrape full product-detail records. Each ID is resolved directly to its detail page. Use when you already have IDs and do not need search. NOT brand names — these must be the numeric IDs from a product URL.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "enrichDetails": {
                        "title": "Enrich with product details",
                        "type": "boolean",
                        "description": "When enabled, each search/listing result is followed to its product-detail page for sizes, seller, specs, images, and description (billed at the higher detail rate). When disabled, only fast listing-card fields are returned. Defaults to false. Ignored for Product IDs, which always return full detail.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max products",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of product records to return across all inputs (hard cap on billing). Pagination stops once this is reached. Defaults to 100. Set lower for a quick sample or higher for bulk catalog pulls.",
                        "default": 100
                    },
                    "pincode": {
                        "title": "Delivery pincode",
                        "type": "string",
                        "description": "Indian 6-digit delivery pincode used for price and serviceability context (e.g. '110001' for Delhi). Affects regional pricing and stock signals. Defaults to 110001. Most users can leave this as-is.",
                        "default": "110001"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy used for requests. Defaults to Apify Proxy (datacenter), which is required — Myntra blocks Apify's raw server IP, while the actor's TLS fingerprint is what passes the anti-bot. Switch to residential or provide custom proxy URLs only if you observe blocks. Disabling the proxy falls back to Apify Proxy automatically.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
