# H\&M Scraper — Product Prices, Stock & Sizes Data (`studio-amba/hm-scraper`) Actor

Scrape product data from hm.com, Europe's largest fashion retailer alongside Zalando and Zara. Extract names, prices, stock, sizes and images for any search term across 17 European markets, unblocked with Bright Data Web Unlocker.

- **URL**: https://apify.com/studio-amba/hm-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 result scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## H\&M Scraper

Pull product data from hm.com, Europe's largest fashion retailer alongside Zalando and Zara. This scraper reads directly from H\&M's own server-rendered search results, so it returns clean, structured data — name, price, stock, sizes, images — for real search results across 17 European markets, not a scraped screenshot of a page.

### How to scrape H\&M data

Give the actor one or more search keywords in the language of your chosen market (`"Kleid"` for Germany, `"dress"` for the UK, `"robe"` for France) and it runs them against H\&M's own site-wide search, paging through results until it hits `maxResults`.

H\&M sits behind Akamai's bot-management layer: a plain request to any `hm.com` path, including `robots.txt`, gets a bare 403 at the edge. This actor routes every request through Bright Data's Web Unlocker, which clears the block, so you don't need your own proxy or browser-automation setup.

Under the hood, H\&M is a Next.js storefront that server-renders the full search-result grid directly into the page's `__NEXT_DATA__` JSON payload — one full product object per card actually shown, including name, price, stock, sizes and images. There's no separate hidden API to reverse-engineer; the same Bright Data-fetched HTML page the actor already downloads for you IS the data source. The actor pages through results with H\&M's own `?page=` parameter, 36 fresh products per page, and de-duplicates by article code as it goes.

H\&M runs one shared platform (`www2.hm.com`) across 17 European markets, each with its own locale path, language and currency, rather than separate country domains like Zalando — this actor exposes that as a single `market` input, so you can point it at any of them without a different actor per country.

If you don't provide any input, it defaults to scraping H\&M's German storefront (`de_de`) for `"Kleid"` (dress) as a demo — a broad, high-volume evergreen term.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `searchQueries` | array of strings | Search keywords to run on hm.com, e.g. `"Kleid"`, `"jeans jacket"`. Use the language of the selected market. Up to 25 per run. |
| `market` | string | H\&M market/locale to scrape — controls both site language and price currency. One of `de_de`, `en_gb`, `fr_fr`, `nl_nl`, `it_it`, `es_es`, `se_se`, `dk_dk`, `no_no`, `fi_fi`, `pl_pl`, `at_at`, `ch_de`, `be_nl`, `be_fr`, `ie_en`, `pt_pt` (default: `de_de`) |
| `maxResults` | integer | Cap on number of products returned across all search queries (default: 100, hard-capped at 10000) |
| `brightDataApiKey` | string | Your own Bright Data API key, if you want to use your own Web Unlocker zone instead of the actor's built-in one |
| `proxyConfiguration` | object | Not used — this actor reaches hm.com exclusively through Bright Data, which handles unblocking on its own. Kept for input-shape compatibility. |

### What you get back

| Field | Type | Example |
|-------|------|---------|
| `name` | string | `"Bedrucktes Baumwollkleid"` |
| `brand` | string | `"H&M"` — almost always H\&M, it sells its own brand only |
| `price` | number | `8.00` |
| `originalPrice` | number | null | Pre-discount price, only present when H\&M marks a markdown |
| `currency` | string | `"EUR"`, `"GBP"`, `"SEK"`, ... — read per-response from the selected market, never hardcoded |
| `articleCode` | string | null | `"1347936003"` — H\&M's own product reference code |
| `productId` | string | null | Same as `articleCode` |
| `inStock` | boolean | null | `true`/`false` when H\&M's own `isOutOfStock` field is present, `null` only if a future response shape omits it — never coerced to `false` |
| `url` | string | Full product page URL |
| `imageUrl` | string | null | Primary product image |
| `imageUrls` | array | Up to 8 product images for the default color |
| `category` | string | null | Internal category slug, e.g. `"ladies_dresses_knitted"` |
| `market` | string | null | Market/locale scraped, e.g. `"de_de"` |
| `specs` | object | Currently the in-stock sizes, e.g. `{"sizes": "XS, S, M, L, XL"}` |
| `scrapedAt` | string | ISO timestamp |

### Sample output

```json
{
  "name": "Bedrucktes Baumwollkleid",
  "brand": "H&M",
  "price": 8,
  "currency": "EUR",
  "url": "https://www2.hm.com/de_de/productpage.1347936003.html",
  "scrapedAt": "2026-09-07T14:20:00.000Z",
  "originalPrice": 9.99,
  "articleCode": "1347936003",
  "productId": "1347936003",
  "inStock": true,
  "imageUrl": "https://image.hm.com/assets/hm/65/c3/65c3df3ffeaa17bff35cfdfa33bfb4cdb1a3eaf6.jpg",
  "imageUrls": [
    "https://image.hm.com/assets/hm/65/c3/65c3df3ffeaa17bff35cfdfa33bfb4cdb1a3eaf6.jpg",
    "https://image.hm.com/assets/hm/61/07/6107ff5b69a421dcd6d416ca9ad63d0161bece1f.jpg"
  ],
  "category": "kids_girls_clothing_dresses_longsleeve",
  "market": "de_de",
  "specs": { "sizes": "92 (1½-2Y), 98/104 (2-4Y), 110/116 (4-6Y), 122/128 (6-8Y), 134/140 (8-10Y)" }
}
```

### Use cases

- **Price monitoring** — track H\&M's own price and markdown changes over time on the products and categories you sell against.
- **Assortment research** — see which products rank for a given search term on Europe's largest fashion retailer.
- **Market comparison** — H\&M is one of the three biggest fashion retailers in Europe alongside Zalando and Zara, making it a standard reference point when benchmarking fashion pricing.
- **Cross-market pricing** — the `market` input lets you compare the same product's price across up to 17 European currencies in one actor.
- **Stock and size tracking** — `inStock` and the `sizes` spec flag when a product or a specific size run has sold through.

### Coverage

hm.com runs one shared platform across 17 European markets (`de_de`, `en_gb`, `fr_fr`, `nl_nl`, `it_it`, `es_es`, `se_se`, `dk_dk`, `no_no`, `fi_fi`, `pl_pl`, `at_at`, `ch_de`, `be_nl`, `be_fr`, `ie_en`, `pt_pt`), each with its own locale, language and currency — select any of them with the `market` input. Search results span all departments (women/men/kids/home) rather than being scoped to one; there's no need to run separate queries per department.

### Performance and cost

Every request goes through Bright Data's Web Unlocker, but a single search-result page returns 36 products in one call, so the Bright Data cost per result is a small fraction of a cent — well under a quarter of the per-result price, which is why this actor is priced at the standard fashion tier rather than a premium anti-bot tier. A 100-product run typically completes in a few minutes. Your run's usage cost only settles after the run reports SUCCEEDED — checking cost mid-run will undercount it.

### Limitations

- Input is search keywords, not category browsing — H\&M's category-tree navigation wasn't wired into this actor; a keyword search covers the same catalog and is simpler to use.
- `originalPrice` is only populated when H\&M marks an item as discounted; full-price items will show it as absent, which is correct, not missing data.
- Loyalty-member-only ("Member Price") pricing is intentionally excluded — `price` always reflects what a non-member customer pays.
- Ratings and review counts aren't exposed on the search-result endpoint, so they're not included in the output.
- Per-size stock counts aren't included — `sizes` lists which sizes currently have stock, not a count per size.
- If H\&M restructures its search-results page or `__NEXT_DATA__` shape, the actor will need updating — it depends on the exact structure of `props.pageProps.srpProps`.

### Related scrapers

If you're covering European fashion more broadly, also check out:

- [Zalando Scraper](https://apify.com/studio-amba/zalando-scraper) — Europe's largest online fashion marketplace, multi-brand catalog
- [Zara Scraper](https://apify.com/studio-amba/zara-scraper) — Inditex flagship, category-based catalog
- [Mytheresa Scraper](https://apify.com/studio-amba/mytheresa-scraper) — luxury fashion e-tail, full per-size stock

### Support

Found an issue or need a market that isn't resolving correctly? Open an issue on this actor's Apify Store page and we'll take a look.

# Actor input Schema

## `searchQueries` (type: `array`):

Search keywords to run on hm.com's site-wide search, e.g. "Kleid" or "jeans jacket". Use the language of the selected market for best results. Leave empty to use the default ("Kleid").

## `market` (type: `string`):

H\&M market/locale to scrape. Controls both the site language and the currency of returned prices.

## `maxResults` (type: `integer`):

Maximum number of products to scrape across all search queries. Hard-capped at 10000 per run.

## `brightDataApiKey` (type: `string`):

Bright Data API key (Web Unlocker zone) used to reach hm.com behind its Akamai anti-bot protection. Falls back to the actor's own BRIGHT\_DATA\_API\_KEY environment variable if left empty.

## `proxyConfiguration` (type: `object`):

Not used — this actor reaches hm.com exclusively through Bright Data Web Unlocker (Akamai-protected, confirmed live), which handles unblocking on its own. Kept for input-shape compatibility.

## Actor input object example

```json
{
  "searchQueries": [
    "Kleid"
  ],
  "market": "de_de",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "Kleid"
    ],
    "market": "de_de",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/hm-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["Kleid"],
    "market": "de_de",
    "maxResults": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/hm-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "Kleid"
  ],
  "market": "de_de",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call studio-amba/hm-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/hm-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vUxMmOIb1EYRluSsZ/builds/Ei62K6bwoFtSkBZ4M/openapi.json
