Scraped product catalogues, classified into the QFix garment vocabulary
It scrapes six Swedish clothing brands and answers one question about any
product they sell: what garment is this, and what is it made
of? Two names come back — a clothing type
(Jacket) and a material (Standard textile)
— alongside everything the shop published about the product: its own
category breadcrumb, colour, composition, photograph and care text.
It does not know about repairs, prices, services or bookings. qfix.se owns all of that, and owns the join from these names onto its own taxonomy as alias data an admin can edit — which is why a shop that starts using a word nobody has seen becomes a line typed into a form rather than a release of this repo.
This service used to build booking URLs for a WordPress site as well, complete with numeric category ids and pre-selected repair actions. That site is retired and every trace of it has been removed — the classification is what is left, and it is what was actually being used.
How many scraped products we can name the garment of. Most of the rest are department or campaign pages rather than products — things that should fail to classify.
| Brand | Total | Classified | Unclassified | Coverage |
|---|---|---|---|---|
| Loading… | ||||
A product's scraped category (Jackor & rockar > Vårjackor)
is looked up in CLOTHING_TYPE_MAP, deepest level first.
This is the shop's precise word, and it is the field a consumer
should classify from.
A page whose breadcrumb says nothing useful falls through to keyword
rules over the product name and description, and for some shops to
structured data the page itself publishes (Nudie's JSON-LD
category) before the URL slug. The slug rules are an
ordered table, because the order is the whole content of them:
t-shirt has to be tried before shirt, and
short before denim.
99% Bomull, 1% Elastan resolves the dominant fibre
through MATERIAL_MAP onto one of the coarse material
names. qfix.se ignores this field and parses the composition itself,
because it prices cotton and wool differently and this field calls
both “Standard textile”.
A product that matches no rule is left unclassified rather than given a plausible answer. On the qfix.se side an unclassified product opens the ordinary garment picker, which is a good page; a confidently wrong garment type is not recoverable in the same way. The words that need a new rule show up at /unmapped.
| Endpoint | What it answers |
|---|---|
/v3/product/<brand>/<id> | One product, lean. This is what qfix.se calls. |
/v3/product/by-url?url= | The same record, reached from the page address. |
/v4/product/<id> | Aggregated across size variants. |
/<brand>/product/<id> | The original shape: keyed by brand, classification in a qfix block. |
/identify | Classify a garment from a photograph. |
/unmapped | Categories no rule covers yet. |
/docs/coverage | The table above, as JSON. |
/widget/v2.js | Redirects to the embed script qfix.se hosts. |
Full reference at /apidocs.