# H&M API

> H&M returns clothing and home product prices, sizes, colours, and images as a workflow and API.

H&M Search products finds clothing and home items by keyword, with optional country and sale filters. Get product returns an item's country-specific price, sizes, colours, and images from its name or product link.

- Page: https://fous.com/workflows/hm
- Handle: `@hm`
- Category: [Commerce](https://fous.com/workflows/category/commerce)
- Source website: https://hm.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with H&M.

## Methods

### Get product

Operation `get_product`, version 1. 1 credit per call.

Get an H&M item’s current country-specific price, sizes, colours and images by name or link. Descriptions, materials, care and sustainability details are unavailable from the public catalog and return null; size stock is online stock.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `colour` | string | no |  | Colour name to select, such as Beige; defaults to the first colour. |
| `country` | string | no | `"United States"` | Country name or two-letter code, such as United States or GB. |
| `product` | string | yes | `"https://www2.hm.com/en_us/productpage.1336345003.html"` | Product name or H&M product page link, such as Regular Fit Linen Shirt. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "product"
  ],
  "properties": {
    "colour": {
      "type": "string",
      "description": "Colour name to select, such as Beige; defaults to the first colour."
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter code, such as United States or GB.",
      "examples": [
        "United States",
        "GB"
      ]
    },
    "product": {
      "type": "string",
      "description": "Product name or H&M product page link, such as Regular Fit Linen Shirt.",
      "examples": [
        "https://www2.hm.com/en_us/productpage.1336345003.html",
        "Regular Fit Linen Shirt",
        "linen shirt"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "country": "United States",
      "product": "https://www2.hm.com/en_us/productpage.1336345003.html"
    },
    {
      "product": "Regular Fit Linen Shirt"
    },
    {
      "country": "GB",
      "product": "linen shirt"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `fit` | string or null | `"Regular Fit"` |  |
| `price` | number | `44.99` |  |
| `sizes` | array |  |  |
| `sizes[].in_stock` | boolean | `true` |  |
| `sizes[].low_stock` | boolean or null | `false` |  |
| `sizes[].size_label` | string | `"S"` |  |
| `colour` | string or null | `"Beige"` |  |
| `colours` | array |  |  |
| `colours[].link` | string | `"https://www2.hm.com/en_us/productpage.1336345003.html"` |  |
| `colours[].name` | string | `"Beige"` |  |
| `materials` | string or null |  |  |
| `sale_price` | number or null |  |  |
| `composition` | string or null |  |  |
| `description` | string or null |  |  |
| `image_links` | array |  |  |
| `product_link` | string | `"https://www2.hm.com/en_us/productpage.1336345003.html"` |  |
| `product_name` | string or null | `"Easy-Care Regular-Fit Linen-Blend Shirt"` |  |
| `currency_code` | string | `"USD"` |  |
| `article_number` | string | `"1336345003"` |  |
| `care_instructions` | string or null |  |  |
| `sustainability_info` | string or null |  |  |

**Example input**

```json
{
  "country": "United States",
  "product": "https://www2.hm.com/en_us/productpage.1336345003.html"
}
```

**Example output**

```json
{
  "fit": "Regular Fit",
  "price": 44.99,
  "sizes": [
    {
      "in_stock": true,
      "low_stock": false,
      "size_label": "S"
    },
    {
      "in_stock": true,
      "low_stock": false,
      "size_label": "M"
    },
    {
      "in_stock": false,
      "low_stock": false,
      "size_label": "L"
    }
  ],
  "colour": "Beige",
  "colours": [
    {
      "link": "https://www2.hm.com/en_us/productpage.1336345003.html",
      "name": "Beige"
    },
    {
      "link": "https://www2.hm.com/en_us/productpage.1336345001.html",
      "name": "Dark brown"
    }
  ],
  "materials": null,
  "sale_price": null,
  "composition": null,
  "description": null,
  "image_links": [
    "https://image.hm.com/assets/hm/5d/cd/5dcd2b21190afec829148b5c53a70a3b7c28e38f.jpg",
    "https://image.hm.com/assets/hm/17/d3/17d357a29292ff081fa09707f24ce27ba130624e.jpg",
    "https://image.hm.com/assets/hm/ec/76/ec76c9c1dabf94dd488a7a83987abdaaad1f9441.jpg"
  ],
  "product_link": "https://www2.hm.com/en_us/productpage.1336345003.html",
  "product_name": "Easy-Care Regular-Fit Linen-Blend Shirt",
  "currency_code": "USD",
  "article_number": "1336345003",
  "care_instructions": null,
  "sustainability_info": null
}
```

### Search products

Operation `search_products`, version 1. 1 credit per call.

Search H&M clothing and home products by keyword, with country-specific prices and an optional sale-only filter. Countries without an H&M online storefront are not supported; category names are summarized from H&M catalog categories.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `query` | string | yes | `"linen shirt"` | Clothing or home product to search for, such as linen shirt. |
| `country` | string | no | `"GB"` | Country name or two-letter country code, such as United States or GB. |
| `max_results` | integer | no | `5` | Maximum products to return, such as 36. |
| `on_sale_only` | boolean | no | `true` | Only show reduced-price products, for example true. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "Clothing or home product to search for, such as linen shirt.",
      "examples": [
        "linen shirt",
        "cushion cover",
        "zzzxq_no_products_839192"
      ]
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter country code, such as United States or GB.",
      "examples": [
        "GB",
        "Germany"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 36,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum products to return, such as 36.",
      "x-fous-developer": true,
      "examples": [
        5,
        3,
        4
      ]
    },
    "on_sale_only": {
      "type": "boolean",
      "default": false,
      "description": "Only show reduced-price products, for example true.",
      "examples": [
        true
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "query": "linen shirt"
    },
    {
      "query": "cushion cover",
      "country": "GB",
      "max_results": 5
    },
    {
      "query": "zzzxq_no_products_839192",
      "max_results": 3
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `products` | array |  | Products in H&M search order. |
| `products[].price` | number | `6.99` | Regular price in the listed currency. |
| `products[].category` | string or null | `"Home - Cushion Covers"` | Catalog category. |
| `products[].photo_link` | string or null | `"https://image.hm.com/assets/hm/2e/f4/2ef4ce11d699114bce405b694d157bbf9df37956.jpg"` | Product photo URL. |
| `products[].sale_price` | number or null | `10` | Reduced price when on sale, or null. |
| `products[].product_link` | string | `"https://www2.hm.com/en_gb/productpage.1364226004.html"` | Product page URL. |
| `products[].product_name` | string or null | `"2-pack cotton cushion covers"` | Product name. |
| `products[].currency_code` | string | `"GBP"` | Three-letter currency code. |
| `products[].article_number` | string or null | `"1364226004"` | H&M article number. |
| `products[].available_colours` | array |  | Available colour names. |

**Example input**

```json
{
  "query": "cushion cover",
  "country": "GB",
  "max_results": 5
}
```

**Example output**

```json
{
  "products": [
    {
      "price": 6.99,
      "category": "Home - Cushion Covers",
      "photo_link": "https://image.hm.com/assets/hm/2e/f4/2ef4ce11d699114bce405b694d157bbf9df37956.jpg",
      "sale_price": null,
      "product_link": "https://www2.hm.com/en_gb/productpage.1364226004.html",
      "product_name": "2-pack cotton cushion covers",
      "currency_code": "GBP",
      "article_number": "1364226004",
      "available_colours": [
        "Dark brown/Striped",
        "Dark green/Striped",
        "Red/Striped"
      ]
    },
    {
      "price": 24.99,
      "category": "Home - Cushion Covers",
      "photo_link": "https://image.hm.com/assets/hm/d5/9a/d59adcf9234e82e0fd4c9a32e0463b77123231b4.jpg",
      "sale_price": 10,
      "product_link": "https://www2.hm.com/en_gb/productpage.1316923001.html",
      "product_name": "3-pack textured cushion covers",
      "currency_code": "GBP",
      "article_number": "1316923001",
      "available_colours": [
        "White"
      ]
    },
    {
      "price": 12.99,
      "category": "Home - Cushion Covers",
      "photo_link": "https://image.hm.com/assets/hm/d9/7e/d97e94f8153fdbee2c356b5f4e40d15b13701f0a.jpg",
      "sale_price": null,
      "product_link": "https://www2.hm.com/en_gb/productpage.1359566001.html",
      "product_name": "Motif-detail cushion cover",
      "currency_code": "GBP",
      "article_number": "1359566001",
      "available_colours": [
        "Black/Horse"
      ]
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@hm",
  "visibility": "public",
  "operation": "get_product",
  "version": 1,
  "input": {
    "country": "United States",
    "product": "https://www2.hm.com/en_us/productpage.1336345003.html"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@hm\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_product\",\n  \"version\": 1,\n  \"input\": {\n    \"country\": \"United States\",\n    \"product\": \"https://www2.hm.com/en_us/productpage.1336345003.html\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@hm",
  "visibility": "public",
  "operation": "get_product",
  "version": 1,
  "input": {
    "country": "United States",
    "product": "https://www2.hm.com/en_us/productpage.1336345003.html"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@hm","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare product prices across supported country storefronts
- Find clothing and home items by keyword
- Filter searches to reduced-price products
- Check online size stock and available colours
- Display product names, categories, and photos in a catalog

## FAQ

### Is Fous affiliated with H&M?

No. Fous is not affiliated with H&M. This workflow reads the public hm.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a H&M account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from hm.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What products match a keyword?

Search products returns matching clothing and home items, with product names, categories, prices, and other details.

### Which products are reduced in price?

Search products can filter results to reduced-price items with its on-sale-only option.

### What sizes and colours are available for an item?

Get product returns an item's sizes and colours. Size stock refers to online stock.

## Related

- [Zara API](https://fous.com/workflows/zara.md): Zara offers fashion and clothing, with product searches and item details including current prices, colours, sizes, materials and images; care instructions may be unavailable.
- [IKEA API](https://fous.com/workflows/ikea.md): IKEA helps shoppers find country-dependent product details, prices, photos, reviews and assembly information, and check store stock where IKEA provides it; some countries are unsupported.
- [Nordstrom API](https://fous.com/workflows/nordstrom.md): Search clothing, shoes, and beauty products at Nordstrom.
- [Zalando API](https://fous.com/workflows/zalando.md): Search clothes and shoes on Zalando country shops.
- [Nike API](https://fous.com/workflows/nike.md): Nike returns country-specific listings and details, including prices, sizes, availability and reviews, plus publicly shown upcoming or recently stocked SNKRS releases with local launch times.
- [Macy's API](https://fous.com/workflows/macys.md): Shop Macy's products and sales.
- [Apple Store API](https://fous.com/workflows/apple-store.md): Apple Store shows current public-store prices and configurations, compares prices across up to 15 countries at latest ECB rates, checks local pickup without reservations, and lists currently shown refurbished products.
- [Amazon API](https://fous.com/workflows/amazon.md): Amazon returns publicly shown product listings, prices, details, ratings, reviews, current best sellers, and Today's Deals; availability and content vary by store, location, and access.
- [All Commerce workflows](https://fous.com/workflows/category/commerce)
