SerpBase
Back to Blog

Myntra Product API: Price and Size Stock as JSON

Read a Myntra product page as JSON: MRP, selling price and units in stock for every size, seller and images. Tested on two products with a per-size stock script.

November 26, 2026
By SerpBase Team3 min read

Short answer: send a Myntra product URL to /myntra/product and you get the page as JSON, including the selling price and the number of units in stock for every size.

That per-size detail is the reason to call the product page and not just the search page: Myntra search shows the MRP, while the product page knows what each size sells for today and how many are left.

The request

curl -X POST 'https://api.serpbase.dev/myntra/product' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{"url":"https://www.myntra.com/casual-shoes/hrx+by+hrithik+roshan/hrx-by-hrithik-roshan-unisex-round-toe-lace-ups-sneakers/32064729/buy"}'

What comes back

We ran this on 26 November 2026. The sneaker above came back in about 2 seconds: MRP 3,399 INR, selling price 1,169, nine sizes, of which four were in stock (29, 6, 8 and 2 units) and five were sold out.

A second product, taken from the first result of a "shoes" search, returned MRP 3,699 and a selling price of 994 with all nine sizes in stock. Size 8 there had two inventory lines: 128 units at 994 and a single unit at the full 3,699.

The main fields in product:

FieldWhat it holds
id, title, brandIdentity of the item
list_priceMRP: amount, currency (INR)
country_of_originFor example India
mediaProduct images (8 on the first test)
variantsOne entry per size: value (the size), in_stock, and inventory
variants[].inventory[]price, list_price, available_count, seller.id, procurement_time_days, manufacturer and packer details

Python: lowest price and stock by size

import requests

URL = "https://www.myntra.com/casual-shoes/hrx+by+hrithik+roshan/hrx-by-hrithik-roshan-unisex-round-toe-lace-ups-sneakers/32064729/buy"

r = requests.post(
    "https://api.serpbase.dev/myntra/product",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"url": URL},
    timeout=60,
).json()

if r["status"] != 0:
    raise SystemExit(r.get("error"))

p = r["product"]
print(p["brand"], "|", p["title"], "| MRP", p["list_price"]["amount"])
for v in p["variants"]:
    lines = v.get("inventory", [])
    if not v["in_stock"] or not lines:
        print("size", v["value"], "sold out")
        continue
    best = min(int(i["price"]["amount"]) for i in lines)
    units = sum(int(i["available_count"]) for i in lines)
    print("size", v["value"], "price", best, "units", units)

Things that trip people up

  • The selling price is inside variants, not at the top. The top-level list_price is the MRP. Read variants[].inventory[].price.
  • Sold-out sizes have no inventory. They come back with in_stock: false and nothing else, so guard before indexing.
  • A size can have more than one inventory line at different prices. Take the minimum for "price", the sum for "units".
  • Numbers are strings: "1169", "29". Convert before comparing.
  • No rating here. The product response did not include the star rating in our tests; it is in the Myntra search results.
  • Key your records on id. It is the number in the product URL (32064729 above) and the same id that search results carry.

Related endpoints

Collect product URLs with Myntra search. The equivalent for Flipkart is the Flipkart product endpoint.

Cost and limits

Each request costs 2 credits; failed requests are not charged. The response is always HTTP 200 with a status field: 0 means success, anything else comes with an error string. Credits cost $0.25–$0.50 per 1,000 depending on the plan, and new accounts get 500 free credits without a card.