H&M API endpoint
Runs a free-text keyword search on H&M and returns products with pricing, images, colors, and per-size stock, plus search-quality metadata (a spelling-correction suggestion, related searches, and a content-filter flag). Unlike category browsing, an obscure or nonsense keyword returns a genuine empty result (zero products) rather than a fallback set. Pagination is page-based and real: requesting a page beyond the real last page returns a normal response with an empty products array rather than an error.
/hm/searchquery is required, a free-text search keyword (e.g. jeans). page is optional, one-based, defaults to 1. page_size is optional, 1 to 72, defaults to 36.
Notable response behavior:
total_pages, total_hits, and products all zero/empty) rather than a fallback or recommended set.page returns identical results on repeat requests, and different pages return different, non-overlapping products.page beyond the real last page returns a normal 200 with an empty products array. total_pages and total_hits stay at their real, nonzero values in that case, distinguishing it from a genuinely empty search, where both are 0.search_meta.did_you_mean and search_meta.related_searches are spelling-correction and related-query suggestions from H&M's own search backend -- they are commonly empty arrays.search_meta.blocked reflects H&M's own content-filter flag for the query; its exact trigger conditions are not documented by H&M.products[].id can carry a leading zero, so it is returned as a string, not a number.products[].colors[] lists every purchasable color for that product's own search entry, each with its own image and product-page URL.products[].sizes[] lists every size H&M's search result offers for the displayed color, each with its own live stock count.| Field | Filled in, of 36 checked | Values in the sample |
|---|---|---|
| id | 36 | |
| name | 36 | “Harper High Rise Wide Leg Jeans” and 12 other values |
| brand | 36 | H&M in all 36 |
| url | 36 | www2.hm.com |
| image_url | 36 | image.hm.com |
| model_image_url | 36 | image.hm.com |
| price | 36 | 11.99 to 40.99, median 30.99 |
| formatted_price | 36 | “$27.99” and 10 other values |
| currency | 36 | USD in all 36 |
| availability | 36 | Available in all 36 |
| category_code | 36 | |
| colors | 36 | median 3 entries |
| sizes | 36 | median 12 entries |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| query | string | Yes | Free-text search keyword | jeans | |
| page | integer | No | 1 | Page number, one-based, defaults to 1 | 1 |
| page_size | integer | No | 36 | Results per page, 1 to 72, defaults to 36 | 36 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/hm/search?query=jeans&page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "jeans",
"page": 1,
"page_size": 2,
"total_pages": 428,
"total_hits": 1282,
"count": 2,
"search_meta": {
"query": "jeans",
"blocked": false
},
"source_url": "https://api.hm.com/search-services/v1/en_us/search/resultpage?query=jeans...",
"fetched_at": "2026-08-10T07:20:00Z",
"products": [
{
"id": "1353272003",
"name": "Loose-Fit Wide-Leg Jeans",
"brand": "H&M",
"url": "https://www2.hm.com/en_us/productpage.1353272003.html",
"image_url": "https://image.hm.com/assets/hm/f0/6c/f06c95bea9e108346fe16cbeea3b3a29b6e93c55.jpg",
"price": 19.99,
"formatted_price": "$19.99",
"currency": "USD",
"availability": "Available",
"colors": [
{
"article_id": "1353272003",
"name": "Light denim blue/polka dot",
"color_code": "80AAD8",
"url": "https://www2.hm.com/en_us/productpage.1353272003.html",
"image_url": "https://image.hm.com/assets/hm/f0/6c/f06c95bea9e108346fe16cbeea3b3a29b6e93c55.jpg"
}
],
"sizes": [
{
"id": "008",
"label": "1½-2Y",
"stock": 2
}
]
}
]
}
}Request schema
No body schema
Response schema
#/definitions/hm.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | hm.SearchResponse | No | ||||
| data.count | integer | No | ||||
| data.fetched_at | string | No | ||||
| data.page | integer | No | ||||
| data.page_size | integer | No | ||||
| data.products | array | No | ||||
| data.products[].availability | string | No | ||||
| data.products[].brand | string | No | ||||
| data.products[].category_code | string | No | ||||
| data.products[].colors | array | No | ||||
| data.products[].colors[].article_id | string | No | ||||
| data.products[].colors[].color_code | string | No | ||||
| data.products[].colors[].image_url | string | No | ||||
| data.products[].colors[].name | string | No | ||||
| data.products[].colors[].url | string | No | ||||
| data.products[].coming_soon | boolean | No | ||||
| data.products[].currency | string | No | ||||
| data.products[].formatted_price | string | No | ||||
| data.products[].id | string | No | ||||
| data.products[].image_url | string | No | ||||
| data.products[].model_image_url | string | No | ||||
| data.products[].name | string | No | ||||
| data.products[].new_arrival | boolean | No | ||||
| data.products[].price | number | No | ||||
| data.products[].sizes | array | No | ||||
| data.products[].sizes[].id | string | No | ||||
| data.products[].sizes[].label | string | No | ||||
| data.products[].sizes[].stock | integer | No | ||||
| data.products[].url | string | No | ||||
| data.query | string | No | ||||
| data.search_meta | hm.SearchMeta | No | ||||
| data.search_meta.blocked | boolean | No | ||||
| data.search_meta.did_you_mean | array | No | ||||
| data.search_meta.query | string | No | ||||
| data.search_meta.related_searches | array | No | ||||
| data.source_url | string | No | ||||
| data.total_hits | integer | No | ||||
| data.total_pages | integer | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/hm/search?query=jeans&page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"