---
title: "H&M API: JSON data, 2 endpoints, 1 credit per call"
description: "H&M API for product search by locale with category, sort and filters, and product details with colours, sizes and stock, as JSON. 1 credit per call."
url: https://perceptlayer.com/apis/hm
---

[APIs](https://perceptlayer.com/apis) / [Marketplaces](https://perceptlayer.com/verticals/marketplaces) / H&M

1 credit per call 2 endpoints 21 datapoints

# H&M API

H&M API for product search by locale with category, sort and filters, and product details with colours, sizes and stock, as JSON. 1 credit per call.

[Get a free API key](https://perceptlayer.com/signup) Run it below

H&M

GET /v1/hm/search?query=jeans&locale=en\_us&sort=PRICE\_ASCENDING 

```
{
  "success": true,
  "data": {
    "query": "jeans",
    "locale": "en_us",
    "currency": "USD",
    "page": 1,
    "page_size": 36,
    "sort": "PRICE_ASCENDING",
    "total": 1335,
    "total_pages": 38,
    "items": [
      {
        "article_id": "1342508001",
        "name": "Stretch Jeans",
        "brand": "H&M",
        "url": "https://www2.hm.com/en_us/productpage.1342508001.html",
        "image_url": "https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg",
        "model_image_url": "https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg",
        "images": [
          {
            "url": "https://image.hm.com/assets/hm/31/4b/314b9463fc114d62bc5f35f9a5e112e6b76dcc52.jpg",
            "type": "DescriptiveDetail"
          },
          {
            "url": "https://image.hm.com/assets/hm/08/1f/081fbf910432bffdd8c6278d7bb459f51b8005c9.jpg",
            "type": "DescriptiveDetail"
          }
        ],
        "price": 9.99,
        "currency": "USD",
        "member_price": 8.49,
        "colour": "Dark denim blue",
        "colour_code": "79829D",
        "colour_shades": [
          "Bright blue",
          "Pastel blue",
          "Blue gray"
        ],
        "colours": [
          {
            "article_id": "1342508001",
            "name": "Dark denim blue",
            "code": "79829D",
            "image_url": "https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508001.html"
          },
          {
            "article_id": "1342508002",
            "name": "Light denim blue",
            "code": "80AAD8",
            "image_url": "https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508002.html"
          },
          {
            "article_id": "1342508003",
            "name": "Dark gray",
            "code": "272627",
            "image_url": "https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508003.html"
          }
        ],
        "sizes": [
          {
            "id": "004",
            "label": "4-6M",
            "availability": "in_stock"
          },
          {
            "id": "005",
            "label": "6-9M",
            "availability": "in_stock"
          },
          {
            "id": "006",
            "label": "9-12M",
            "availability": "in_stock"
          }
        ],
        "in_stock": true,
        "coming_soon": false,
        "category_code": "kids_baby_boy_clothing_trousersjeans_jeans",
        "is_new": false,
        "is_multipack": false,
        "has_video": false
      },
      {
        "article_id": "1342508002",
        "name": "Stretch Jeans",
        "brand": "H&M",
        "url": "https://www2.hm.com/en_us/productpage.1342508002.html",
        "image_url": "https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg",
        "model_image_url": "https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg",
        "images": [
          {
            "url": "https://image.hm.com/assets/hm/ed/8f/ed8f5bb2d31940b0e9e45a0237fbcd23365b4f04.jpg",
            "type": "DescriptiveDetail"
          },
          {
            "url": "https://image.hm.com/assets/hm/75/ee/75ee7a20dedc97a56b6e4cf8cbe433eec41d6c75.jpg",
            "type": "DescriptiveDetail"
          }
        ],
        "price": 9.99,
        "currency": "USD",
        "member_price": 8.49,
        "colour": "Light denim blue",
        "colour_code": "80AAD8",
        "colour_shades": [
          "Bright blue",
          "Pastel blue",
          "Blue gray"
        ],
        "colours": [
          {
            "article_id": "1342508002",
            "name": "Light denim blue",
            "code": "80AAD8",
            "image_url": "https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508002.html"
          },
          {
            "article_id": "1342508001",
            "name": "Dark denim blue",
            "code": "79829D",
            "image_url": "https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508001.html"
          },
          {
            "article_id": "1342508003",
            "name": "Dark gray",
            "code": "272627",
            "image_url": "https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508003.html"
          }
        ],
        "sizes": [
          {
            "id": "004",
            "label": "4-6M",
            "availability": "in_stock"
          },
          {
            "id": "005",
            "label": "6-9M",
            "availability": "in_stock"
          },
          {
            "id": "006",
            "label": "9-12M",
            "availability": "in_stock"
          }
        ],
        "in_stock": true,
        "coming_soon": false,
        "category_code": "kids_baby_boy_clothing_trousersjeans_jeans",
        "is_new": false,
        "is_multipack": false,
        "has_video": false
      },
      {
        "article_id": "1342508003",
        "name": "Stretch Jeans",
        "brand": "H&M",
        "url": "https://www2.hm.com/en_us/productpage.1342508003.html",
        "image_url": "https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg",
        "model_image_url": "https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg",
        "images": [
          {
            "url": "https://image.hm.com/assets/hm/e8/f2/e8f2066c01884c398ea3e41e2529c5fcbdd3cbcd.jpg",
            "type": "DescriptiveDetail"
          },
          {
            "url": "https://image.hm.com/assets/hm/2b/53/2b530a1bc3af44edb9ad868ff73a008120345e47.jpg",
            "type": "DescriptiveDetail"
          }
        ],
        "price": 9.99,
        "currency": "USD",
        "member_price": 8.49,
        "colour": "Dark gray",
        "colour_code": "272627",
        "colour_shades": [
          "Charcoal"
        ],
        "colours": [
          {
            "article_id": "1342508003",
            "name": "Dark gray",
            "code": "272627",
            "image_url": "https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508003.html"
          },
          {
            "article_id": "1342508001",
            "name": "Dark denim blue",
            "code": "79829D",
            "image_url": "https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508001.html"
          },
          {
            "article_id": "1342508002",
            "name": "Light denim blue",
            "code": "80AAD8",
            "image_url": "https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg",
            "url": "https://www2.hm.com/en_us/productpage.1342508002.html"
          }
        ],
        "sizes": [
          {
            "id": "004",
            "label": "4-6M",
            "availability": "in_stock"
          },
          {
            "id": "005",
            "label": "6-9M",
            "availability": "in_stock"
          },
          {
            "id": "006",
            "label": "9-12M",
            "availability": "in_stock"
          }
        ],
        "in_stock": true,
        "coming_soon": false,
        "category_code": "kids_baby_boy_clothing_trousersjeans_jeans",
        "is_new": false,
        "is_multipack": false,
        "has_video": false
      }
    ],
    "sort_options": [
      {
        "id": "RELEVANCE",
        "label": "Relevance"
      },
      {
        "id": "NEWEST_FIRST",
        "label": "New"
      },
      {
        "id": "PRICE_ASCENDING",
        "label": "Lowest price"
      }
    ],
    "filters": [
      {
        "id": "colorWithNames",
        "name": "ColorWithNames",
        "values": [
          {
            "value": "beige_f5f5dc",
            "count": 32
          },
          {
            "value": "black_000000",
            "count": 175
          },
          {
            "value": "blue_0000ff",
            "count": 833
          }
        ]
      },
      {
        "id": "garmentLengths",
        "name": "GarmentLengths",
        "values": [
          {
            "value": "Ankle-length",
            "count": 119
          },
          {
            "value": "Extra-long legs",
            "count": 52
          },
          {
            "value": "Long",
            "count": 1148
          }
        ]
      },
      {
        "id": "clothingStyles",
        "name": "ClothingStyles",
        "values": [
          {
            "value": "Baggy",
            "count": 133
          },
          {
            "value": "Balloon Leg",
            "count": 49
          },
          {
            "value": "Barrel Leg",
            "count": 135
          }
        ]
      }
    ],
    "suggestions": [
      "jeans",
      "jeans women",
      "jeans men"
    ]
  },
  "meta": {
    "endpoint_family": "search",
    "request_id": "req_e45b859bc93548db892a1c14c56d9f7b",
    "credits_charged": 1,
    "credits_remaining": 1925
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

Sample data

## What one call returns

A recorded run of `search`: the fields and shapes you will get, shortened to 3 items.

| # | article\_id string | name string | brand string | url url | image\_url url | model\_image\_url url | images object\[\] | price number | currency string | member\_price number | colour string | colour\_code string | colour\_shades string\[\] | colours object\[\] | sizes object\[\] | in\_stock boolean | coming\_soon boolean | category\_code string | is\_new boolean | is\_multipack boolean | has\_video boolean |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 1342508001 | Stretch Jeans | H&M | https://www2.hm.com/en\_us/productpage.1342508001.html | https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg | https://image.hm.com/assets/hm/20/a9/20a9f743b1d23f1c732f1fbc1886d5bcd4ad3f15.jpg | \[2 items\] | 9.99 | USD | 8.49 | Dark denim blue | 79829D | \[3 items\] | \[3 items\] | \[3 items\] | true | false | kids\_baby\_boy\_clothing\_trousersjeans\_jeans | false | false | false |
| 2 | 1342508002 | Stretch Jeans | H&M | https://www2.hm.com/en\_us/productpage.1342508002.html | https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg | https://image.hm.com/assets/hm/c8/02/c8020aa134dae2fce4f920e37714b019dfc4cb21.jpg | \[2 items\] | 9.99 | USD | 8.49 | Light denim blue | 80AAD8 | \[3 items\] | \[3 items\] | \[3 items\] | true | false | kids\_baby\_boy\_clothing\_trousersjeans\_jeans | false | false | false |
| 3 | 1342508003 | Stretch Jeans | H&M | https://www2.hm.com/en\_us/productpage.1342508003.html | https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg | https://image.hm.com/assets/hm/f0/5d/f05dcec43d096118ea7d6e9a43453e372dedd392.jpg | \[2 items\] | 9.99 | USD | 8.49 | Dark gray | 272627 | \[1 item\] | \[3 items\] | \[3 items\] | true | false | kids\_baby\_boy\_clothing\_trousersjeans\_jeans | false | false | false |

Recorded from our API · 3 items shown · 21 datapoints per item GET /v1/hm/search?query=jeans&locale=en\_us&sort=PRICE\_ASCENDING

21 datapoints

### Identity

-   article\_id string
-   name string
-   brand string
-   category\_code string

### Contact

-   url url
-   image\_url url
-   model\_image\_url url

### Reputation

-   images object\[\]

### Price

-   price number
-   currency string
-   member\_price number

### Other

-   colour string
-   colour\_code string
-   colour\_shades string\[\]
-   colours object\[\]
-   sizes object\[\]
-   in\_stock boolean
-   coming\_soon boolean
-   is\_new boolean
-   is\_multipack boolean
-   has\_video boolean

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/hm/search?query=jeans&locale=en_us&sort=PRICE_ASCENDING" \
  -H "X-API-Key: $API_KEY"
```

H&M · 2 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters and an example request.

| Endpoint | Required parameters | Cost |
| --- | --- | --- |
| [GET `/v1/hm/product`](https://perceptlayer.com/apis/hm/product) | none +3 optional | 1 credit |
| [GET `/v1/hm/search`](https://perceptlayer.com/apis/hm/search) | none +6 optional | 1 credit |

Overview

## About the H&M API

## What you can get

The H&M API returns H&M shop data as JSON through 2 endpoints. Both take a `locale` (en\_us, de\_de, en\_gb, fr\_fr, sv\_se, en\_in, pl\_pl or es\_es).

-   **Search:** `search` takes a `query` or a `category`, with `page`, `sort` (RELEVANCE, NEWEST\_FIRST, PRICE\_ASCENDING or PRICE\_DESCENDING) and `filters`.
-   **Products:** `product` takes an `article_id` or a product `url`.

The recorded search for "jeans" in en\_us, sorted by PRICE\_ASCENDING, returns `items`, each with `article_id`, `name`, `brand`, `url`, `image_url`, `price`, `currency`, `member_price`, `colour`, `colours`, `sizes`, `in_stock`, `coming_soon`, `category_code` and `is_new`. It also returns `total` (1335 in that recording), `total_pages`, `sort_options`, `filters` and `suggestions`.

## How a call works

Search a locale, then look up: `GET /v1/hm/search?query=jeans&locale=en_us&sort=PRICE_ASCENDING` with your key in the `X-API-Key` header. Each result carries an `article_id`; `product` takes that `article_id`. Every successful call costs 1 credit; failed calls cost nothing.

Marketplaces JSON REST MCP

### More marketplaces APIs

[About You](https://perceptlayer.com/apis/about-you) [adidas](https://perceptlayer.com/apis/adidas) [AliExpress](https://perceptlayer.com/apis/aliexpress) [Allegro](https://perceptlayer.com/apis/allegro) [Amazon](https://perceptlayer.com/apis/amazon) [ASOS](https://perceptlayer.com/apis/asos) [Billiger.de](https://perceptlayer.com/apis/billiger) [bol.com](https://perceptlayer.com/apis/bol) [Chrono24](https://perceptlayer.com/apis/chrono24) [Costco](https://perceptlayer.com/apis/costco) [Craigslist](https://perceptlayer.com/apis/craigslist) [DBA](https://perceptlayer.com/apis/dba)

Use cases

### Track H&M prices and member prices for a product list

`Use the H&M API to track H&M prices and member prices for a product list` 

### Compare one article's price across the eight locales

`Use the H&M API to compare one article's price across the eight locales` 

### Watch stock and coming-soon items for a query

`Use the H&M API to watch stock and coming-soon items for a query` 

### Follow new arrivals with \`sort=NEWEST\_FIRST\`

`` Use the H&M API to follow new arrivals with `sort=NEWEST_FIRST` `` 

FAQ

## Questions

**How much does the H&M API cost?**

Each successful call costs one credit, and each search page is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.

**Which H&M markets can I query?**

Eight locales: en\_us, de\_de, en\_gb, fr\_fr, sv\_se, en\_in, pl\_pl and es\_es, set with \`locale\`.

**Do I need an H&M account?**

No. You call this H&M API with your Perceptlayer key in the \`X-API-Key\` header, with no H&M login.

**What format are responses in?**

Every endpoint returns JSON, with no HTML parsing on your side.

**Should I build a H&M scraper instead?**

You can, but a H&M scraper is code you maintain: page changes break it, requests get blocked, and H&M's terms govern how you collect data. The H&M API gives you 2 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

## Try the H&M API with 100 free credits

No credit card. Failed calls are never billed.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://docs.perceptlayer.com)
