# 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/tools/hm
- Handle: `@hm`
- Category: [Commerce](https://fous.com/tools/category/commerce)
- Source website: https://hm.com
- Last verified: Sep 29, 2026

## Methods

### Get product

Operation `get_product`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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 completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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 | `19.99` | Regular price in the listed currency. |
| `products[].category` | string or null | `"Kids - Shirts"` | Catalog category. |
| `products[].photo_link` | string or null | `"https://image.hm.com/assets/hm/aa/09/aa091c48ba53f5ca81f0d76d441222d0de763d0b.jpg"` | Product photo URL. |
| `products[].sale_price` | number or null | `15.99` | Reduced price when on sale, or null. |
| `products[].product_link` | string | `"https://www2.hm.com/en_us/productpage.1275884001.html"` | Product page URL. |
| `products[].product_name` | string or null | `"Linen-Blend Shirt"` | Product name. |
| `products[].currency_code` | string | `"USD"` | Three-letter currency code. |
| `products[].article_number` | string or null | `"1275884001"` | H&M article number. |
| `products[].available_colours` | array |  | Available colour names. |

**Example input**

```json
{
  "query": "linen shirt"
}
```

**Example output**

```json
{
  "products": [
    {
      "price": 19.99,
      "category": "Kids - Shirts",
      "photo_link": "https://image.hm.com/assets/hm/aa/09/aa091c48ba53f5ca81f0d76d441222d0de763d0b.jpg",
      "sale_price": 15.99,
      "product_link": "https://www2.hm.com/en_us/productpage.1275884001.html",
      "product_name": "Linen-Blend Shirt",
      "currency_code": "USD",
      "article_number": "1275884001",
      "available_colours": [
        "Light beige"
      ]
    },
    {
      "price": 29.99,
      "category": "Men - Shirts",
      "photo_link": "https://image.hm.com/assets/hm/38/a5/38a53b8bfaf4db7fc0e887294a896304a19a2ab2.jpg",
      "sale_price": null,
      "product_link": "https://www2.hm.com/en_us/productpage.1307418014.html",
      "product_name": "Relaxed-Fit Linen-Blend Resort Shirt",
      "currency_code": "USD",
      "article_number": "1307418014",
      "available_colours": [
        "Dark brown",
        "White",
        "White/striped"
      ]
    },
    {
      "price": 29.99,
      "category": "Men - Shirts",
      "photo_link": "https://image.hm.com/assets/hm/38/b9/38b9fbe48754986bc16c0b370183fbbb9f7e0d5f.jpg",
      "sale_price": null,
      "product_link": "https://www2.hm.com/en_us/productpage.1307418002.html",
      "product_name": "Relaxed-Fit Linen-Blend Resort Shirt",
      "currency_code": "USD",
      "article_number": "1307418002",
      "available_colours": [
        "White",
        "Dark brown",
        "White/striped"
      ]
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_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.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/hm`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_product`: Get product. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `search_products`: Search products. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-hm https://api.fous.com/mcp/tools/hm --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## 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

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this H&M tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. 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. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified 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/tools/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/tools/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/tools/nordstrom.md): Search clothing, shoes, and beauty products at Nordstrom.
- [Zalando API](https://fous.com/tools/zalando.md): Search clothes and shoes on Zalando country shops.
- [Nike API](https://fous.com/tools/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/tools/macys.md): Shop Macy's products and sales.
- [Apple Store API](https://fous.com/tools/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/tools/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 tools](https://fous.com/tools/category/commerce)
