GET /v1/autocomplete

Primary ranked search endpoint.

Important query params

  • query required, minimum 1 character
  • index logical index ID, defaults to default
  • limit from 1 to 50
  • mode one of fts_only, vector_only, hybrid, fts_rerank
  • debug to include debug metadata
  • bypass_cache or X-Bypass-Cache to skip cached responses
  • filters as a JSON string for exact and range filtering
  • user_id for personalization-aware ranking
  • vector_backend currently turso or zvec
  • benchmark to compare vector backend timing

Response shape

The response includes:

  • normalized and optionally corrected query values
  • the effective mode used
  • degraded when fallback behavior was needed
  • suggestions with titles, subtitles, descriptions, URLs, images, price, currency, score, and extra metadata
  • optional debug data

Example

curl "https://api.suggestapi.com/v1/autocomplete?index=products&query=diaphragm%20pump&limit=8&mode=hybrid&debug=true" \
  -H "x-api-key: <public-key>"

GET /v1/typeahead

Fast prefix suggestion endpoint backed by the suggestions table.

Important query params

  • query required
  • index logical index ID
  • limit from 1 to 50
  • bypass_cache or X-Bypass-Cache

Notes

  • optimized for low-latency suggestion UIs
  • supports spell correction and typo-tolerant fuzzy matching
  • returns simpler suggestion payloads than /autocomplete