Hm APIhm.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.
What is the Hm 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.
curl -X GET 'https://api.parse.bot/scraper/d7e79149-f317-41bf-a1f3-cc435e8b63e5/search_products?page=1&query=jacket' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace hm-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: H&M Product Search & Details — bounded, re-runnable; every call capped."""
from parse_apis.h_m_product_search___details_api import HM, ProductNotFound
client = HM()
# Search for jackets — limit caps total items fetched across pages.
for item in client.productsummaries.search(query="jacket", limit=5):
print(item.title, item.price, item.is_out_of_stock)
# Drill into the first result's full details via the navigation op.
summary = client.productsummaries.search(query="dress", limit=1).first()
if summary:
product = summary.details()
print(product.product_name, product.brand)
for size in product.sizes:
print(size.label, size.in_stock)
# Direct point-lookup by article code.
try:
detail = client.products.get(article_code="1354317002")
print(detail.product_name, detail.availability.stock_state)
for color in detail.colors:
print(color.color_name, color.color_code)
except ProductNotFound as exc:
print(f"Product not found: {exc}")
print("exercised: productsummaries.search / summary.details / products.get")
Search H&M products by keyword with pagination. Returns product listings with name, price, images, product URL, color swatches, and availability status. Uses the H&M search API which returns up to 36 products per page.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination, starting at 1 |
| queryrequired | string | Search keyword (e.g., 'jacket', 'dress', 'shoes') |
{
"type": "object",
"fields": {
"query": "string, 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": "integer, total number of matching products"
},
"sample": {
"data": {
"query": "jacket",
"products": [
{
"brand": "H&M",
"price": "$59.99",
"title": "Linen-Blend Jacket",
"is_new": false,
"prices": [
{
"price": 59.99,
"price_type": "whitePrice",
"formatted_price": "$59.99"
}
],
"category": "Dark brown",
"swatches": [
{
"url": "https://www2.hm.com/en_us/productpage.1336927005.html",
"article_id": "1336927005",
"color_code": "3C2A2B",
"color_name": "Dark brown",
"product_image": "https://image.hm.com/assets/hm/b8/b5/b8b5e5d10737110884575b2b0f6a6e0a3ae2d4e1.jpg"
}
],
"image_model": "https://image.hm.com/assets/hm/d5/a8/d5a8ccb47610547319962815dcf4a946183322d3.jpg",
"product_url": "https://www2.hm.com/en_us/productpage.1336927005.html",
"article_code": "1336927005",
"image_product": "https://image.hm.com/assets/hm/b8/b5/b8b5e5d10737110884575b2b0f6a6e0a3ae2d4e1.jpg",
"gallery_images": [
"https://image.hm.com/assets/hm/5c/bf/5cbf81502d48c8c4d5975973d9c4ddeb06c1cb0d.jpg"
],
"is_out_of_stock": false
}
],
"pagination": {
"page": 1,
"page_size": 36,
"total_items": 902,
"total_pages": 26
},
"total_hits": 902
},
"status": "success"
}
}About the Hm API
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.
The Hm API is a managed, monitored endpoint for hm.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when hm.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official hm.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- 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 | 100 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.