# Myntra Scraper (`scrapedo/myntra-scraper`) Actor

Scrape Myntra listings and searches with real pagination: price, MRP, discount, rating and sizes, plus stock and price per size and seller from product pages. Free trial, no per-result fee, JSON or CSV. Powered by Scrape.do.

- **URL**: https://apify.com/scrapedo/myntra-scraper.md
- **Developed by:** [scrapedo](https://apify.com/scrapedo) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Myntra Scraper

Scrape product data from [Myntra](https://www.myntra.com), India's largest fashion marketplace: **price, MRP, discount, rating and sizes** for every product in a listing or search, with **real pagination**, plus optional **stock and price per size and seller** from each product page.

**Free to try:** run it without any setup and get up to 50 products per run. Add your free Scrape.do API token to remove the limit.

### Why most Myntra scrapers fail

1. **Akamai Bot Manager.** A script doesn't get an error from Myntra, it gets nothing: the connection opens and hangs until it times out. This actor fetches every page through the [Scrape.do](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=myntra-scraper) web scraping API, which returns the full page with a plain request: no browser, 1 credit per page.
2. **`?p=2` returns page 1.** Myntra's listing pages ignore the page parameter, so a scraper that loops over `?p=2`, `?p=3` collects the same 50 products again and again. Real pages come from Myntra's search API, which needs the session cookies from a page visit and a `pagination-context` cursor that every response hands back. The actor does that loop for you.
3. **Ads mixed in.** Each listing page carries sponsored products in a separate array. They are left out.

### What data you get

| Field | Description |
|---|---|
| `productId`, `name`, `brand` | Myntra style id, product name and brand |
| `priceInr`, `mrpInr`, `discountPct` | Selling price and printed MRP in rupees, and the discount |
| `rating`, `ratingCount` | Average rating and number of ratings |
| `sizes`, `articleType`, `gender`, `colour` | Sizes offered, product type, gender and colour |
| `image`, `url` | Main image and product page |
| `unitsInStock`, `sizesInStock`, `sizesTotal` | With **Add product details** on, or for product URLs |
| `lowestSizePriceInr`, `highestSizePriceInr`, `sellers` | Price range across sizes and sellers, and the seller names |
| `sizeDetails` | One entry per size and seller: `size`, `skuId`, `available`, `seller`, `priceInr`, `mrpInr`, `units` |
| `countryOfOrigin`, `attributes` | Country of origin and Myntra's attribute table (fabric, fit, neck...) |
| `listingPriceInr` | With details on: the price the listing card showed |
| `sourceUrl`, `scrapedAt` | Where and when the row was scraped |

**Why per size and seller?** A listing card has one price. On the product page each size lists its sellers, each with its own price and exact stock. A T-shirt listed at ₹389 can cost ₹402 in the size you want because only a second seller stocks it.

### How to use it

1. **Listings and searches:** paste any listing or search URL, with your sort and filters (`myntra.com/men-tshirts?sort=new`, `myntra.com/levis?rawQuery=levis`). Set **Pages per listing**; each page is 50 products.
2. **Product details:** turn on **Add product details** to open each product page as well (one extra request per product).
3. **Product URLs:** paste product URLs (`myntra.com/.../<id>/buy` or `myntra.com/<id>`) to get stock and price per size for specific products.

#### Input example

```json
{
    "startUrls": ["https://www.myntra.com/men-tshirts?sort=new"],
    "maxPagesPerListing": 5,
    "includeProductDetails": false,
    "maxItems": 500,
    "scrapeDoToken": "YOUR_SCRAPEDO_TOKEN"
}
```

#### Output example

One item per product. Example (fictional product, illustrative values, details on):

```json
{
    "productId": 90000001,
    "name": "Example Men Solid Cotton Tshirt",
    "brand": "Northwind Basics",
    "priceInr": 449,
    "mrpInr": 999,
    "discountPct": 55,
    "rating": 4.31,
    "ratingCount": 1520,
    "sizes": "S,M,L,XL",
    "articleType": "Tshirts",
    "colour": "Navy Blue",
    "unitsInStock": 55,
    "sizesInStock": 3,
    "sizesTotal": 4,
    "lowestSizePriceInr": 449,
    "highestSizePriceInr": 469,
    "sellers": "Example Retail One | Example Retail Two",
    "sizeDetails": [
        { "size": "M", "available": true, "seller": "Example Retail Two", "priceInr": 449, "mrpInr": 999, "units": 5 },
        { "size": "M", "available": true, "seller": "Example Retail One", "priceInr": 469, "mrpInr": 999, "units": 30 }
    ],
    "url": "https://www.myntra.com/tshirts/northwind-basics/example-men-solid-cotton-tshirt/90000001/buy",
    "sourceUrl": "https://www.myntra.com/men-tshirts?sort=new",
    "scrapedAt": "2026-11-02T09:00:00.000Z"
}
```

Download the results as JSON, CSV, Excel or HTML from the run's **Output** tab, or pull them through the Apify API.

### Pricing and your Scrape.do token

There is no per-result fee for this actor; Apify only bills its normal platform usage. Pages are fetched through the Scrape.do web scraping API:

1. **Free trial, no token:** leave the **Scrape.do API token** field empty and you get up to 50 products per run.
2. **Your own Scrape.do token:** no product limit. Each request is 1 Scrape.do credit: one page visit per listing, one per page of 50, one per product page. Five pages of a listing (250 products) cost 6 credits. [Create a free Scrape.do account](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=myntra-scraper) for 1,000 free credits a month.

### Good to know

- **One location.** Prices and stock are what Myntra shows without a delivery pincode.
- **Sessions.** Some page visits come back with an incomplete session that the search API rejects (401). The actor repeats the visit until Myntra hands out a full session, and refreshes it if the API still refuses.
- **Prefer Python?** The same logic is an open-source package: `pip install myntra-scraper` ([GitHub](https://github.com/bugrahansss/myntra-scraper)).

### FAQ

**Is scraping Myntra legal?** The actor reads listing, search and product pages, which Myntra's robots.txt allows, and never touches cart, checkout or account paths. Product names, prices and stock are not personal data. Read Myntra's terms of use for your use case and keep request rates modest. This is not legal advice.

**Something broke or a field is missing?** Open an issue in the Issues tab and we will look at it.

# Actor input Schema

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

Listing or search URLs (myntra.com/men-tshirts, myntra.com/levis?rawQuery=levis, with any sort or filter) and/or product URLs (myntra.com/.../<id>/buy or myntra.com/<id>).

## `maxPagesPerListing` (type: `integer`):

Pages of 50 products to read for each listing or search URL. Myntra ignores ?p=2 in the page itself, so pages 2+ come from its search API: one page visit plus one request per page.

## `includeProductDetails` (type: `boolean`):

Also open each product page and add stock and price per size and seller (sizeDetails), units in stock, sizes in stock, sellers, country of origin and attributes. One extra request per product.

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

Stop after this many products in total. Set 0 for no limit. Without your own Scrape.do token the free trial returns up to 50 products per run.

## `scrapeDoToken` (type: `string`):

Optional. Find it in your Scrape.do dashboard. Leave empty for the free trial (up to 50 products per run).

## `maxConcurrency` (type: `integer`):

How many product pages are fetched at the same time when you use your own token. Keep it at or below your Scrape.do plan's concurrency.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.myntra.com/men-tshirts?sort=new"
  ],
  "maxPagesPerListing": 1,
  "includeProductDetails": false,
  "maxItems": 10,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `products` (type: `string`):

No description

## `allFields` (type: `string`):

No description

# 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 = {
    "startUrls": [
        "https://www.myntra.com/men-tshirts?sort=new"
    ],
    "maxPagesPerListing": 1,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapedo/myntra-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 = {
    "startUrls": ["https://www.myntra.com/men-tshirts?sort=new"],
    "maxPagesPerListing": 1,
    "maxItems": 10,
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.myntra.com/men-tshirts?sort=new"
  ],
  "maxPagesPerListing": 1,
  "maxItems": 10
}' |
apify call scrapedo/myntra-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapedo/myntra-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TqIxEnI4tyd2UBj97/builds/uKthbmfI6kscNEYma/openapi.json
