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 site | With the API | You build |
|---|---|---|
| Search box, keywords, part and model numbers | POST /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 typing | The same call with limit: 5, 250 ms after the last key, 2+ characters | The 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 filters | The filter panel |
| Paging | next_cursor → cursor, up to 100 results per query | Pager or "load more" |
| Ranking by the page the visitor is on | context 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 used | The chat window |
| Analytics | Not sent anywhere by Indax | Your 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 browser | Through your server | |
|---|---|---|
| Key | A website key listing your sites (production and staging) | A server-only key, kept in an environment variable |
| Pros | No back end to run; fastest | Key never in page code; you can cache, log and add instructions to chat |
| Chat | WebSocket from the page | POST /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
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.