Skip to content
Scrappa Get API key
H&M API 1 credit / request

H&M Article Lookup API Documentation

GET https://scrappa.co/api/hm/product

H&M Article Lookup API returns one article (one colour of a product) by its 10 digit article id or its product url: name, price, original price, sale price and discount, colours with images, sizes with availability (in_stock or out_of_stock), availability and images. Use the article_id of a search answer.

Limits: the H&M product page is not reachable, so this route finds the article in the H&M search. It has no composition, description, reviews or store stock, and the sizes carry the online availability only. An article that H&M does not list in the locale returns 404. A successful request costs 1 credit. Failed requests are not billable.

H&M Article Lookup API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/hm/product
Auth header
x-api-key
Cost
1 credit / request
Response preview
200 OK
{
    "data": {
        "url": "https://www2.hm.com/en_us/productpage.1272095006.html",
        "name": "Flared Jeggings",
        "brand": "H&M",
        "price": 7.49,
        "sizes": [
            {
                "id": "008",
                "label": "1\u00bd-2Y",
                "availability": "in_stock"
            },
            {
                "id": "009",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

This endpoint has no required query parameters.

3 optional filters available.

article_id string Optional

10 digit article id, for example 1331684001. Send article_id or url.

Example value 1234567890
url string Optional
Open example

Full H&M product page url, for example https://www2.hm.com/en_us/productpage.1331684001.html. Send url or article_id.

Example value https://example.com/product
locale string Optional

Locale: en_us (default), de_de, en_gb, fr_fr, sv_se, en_in, pl_pl or es_es. Must match the url.

Example value en-US

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "url": "https://www2.hm.com/en_us/productpage.1272095006.html",
        "name": "Flared Jeggings",
        "brand": "H&M",
        "price": 7.49,
        "sizes": [
            {
                "id": "008",
                "label": "1\u00bd-2Y",
                "availability": "in_stock"
            },
            {
                "id": "009",
                "label": "2-3Y",
                "availability": "out_of_stock"
            },
            {
                "id": "010",
                "label": "3-4Y",
                "availability": "out_of_stock"
            }
        ],
        "colour": "Light gray",
        "images": [
            {
                "url": "https://image.hm.com/assets/hm/13/f2/13f26f0e9bf441fa0d2114d9a0c06880817b5c6d.jpg",
                "type": "DescriptiveDetail"
            }
        ],
        "is_new": false,
        "locale": "en_us",
        "colours": [
            {
                "url": "https://www2.hm.com/en_us/productpage.1272095006.html",
                "code": "666B75",
                "name": "Light gray",
                "image_url": "https://image.hm.com/assets/hm/a8/17/a817c3912200811f3ef7b26591f6a6978d5f4676.jpg",
                "article_id": "1272095006"
            },
            {
                "url": "https://www2.hm.com/en_us/productpage.1272095002.html",
                "code": "4C5164",
                "name": "Dark denim blue",
                "image_url": "https://image.hm.com/assets/hm/75/7a/757aa338258de152be92e1633278d3a25fb0e1c4.jpg",
                "article_id": "1272095002"
            },
            {
                "url": "https://www2.hm.com/en_us/productpage.1272095009.html",
                "code": "40424E",
                "name": "Dark denim blue",
                "image_url": "https://image.hm.com/assets/hm/95/f8/95f8bf392bf25cf667aee99a27dd69e55b3bf9a8.jpg",
                "article_id": "1272095009"
            }
        ],
        "markers": [],
        "currency": "USD",
        "in_stock": true,
        "has_video": false,
        "image_url": "https://image.hm.com/assets/hm/a8/17/a817c3912200811f3ef7b26591f6a6978d5f4676.jpg",
        "article_id": "1272095006",
        "sale_price": 7.49,
        "colour_code": "666B75",
        "coming_soon": false,
        "is_multipack": false,
        "member_price": null,
        "category_code": "kids_clothing_jeans_flared",
        "colour_shades": [
            "Dark gray",
            "Stone"
        ],
        "original_price": 19.99,
        "model_image_url": "https://image.hm.com/assets/hm/a8/17/a817c3912200811f3ef7b26591f6a6978d5f4676.jpg",
        "discount_percent": 63
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "product"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

404

Not Found

H&M does not list the article in the chosen locale. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "product"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested resource was not found."
    },
    "success": false
}
422

Validation Error

A parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "article_id": [
            "The article_id must be 10 digits, for example 1331684001."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

H&M could not be reached, or it returned data that does not match the request (another page, another sort, a filter that was not applied). This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "product"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "H&M could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.