Disclosure: I build and maintain the Apify Actor used in this guide.
If you buy from German, Austrian or Swiss wholesalers, sooner or later a supplier sends you a BMEcat file instead of a spreadsheet. BMEcat is a solid XML standard for product catalogues – but your shop, PIM or ERP importer usually wants flat rows: one product per line, a price column, an EAN column, image URLs.
This guide shows what is inside a BMEcat file, what usually goes wrong when you flatten it, and how to get clean JSON or CSV in a few minutes.
What a BMEcat article looks like
A shortened BMEcat 1.2 article:
<ARTICLE mode="new"> <SUPPLIER_AID>BM-1</SUPPLIER_AID> <ARTICLE_DETAILS> <DESCRIPTION_SHORT>Akkuschrauber 18 V</DESCRIPTION_SHORT> <EAN>4006381333931</EAN> <MANUFACTURER_AID>XS-18</MANUFACTURER_AID> <MANUFACTURER_NAME>Werkzeug AG</MANUFACTURER_NAME> <DELIVERY_TIME>3</DELIVERY_TIME> </ARTICLE_DETAILS> <ARTICLE_FEATURES> <FEATURE><FNAME>Spannung</FNAME><FVALUE>18</FVALUE><FUNIT>V</FUNIT></FEATURE> </ARTICLE_FEATURES> <ARTICLE_PRICE_DETAILS> <ARTICLE_PRICE price_type="net_list"><PRICE_AMOUNT>89.90</PRICE_AMOUNT><TAX>0.19</TAX></ARTICLE_PRICE> <ARTICLE_PRICE price_type="net_list"><PRICE_AMOUNT>84.00</PRICE_AMOUNT><LOWER_BOUND>10</LOWER_BOUND></ARTICLE_PRICE> <ARTICLE_PRICE price_type="nrp"><PRICE_AMOUNT>149.00</PRICE_AMOUNT></ARTICLE_PRICE> </ARTICLE_PRICE_DETAILS> <MIME_INFO><MIME><MIME_SOURCE>bm-1.jpg</MIME_SOURCE></MIME></MIME_INFO> </ARTICLE> BMEcat 2005 uses PRODUCT / SUPPLIER_PID / PRODUCT_DETAILS instead of ARTICLE / SUPPLIER_AID / ARTICLE_DETAILS; the idea is the same.
The four classic pitfalls
- Several prices per article.
net_list(your purchase price),nrp(recommended retail price) and price tiers (LOWER_BOUND) all live in the same block. A naive XPath export picks the first one and silently drops the rest. - Currency and language sit in the header, not in the article (
<CURRENCY>EUR</CURRENCY>,<LANGUAGE>deu</LANGUAGE>). Flatten only the articles and you lose them. - Image paths are relative (
bm-1.jpg). You need the supplier's media base URL to turn them into real links. - Features are name/value/unit triples (
FNAME/FVALUE/FUNIT) – they don't fit into fixed columns.
Option 1: do it yourself
For a one-off file, an XSLT or a short Python script with lxml works: iterate over ARTICLE (1.2) or PRODUCT (2005), read SUPPLIER_AID/SUPPLIER_PID, pick prices by price_type, read currency from the header, and join MIME_SOURCE with the base URL. Parse untrusted XML with a safe parser (for example defusedxml) – catalogue files come from outside.
This gets tedious when you have several suppliers, each with their own quirks, and receive a new file every month.
Option 2: the Supplier Product Data Normalizer on Apify
Supplier Product Data Normalizer reads BMEcat 1.2 and 2005 (and Excel, CSV and XML price lists) and writes one documented JSON record per product. The example task Convert BMEcat catalogues to JSON or CSV is already set to BMEcat – just add your file URL.
Input:
{ "sources": [{ "url": "https://supplier.example.com/catalogue.xml" }], "mapping": { "imageBaseUrl": "https://media.supplier.example.com/" }, "supplier": "Muster GmbH" } Output for the article above (shortened):
{ "sku": "BM-1", "gtin": "04006381333931", "mpn": "XS-18", "manufacturer": "Werkzeug AG", "name": { "de": "Akkuschrauber 18 V" }, "price": { "amount": 89.9, "currency": "EUR", "taxIncluded": false, "vatRate": 19 }, "listPrice": { "amount": 149, "currency": "EUR", "taxIncluded": true, "vatRate": 19 }, "priceTiers": [{ "minQuantity": 10, "amount": 84 }], "stock": { "deliveryDays": 3 }, "images": [{ "url": "https://media.supplier.example.com/bm-1.jpg", "position": 1 }], "attributes": [{ "name": "Spannung", "value": "18", "unit": "V" }], "_provenance": { "sku": { "from": "SUPPLIER_AID", "method": "mapped" } }, "_issues": [] } What happened:
- purchase price, recommended retail price and the price tier are kept apart,
- the currency comes from the header, the VAT rate from
TAX, - the EAN was checked (check digit) and stored as a 14-digit GTIN; the delivered form is kept in
gtinOriginal, - image paths became full URLs,
- every value records where it came from (
_provenance), problems are listed in_issuesinstead of being guessed.
ETIM and ECLASS features
Electrical, HVAC and plumbing wholesalers usually classify every product in ETIM and/or ECLASS. In BMEcat 2005 each system gets its own feature block, and the features are codes, not names:
<PRODUCT_FEATURES> <REFERENCE_FEATURE_SYSTEM_NAME>ETIM-9.0</REFERENCE_FEATURE_SYSTEM_NAME> <REFERENCE_FEATURE_GROUP_ID>EC000125</REFERENCE_FEATURE_GROUP_ID> <FEATURE><FNAME>EF000007</FNAME><FVALUE>EV000080</FVALUE></FEATURE> <FEATURE><FNAME>EF000227</FNAME><FVALUE>16</FVALUE><FUNIT>EU570448</FUNIT></FEATURE> </PRODUCT_FEATURES> <PRODUCT_FEATURES> <REFERENCE_FEATURE_SYSTEM_NAME>ECLASS-13.0</REFERENCE_FEATURE_SYSTEM_NAME> <REFERENCE_FEATURE_GROUP_ID>27-14-27-02</REFERENCE_FEATURE_GROUP_ID> <FEATURE><FNAME>0173-1#02-AAN531#004</FNAME><FVALUE>250</FVALUE><FUNIT>V</FUNIT></FEATURE> </PRODUCT_FEATURES> A generic flattener mixes both blocks into one feature list and loses which code belongs to which system. The normalizer keeps them apart:
{ "classifications": [ { "system": "ETIM", "version": "9.0", "classId": "EC000125" }, { "system": "ECLASS", "version": "13.0", "classId": "27-14-27-02" } ], "attributes": [ { "name": "EF000007", "value": "EV000080", "code": "EF000007", "valueCode": "EV000080", "system": "ETIM" }, { "name": "EF000227", "value": "16", "code": "EF000227", "unitCode": "EU570448", "system": "ETIM" }, { "name": "0173-1#02-AAN531#004", "value": "250", "unit": "V", "code": "0173-1#02-AAN531#004", "system": "ECLASS" } ] } Class ids are checked (ETIM EC + 6 digits, ECLASS 8 digits or IRDI); an invalid id becomes an etim-class-invalid / eclass-class-invalid issue instead of being passed on. Excel price lists with an ETIM-Klasse or ECLASS 13.0 column are recognised as well. Catalogue groups (CATALOG_GROUP_SYSTEM with PRODUCT_TO_CATALOGGROUP_MAP) become a readable categoryPath such as ["Installation", "Schalter und Steckdosen"].
The codes are kept, not translated: turning EF000007 into a feature name needs the ETIM or ECLASS model from your own account or licence, which most PIM systems already have.
Getting CSV or Excel
The results land in an Apify dataset. Export it as CSV, Excel, JSON or XML in the Console, or via the API.
Monthly updates: only what changed
Suppliers resend the whole catalogue every time. Pass the dataset of the previous run as previousDatasetId and set emit to changes: you get only new, changed (with the old values) and removed products – see the example task Only new, changed and removed products from supplier files. Unchanged products are not charged.
Cost
USD 0.20 per 1,000 product records (plus the standard Actor start). A 5,000-article catalogue costs about USD 1. Starting the Actor with an empty input runs a demo on a built-in sample file – only the Actor start is charged. Subscribers on paid Apify plans get 10–30 % off automatically (Bronze/Silver/Gold tiers).
Summary
BMEcat is not hard, but flattening it correctly means handling price types, header data, relative image paths and features – including ETIM/ECLASS codes per system. For a single file a script is fine; for recurring supplier files a tool that keeps the mapping and reports only changes saves the most time.
