← All articles
Tutorial · July 2026

Index your first hardware catalog in 5 minutes

Two API calls, one real search result with a typo and a different format. Every piece of code on this page is tested — copy, paste, adapt to your catalog.

What you need

An API key (14-day free trial, no credit card) and a terminal. That's it — no SDK to install, the engine answers in plain JSON over standard HTTP calls.

Step 1 — Index 4 products

A small hardware catalog, with the outillage rule pack (the one that understands diameters, lengths, and materials in a reference):

curl -X POST https://api.heurix.fr/v1/index/hardware/items   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
  "rulepack": "outillage",
  "items": [
    {"id": "V001", "name": "Hex head machine screw", "ref": "M8 x 20 - Stainless A2", "stock": 120},
    {"id": "V002", "name": "Hex head machine screw", "ref": "M8 x 30 - Stainless A2", "stock": 45},
    {"id": "R001", "name": "Sealed ball bearing", "ref": "6205-2RS", "stock": 8},
    {"id": "E001", "name": "Hex nut", "ref": "M8 - Zinc-plated", "stock": 300}
  ]
}'

Response:

{"indexed": 4, "catalog": {"catalog": "hardware", "products": 4,
 "terms": 18, "annotations": 11, "rulepack": "outillage", "synonym_groups": 0}}

11 annotations generated automatically from 4 products — that's the rule cascade decomposing each reference (diameter, length, material) without you writing a single regex.

Step 2 — Search, with a typo and a different format

The real test: not the exact reference as indexed, but what a customer actually types — a typo on "screw," and "M8x20" run together with no spaces or hyphens:

curl -X POST https://api.heurix.fr/v1/index/hardware/search   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"q": "scew m8x20 stainless"}'

Response (shortened):

{
  "total": 3,
  "hits": [
    {
      "product": {"id": "V001", "ref": "M8 x 20 - Stainless A2", "stock": 120},
      "score": 43.5,
      "matched": [
        "term 'stainless' (from 'stainless', x1.00)",
        "annotation #LONG_20",
        "annotation #DIAM_M8",
        "annotation #VIS_M8X20",
        "annotation #DIAM_M8_INOX",
        "annotation #MAT_INOX"
      ]
    },
    { "product": {"id": "V002", "ref": "M8 x 30 - Stainless A2"}, "score": 28.5, ... },
    { "product": {"id": "E001", "ref": "M8 - Zinc-plated"}, "score": 7.5, ... }
  ]
}

What just happened

"scew m8x20 stainless" exists literally nowhere in the indexed data — not "scew" (a typo on "screw"), not "m8x20" in that exact form (the stored reference is "M8 x 20"). The engine still found the right product and ranked it first, and the matched field says precisely why: it recognized a diameter (DIAM_M8), a length (LONG_20), their combination as a screw reference (VIS_M8X20), and the material (MAT_INOX) — four annotations that weigh far more in the score than the simple spelling correction of "screw." That's the difference between an engine that tolerates typos on words, and an engine that understands a reference's structure.

And with your real catalog?

Replace the items array's content with your own products (5,000 per call maximum, several calls for a larger catalog), keep the outillage pack if it matches your industry — or mode, industrie for the other two provided packs. The full documentation covers facets, business synonyms, and federated search across multiple catalogs.

14-day free trial

Try the Search API on your catalog, no credit card.

See pricing