H&M
H&M Product API
One H&M article by article code or hm.com link, on 38 markets: title, category and breadcrumbs, description, composition, materials, care, fit and length attributes, price, regular price, sale price, member price, discount and H&M's price disclosure, every colourway with its own prices, sizes with online stock and a few-left flag, images, and the rating with the latest 10 reviews H&M shows, each with fit feedback. Costs 2 credits per request.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonarticle_codestringAn H&M article code: 10 digits (the 7-digit product code plus a 3-digit colour), from search, a grid or a product link. The same code in every market. Send article_code or url.
Example: 1310382004
urlstringAn hm.com product link (https://www2.hm.com/<locale>/productpage.<article code>.html). Its market is used unless country is sent.
Example: https://www2.hm.com/en_us/productpage.1310382004.html
countrystringdefault:usThe H&M market, as a lowercase country code. This endpoint serves 38 countries: every H&M online store of its own except mo and tw (us, ca, mx, gb, ie, de, at, ch, fr, be, nl, it, es, pt, se, fi, dk, no, pl, cz, sk, hu, ro, bg, gr, rs, tr, ua, il, hk, jp, kr, in, my, ph, sg, vn, au). mo, tw and the shared EU store countries (hr, cy, ee, lv, lt, lu, si) answer 400, not charged: use search or stock there, which carry prices, colours and sizes. Prices come back in the market's currency, never converted; every answer echoes country, language, currency, locale and store. ae, eg, id, th, br and cn (H&M runs a separate site there), al, az, ba, by, cl, co, cr, ge, is, kh, kz, mk, nz, pe, xk and za (no H&M online store), ru, and uk (send gb) answer 400, not charged.
Example: us
us— United States, USD, en (English). The default.ca— Canada, CAD, en (English) or fr (French); default en.mx— Mexico, MXN, es (Spanish).gb— United Kingdom, GBP, en (English).ie— Ireland, EUR, en (English).de— Germany, EUR, de (German).at— Austria, EUR, de (German).ch— Switzerland, CHF, de (German) or fr (French) or it (Italian); default de.fr— France, EUR, fr (French).be— Belgium, EUR, nl (Dutch) or fr (French); default nl.nl— Netherlands, EUR, nl (Dutch).it— Italy, EUR, it (Italian).es— Spain, EUR, es (Spanish).pt— Portugal, EUR, pt (Portuguese).se— Sweden, SEK, sv (Swedish).fi— Finland, EUR, fi (Finnish) or sv (Swedish); default fi.dk— Denmark, DKK, da (Danish).no— Norway, NOK, no (Norwegian).pl— Poland, PLN, pl (Polish).cz— Czechia, CZK, cs (Czech).sk— Slovakia, EUR, sk (Slovak).hu— Hungary, HUF, hu (Hungarian).ro— Romania, RON, ro (Romanian).bg— Bulgaria, EUR, bg (Bulgarian).gr— Greece, EUR, el (Greek).rs— Serbia, RSD, sr (Serbian).tr— Turkey, TRY, tr (Turkish).ua— Ukraine, UAH, uk (Ukrainian).il— Israel, ILS, he (Hebrew).hk— Hong Kong, HKD, zh (Chinese) or en (English); default zh.jp— Japan, JPY, ja (Japanese).kr— South Korea, KRW, ko (Korean).in— India, INR, en (English).my— Malaysia, MYR, en (English).ph— Philippines, PHP, en (English).sg— Singapore, SGD, en (English).vn— Vietnam, VND, vi (Vietnamese).au— Australia, AUD, en (English).
languagestringThe answer's language, from the market's own list (the first is the default): ca en or fr; ch de, fr or it; be nl or fr; fi fi or sv; hk, mo and tw zh or en; every other market its one language (see the markets table). Titles, descriptions, colours and facet values come back in it. A language the market does not serve answers 400, not charged.
Example: fr
Request
from scavio import ScavioClient
# Product reads H&M's product page: allow up to a minute.
client = ScavioClient(api_key="sk_live_your_key", timeout=120)
p = client.hm.product(article_code="1310382004", country="us")["data"]
print(p["title"], p["price"], p["member_price"], p["currency"])
for c in p["colors"]:
print(c["article_code"], c["name"], c["price"], c["sale_price"], c["price_disclosure"])
print(p["rating"], [s["label"] for s in p["sizes"] if s["in_stock"]])Response