H&M Product Scraper - Search Results, Prices, Stock, Details
Pricing
from $1.69 / 1,000 listing results
H&M Product Scraper - Search Results, Prices, Stock, Details
Flat JSON in one run: one row per H&M colourway from search results, with 22 listing fields for name, price, discount, stock, in-stock sizes, colours, images and URLs. Enable PDP for descriptions, category trees and product codes (32 fields). 19 locales; maxItemsPerQuery 0 collects all pages.
Pricing
from $1.69 / 1,000 listing results
Rating
0.0
(0)
Developer
R.L.
Maintained by CommunityActor stats
0
Bookmarked
6
Total users
3
Monthly active users
5 days ago
Last modified
Categories
Features
Share
H&M Product Scraper - Prices, Stock, Details
H&M Product Scraper returns colourway-level product rows from the JSON endpoints used by H&M's Android app. Give it search terms such as jeans or summer dress and it writes one flat row for every colourway found: product and colour names, the current price fields, sale flags, in-stock sizes, images and the product URL. Switch on fetchProductDetails to add descriptions, category labels, fit labels, price-validity dates and group codes. Two dataset views expose the slices: overview with 22 columns and withDetails with 32. The Actor reads api.hm.com and ofg.hm.com directly, so there is no browser step or HTML parsing. Counts and defaults come from the Actor's own schemas and code; measured observations below carry their dates.
Field reference: keyspace.dev data dictionaries. Actor catalog: keyspace.dev.
What does this Actor return?
Two dataset views over the same flat row shape. The detail columns are present only when fetchProductDetails is on and the detail request returned data.
| Dataset view | Columns | What the row holds |
|---|---|---|
overview (Products) | 22 | Search term and locale, product and colour identity, price and discount columns, availability, sibling colourways, sizes, images and product URL |
withDetails (Products with detail) | 32 | The same 22 columns plus pdpCode, pdpName, description, priceValidFrom, priceValidTo, mainCategory, supercategories, fits, baseProductCode and ancestorProductCode |
The overview columns split into five groups:
- Identity and provenance:
searchQuery,locale,productId,productName,brandName,colorName,productUrl. - Price and discount state:
price,formattedPrice,priceType,isOnSale,originalPrice,formattedOriginalPrice,discountPercent. - Availability:
stockState,inStock,sizes.sizeslists only sizes in stock. - Colourway siblings:
colorsandarticleIds, aligned lists of the other colourways of the same garment. - Media and units:
imageUrl,imageUrls,currency.
A row is one colourway, not one garment. The Actor's own notes record a 100-row jeans run covering 52 distinct styles, 1.92 colourways per style. productId identifies the colourway; ancestorProductCode is the shared style code for rolling rows up into one garment. Rows from several search terms share one dataset and are separated by searchQuery.
Which inputs control a run?
The input schema has 7 properties. Only searchQueries is required.
| Input | Default | What it changes |
|---|---|---|
searchQueries | ["jeans"] (also the prefill) | Search terms sent to the listing API. Several terms are allowed and each row keeps its own searchQuery. |
locale | en_us | Listing language, prices and currency. 19 choices are in the dropdown; en_us, en_gb and de_de are confirmed live. |
maxItemsPerQuery | 60 | Cap on rows collected for one term. 0 collects every page. The cap resets for each term and is not a run-wide cap. |
fetchProductDetails | true | Adds one product-detail request for each found product and the 10 detail columns when the request returns data. |
market | hm-us | Market code for the detail endpoint. Only hm-us is confirmed to work. |
pdpLang | en | Language code sent to the detail endpoint, for example de. |
proxyConfiguration | {"useApifyProxy": false} | Optional proxy for outgoing requests. |
Search pages contain 30 products. Delivery stops at maxItemsPerQuery, when the listing has no more products, at the platform's charge limit, or when a charging channel fails. Within one term, products are de-duplicated on productId before they are written; the same product found by two different terms stays as two rows with different searchQuery values.
Which locales, markets and entities does it cover?
| Locale | Country | Listing currency from the Actor's locale map |
|---|---|---|
en_us | United States | USD |
en_gb | United Kingdom | GBP |
de_de | Germany | EUR |
fr_fr | France | EUR |
it_it | Italy | EUR |
es_es | Spain | EUR |
nl_nl | Netherlands | EUR |
sv_se | Sweden | SEK |
da_dk | Denmark | DKK |
nb_no | Norway | NOK |
fi_fi | Finland | EUR |
pl_pl | Poland | PLN |
pt_pt | Portugal | EUR |
ja_jp | Japan | JPY |
ko_kr | South Korea | KRW |
zh_cn | China | CNY |
en_au | Australia | AUD |
en_ca | Canada | CAD |
en_in | India | INR |
currency on a listing row is derived from locale. The detail endpoint answers only for market hm-us and quotes a US price, so its validity dates describe that price even on a non-US locale.
| Entity in the Actor's own samples | Where it appears |
|---|---|
H&M, brandName: "H&M" | Own-brand products in the listing fixtures |
| Product 1168042052, "Loose Fit Jeans" | 2026-11-08 fixture with a red price and a white price in the same payload |
| Product 1045459080, "Harper High Rise Wide Leg Jeans" | 2026-11-08 full-price fixture, colour Denim blue |
| Products 1045459078 and 1354481001 | 2026-11-08 comparison of en_us and de_de detail validity dates |
| Product 1302894006 | 2026-11-22 supercategories observation |
api.hm.com/search-services/v1/{locale}/search/resultpage | Listing endpoint |
ofg.hm.com/get-article-by-code/article/get-article-by-code/{market}/Online/{code}/{lang} | Detail endpoint |
What do the detail columns actually contain?
description is the detail record's product text. pdpName is H&M's internal name for the design and often differs from productName. fits holds fit labels such as Slim fit; baseProductCode is H&M's grouped code, for example 1045459_group_080; ancestorProductCode is the style key shared by colourways.
Three detail columns need care before you group on them:
priceValidFromandpriceValidTocome from thehm-usdetail record and date the US price, not thepricecolumn on the row. On 2026-11-08, products 1045459078 and 1354481001 showedpriceValidFromof 2025-12-07 in both theen_usandde_dearms even though their listing prices and currencies differed. H&M uses a far-future year inpriceValidTofor an open-ended price.mainCategoryis verbatim. It is usually a display name such asLooseorWide, but 2 of 20 rows measured carried an internal slug such askids_boys_clothing_jeans.supercategoriesmixes real category names (Jeans,Ladies,Clothes) with internal campaign and segment codes (WK47_LD_US176_s4_BFPickdeal,AUL_WK34_MSS_EOP) in the same list. On 2026-11-22, 13 of the 23 entries on product 1302894006 were those codes. Filter the list before treating it as a category tree.
On the listing side, price is the price a buyer sees and is the sale price when isOnSale is true. priceType carries H&M's own label: redPrice on a sale, whitePrice at full price. Read that label rather than comparing numbers. originalPrice is null at full price, because the white price is then the current price. discountPercent is H&M's discount label as a string and is also null at full price.
How are runs charged and capped?
Two billable events are named in the Actor's code: plp-result for each delivered product row, and pdp-result when detail fields are fetched and the charge for them succeeds. If the detail charge cannot be covered, the row still ships with its listing fields and its detail fields blanked. A run with an unsupported market skips the detail requests and keeps the listing rows.
maxItemsPerQuery bounds the rows collected for one term. A platform charge limit stops the run early and the status message says the run hit its maximum charge setting rather than the end of the results, naming any search terms not reached. Current rates are on the Actor's Pricing tab; this page does not repeat them.
How do I use the Actor from an agent or a schedule?
- Open the Actor's Input tab and add one or more terms to
searchQueries. - Set
locale,maxItemsPerQueryandfetchProductDetails; leavemarketathm-uswhen detail data is needed. - Start the run, then read rows from the Dataset tab in
overvieworwithDetails. - For repeat jobs, start the same input from an Apify schedule, the Apify API or an integration.
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("rl1987/h-and-m-api-scraper").call(run_input={"searchQueries": ["jeans", "summer dress"],"locale": "en_gb","maxItemsPerQuery": 60,"fetchProductDetails": True,"market": "hm-us","pdpLang": "en",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["productId"], item["colorName"], item["stockState"], item["sizes"])
What do people ask before running this Actor?
Do I need an H&M account or my own API key?
No. The input schema has no credential field. The Actor sends the JSON requests with the Android app's own headers; there is no sign-in step.
What is inside one overview row?
22 columns: the search term and locale, product id, name, brand and colour name, price and discount fields, sale flag, stock state and in-stock sizes, sibling colour names and article ids, image URLs, product URL and currency.
What does withDetails add?
Ten more columns from the detail endpoint: pdpCode, pdpName, description, the two price-validity dates, mainCategory, supercategories, fits, baseProductCode and ancestorProductCode. They appear only when fetchProductDetails is on and the detail request returned data.
Is one row one garment?
No. One row is one colourway with its own productId. The Actor's notes record 100 rows across 52 styles in a jeans run. Use articleIds for the sibling colourways and ancestorProductCode for the shared style.
Which locales work?
The dropdown has 19 locale codes, from en_us and en_gb to ja_jp, ko_kr, zh_cn and en_in. The input schema confirms en_us, en_gb and de_de as live; the others follow H&M's site locale pattern. The listing locale sets the language and currency of price.
Can I set market to hm-de for German detail data?
Not for details. The detail endpoint accepts hm-us only. On 2026-11-08, hm-de with details on enriched 0 of 5 products while hm-us enriched 5 of 5. An unsupported market now skips the detail requests, keeps the listing rows and writes a status message naming the market and the working value.
What happens when a search term finds no products?
The listing page returns an empty product list, the Actor logs that there are no more products for that term and moves on. No row is written for it and the run does not fail because of it.
Do the detail validity dates apply to every locale's price?
No. They come from the hm-us detail endpoint and describe the US price. On 2026-11-08, products 1045459078 and 1354481001 had the same priceValidFrom of 2025-12-07 in both en_us and de_de, while their listing prices and currencies differed.
Field-by-field reference for the 32 declared columns, both views and the inputs: keyspace.dev data dictionaries and the keyspace.dev Actor catalog.