Hm APIwww2.hm.com ↗
Access H&M US product catalog, search, sale listings, new arrivals, category navigation, product details, and store locations via a structured API.
What is the Hm API?
The H&M API exposes 8 endpoints covering the full H&M US product catalog, from keyword search and category browsing to per-product variant details and physical store locations. The get_product_detail endpoint returns color variants, stock states, image galleries, and full pricing for any article code. Other endpoints handle sale listings, new arrivals, similar-item recommendations, and the complete site navigation tree.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/b11138d2-5bc5-459f-8d49-36adf6448cff/get_category_navigation' \ -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 h-m-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.
"""
H&M US Store API - Browse products, search, and find stores
Get your API key from: https://parse.bot/settings
"""
from parse_apis.h_m_us_store_api import HM, Product, ProductListing, Store, Category, RecommendationList
hm = HM(api_key="YOUR_API_KEY")
# Search for products by keyword
for product in hm.products.search(query="denim jacket", limit=5):
print(product.product_name, product.brand_name)
for price in product.prices:
print(price.formatted_price, price.price_type)
# Get full product details by article code
detail = hm.products.get(article_code="1347416001")
print(detail.product_name, detail.color_name)
for swatch in detail.swatches:
print(swatch.color_name, swatch.color_code)
# Get similar product recommendations
for rec_list in detail.similar():
print(rec_list.label, rec_list.id)
for item in rec_list.product_list:
print(item.product_name)
# Browse category listings
for listing in hm.productlistings.list(category="men/products/view-all", limit=3):
print(listing.title, listing.article_code, listing.regular_price)
# Get sale products
for item in hm.productlistings.sale(category="women/sale/view-all", limit=3):
print(item.title, item.red_price, item.discount_percentage)
# Navigate from listing to full detail
first_listing = next(iter(hm.productlistings.new_arrivals(category="men/new-arrivals/view-all", limit=1)))
full_product = first_listing.details()
print(full_product.product_name, full_product.availability.stock_state)
# Browse the category tree
for category in hm.categories.list():
print(category.node_name, category.href)
for child in category.children:
print(child.node_name)
# Find stores by city
for store in hm.stores.search(city="New York"):
print(store.name, store.city)
print(store.address.street_name, store.address.state)
for hours in store.opening_hours:
print(hours.name, hours.opens, hours.closes)
Fetch the full site navigation tree including all departments and subcategories. Returns hierarchical menu structure with nodeId, nodeName, href, and nested children for Women, Men, Kids, Baby, and other departments.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of category objects with nodeId, nodeName, href, children"
},
"sample": {
"data": {
"categories": [
{
"href": "/en_us/women.html",
"nodeId": "ladies-women",
"children": [
{
"href": "/en_us/women/new-arrivals.html",
"nodeId": "ladies-new-arrivals-0-women-new-arrivals",
"children": [],
"nodeName": "New in"
}
],
"nodeName": "Women"
}
]
},
"status": "success"
}
}About the Hm API
Product Discovery and Search
The search_products endpoint accepts a query string and returns up to 45 products per page, with hits containing productName, id, prices, swatches, sizes, and availability. Results also include facets for downstream filtering and a pagination object (currentPage, nextPageNum, totalPages). The get_product_listing endpoint works similarly but scopes results to a category path — for example men/products/view-all or kids/girls/products/view-all — returning up to 36 products per page with the same pricing and swatch fields.
Product Detail and Variants
get_product_detail accepts either an article_code (e.g. 0685816001) or a full product URL. The response includes a variations object that maps each variant article code to its color, price, and availability data, an images array with url and assetType per image, and a swatches array listing every available colorName and articleId. The prices array differentiates price types via a priceType field, which is useful for identifying marked-down items.
Sale, New Arrivals, and Recommendations
get_sale_products scopes listings to sale sections (e.g. women/sale/view-all) and returns regularPrice, redPrice, and discountPercentage alongside standard product fields. get_new_arrivals follows the same pagination structure but targets new-arrivals paths. get_similar_items accepts an article_code and returns a recommendationLists array with named lists — style_with, alternatives, and upsell — each containing related products with pricing.
Navigation and Store Finder
get_category_navigation returns the full hierarchical menu as a categories array with nodeId, nodeName, href, and nested children, covering Women, Men, Kids, Baby, and other departments. get_store_finder returns US store locations with name, city, address, coordinates, and openingHours. An optional city parameter filters results by case-insensitive substring match.
The Hm API is a managed, monitored endpoint for www2.hm.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when www2.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 www2.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?+
- Build a price-tracking tool using
get_sale_productsto monitordiscountPercentageandredPricechanges over time. - Populate a product feed for affiliate marketing using
get_product_listingcategory paths withprices,swatches, andarticleCode. - Drive a fashion recommendation widget by chaining
get_product_detailwithget_similar_itemson the returnedarticleCode. - Index H&M's category taxonomy for a site map or faceted navigation using the
nodeId,nodeName, andhreffields fromget_category_navigation. - Display real-time new-arrivals for a department by calling
get_new_arrivalswith a category path likemen/new-arrivals/view-all. - Show nearby store hours in a local commerce app using
get_store_finderfiltered bycitywithcoordinatesandopeningHours. - Aggregate search results and facets from
search_productsto analyze what H&M stocks for a given keyword.
| 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?+
What does `get_product_detail` return beyond basic product info?+
variations object mapping every color/size variant's articleId to its colorName, prices, and availability (including stockState). It also includes an images array typed by assetType and a swatches array listing all available colors — so you get the full variant matrix, not just the default selection.Does the API return product reviews or ratings?+
Is the store finder limited to US locations?+
get_store_finder returns US stores only, matching the API's overall scope of the H&M US site. It supports optional substring filtering by city but does not cover international H&M stores. You can fork this API on Parse and revise it to target other regional H&M domains.How does pagination work across the listing endpoints?+
get_product_listing and get_sale_products return up to 36 products per page; search_products returns up to 45. All listing endpoints expose a pagination object with currentPage, nextPageNum, totalPages, and pageSize. Pass an integer page parameter (1-based) to advance through results.