API · H&M
GET /hm/search
Search H&M's catalogue on one country site.
| Request | GET /v1/hm/search |
| Operation id | hm.search.all |
| Cost | 3 credits, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Search H&M's catalogue on one country site.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search words. Example: jeans. |
page | integer | no | |
limit | integer | no | |
sort_by | "relevance" | "newest" | "price_low" | "price_high" | no | One of relevance, newest, price_low, price_high. |
language | string | no | H&M locale path (en_us default, en_gb, de_de, sv_se…). |
filters | string | no | hm.com URL filter parameters, k=v&k=v. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | A page of products. | HmSearch |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | Nothing matched. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | H&M is temporarily unavailable. Retryable; nothing was charged. | Error |
HmSearch fields
| Field | Type | Description |
|---|---|---|
query | string | |
locale | string | |
page | number | |
total | number | null | |
pagination | object | null | |
currency | string | null | |
hits | object[] | |
facets | object[] | |
related_searches | object[] |
Errors use one shape everywhere; see Errors for every code and what to do.