Indax

Replace your site search

What a site search or advanced search needs, and which part of the API does each.

This page is for the team building the website: what to build, what the API already does, and what stays yours. Indax keeps the index up to date from the company's public website (products, parts, pages and PDFs), so there is nothing to upload or sync.

What the API does, what you build

On the siteWith the APIYou build
Search box, keywords, part and model numbersPOST /v1/search with what the visitor typed in q. An exact part or model number comes first.The box and the results layout
Suggestions while typingThe same call with limit: 5, 250 ms after the last key, 2+ charactersThe dropdown
Results page with tabs (Products, Parts, Pages, Documents)Each result has a type. One call per tab with types, or one call and group by type.The tabs
Filters (category, brand, certification, specs)facets: true returns the values with counts; send one chosen value per filter back in filtersThe filter panel
Pagingnext_cursor → cursor, up to 100 results per queryPager or "load more"
Ranking by the page the visitor is oncontext with the page URL and the visit's trail. See Page context.Two lines of script
Questions in plain language ("which grinder for coffee?")/v1/chat: Dax answers from the same catalog and lists the pages it usedThe chat window
AnalyticsNot sent anywhere by IndaxYour own events (below)

Not in the API: sorting other than by relevance, and search over anything that is not on the public website (CRM, ERP, email).

Choose where the calls come from

From the browserThrough your server
KeyA website key listing your sites (production and staging)A server-only key, kept in an environment variable
ProsNo back end to run; fastestKey never in page code; you can cache, log and add instructions to chat
ChatWebSocket from the pagePOST /v1/chat (Server-Sent Events), streamed on to the page

Both work. A browser key is safe to expose: it only works from the sites listed on it, and it is rate limited. Use one key per environment, so staging can be revoked alone. See Keys and credits.

A results page in one call

const res = await fetch("https://api.indax.net/v1/search", {
  method: "POST",
  headers: { Authorization: `Bearer ${INDAX_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    q: params.get("q"),
    limit: 20,
    facets: true,
    filters: chosenFilters,                       // one value per filter, e.g. { category: "Coffee Grinding Equipment" }
    cursor: params.get("page") || undefined,      // next_cursor from the previous page
    context: window.indaxContext?.(),             // optional, see Page context
  }),
});
const body = await res.json();
if (!res.ok) return showFallback(body.message);   // see Errors and limits
render(body.results, body.facets, body.next_cursor, body.total);

Each result links to the company's own page (url). Show image, title, summary, and for products and parts part_number, brand and up to 4 specs.

Analytics

Indax does not send events to your analytics. Record searches where you already do, for example your analytics tool's site-search event with the query and the result count, and a click event with the result's url. Each response's id (and the x-request-id header) identifies the request if you need to ask Indax about one. Credits per key are under Usage in the Indax app.

When the API is unavailable

Errors come back as JSON with a message that is safe to show. On 402, 429 and 5xx, show the message with a link to your contact page or catalog, so the visitor is never stuck. See Errors and limits for codes and a retry helper.

Launch checklist

  • A key per environment; the website key lists every production and staging domain (with and without www).
  • Searching a known product name and a known part number returns it first.
  • Filters narrow the results and paging shows no duplicates.
  • Suggestions are debounced (250 ms, 2+ characters).
  • The error state shows a message and a way to contact sales.
  • Searches and result clicks reach your analytics.
  • Chat (if used) streams, keeps follow-ups, and resumes after a reload.

On this page