hm.com APIwww.hm.com ↗
Access H&M US product catalog via API. Search by keyword, retrieve prices, sizes, stock status, color variants, and images for any H&M article.
curl -X GET 'https://api.parse.bot/scraper/d7e79149-f317-41bf-a1f3-cc435e8b63e5/search_products?page=1&query=dress' \ -H 'X-API-Key: $PARSE_API_KEY'
Search H&M products by keyword with pagination. Returns product listings with name, price, images, product URL, color swatches, and category.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination |
| queryrequired | string | Search keyword (e.g., 'jacket', 'dress', 'shoes') |
{
"type": "object",
"fields": {
"query": "search keyword echoed back",
"products": "array of product objects with article_code, title, brand, price, prices, product_url, image_product, image_model, gallery_images, category, is_new, is_out_of_stock, swatches",
"pagination": "object with page, page_size, total_pages, total_items",
"total_hits": "total number of matching products"
},
"sample": {
"data": {
"query": "dress",
"products": [
{
"brand": "H&M",
"price": "$59.99",
"title": "Braided-Detail Dress",
"is_new": true,
"prices": [
{
"price": 59.99,
"price_type": "whitePrice",
"formatted_price": "$59.99"
}
],
"category": "ladies_dresses_aline",
"swatches": [
{
"hex_color": "#785F3A",
"color_link": "https://www2.hm.com/en_us/productpage.1344935001.html",
"color_name": "Dark golden beige"
}
],
"image_model": "https://image.hm.com/assets/hm/a3/47/a347ae077123b3db42fe7e586fa71816020d227a.jpg",
"product_url": "https://www2.hm.com/en_us/productpage.1344935001.html",
"article_code": "1344935001",
"image_product": "https://image.hm.com/assets/hm/2e/c6/2ec6f5955e1a4e209a3cfa258d4c1a6cdd13ce0f.jpg",
"gallery_images": [
{
"url": "https://image.hm.com/assets/hm/2e/c6/2ec6f5955e1a4e209a3cfa258d4c1a6cdd13ce0f.jpg"
}
],
"is_out_of_stock": false
}
],
"pagination": {
"page": 1,
"page_size": 36,
"total_items": 1947,
"total_pages": 55
},
"total_hits": 1947
},
"status": "success"
}
}About the hm.com API
The H&M API provides 2 endpoints covering the US product catalog, letting you search by keyword and retrieve per-article detail. The search_products endpoint returns paginated listings with prices, image URLs, and color swatches, while get_product_details returns size-level stock status, color variants, structured pricing, and product descriptions — all indexed by H&M article code.
Search the H&M Catalog
The search_products endpoint accepts a query string (e.g., 'jacket', 'linen trousers') and an optional page integer for pagination. Each result in the products array includes article_code, title, brand, price, a prices array, product_url, image_product, image_model, and gallery_images. The pagination object carries page, page_size, total_pages, and total_items, and total_hits gives the full result count across all pages.
Per-Article Detail
Passing an article_code from search results to get_product_details returns a richer object. The sizes array lists each size label alongside an in_stock boolean, so you can tell at a glance which sizes are currently available. The colors array exposes all color variants for that style — each entry has article_id, color_name, color_code, product_image, and a direct url to that variant. The prices array is structured with price_type, price, formatted_price, min_price, and max_price fields, making it straightforward to detect sale or range pricing.
Additional Fields
get_product_details also returns a description string, a model_image URL, an images array of additional product photography, an is_new boolean flagging new arrivals, and a category field containing the internal category code. Together these fields give you enough data to render a full product page or feed a price-monitoring pipeline without additional requests.
- Track price changes on specific H&M articles by polling
get_product_detailsand comparing thepricesarray over time. - Build a size availability checker that surfaces only in-stock sizes using the
sizes[].in_stockfield. - Aggregate H&M new arrivals by filtering
get_product_detailsresults whereis_newis true. - Populate a product feed or affiliate catalog with structured titles, images, and URLs from
search_products. - Compare color variant availability across a style by iterating the
colorsarray returned byget_product_details. - Power a fashion search tool that queries H&M by category keyword and paginates through all matching results.
- Monitor whether specific sizes go in or out of stock for restock notification workflows.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does H&M offer an official developer API?+
How does the `get_product_details` endpoint handle products with multiple color variants?+
colors array returns one object per color variant, each containing its own article_id, color_name, color_code, product_image, and url. Because each color variant has a distinct article_id, you can call get_product_details separately for each variant to get that variant's specific size availability and pricing.Does the API cover H&M stores outside the United States?+
Are customer reviews or ratings available through this API?+
What is the `article_code` field and where do I get it?+
search_products response includes an article_code string that uniquely identifies that product in H&M's catalog. Pass that value directly as the article_code input to get_product_details to retrieve full product information for that item.