Autocomplete
API Reference
Autocomplete
Low-latency suggestions for code/description typeahead search
GET
Autocomplete
Fast prefix search for UI typeahead. Returns suggestions based on code or description matches. Optimized for real-time search experiences.Documentation Index
Fetch the complete documentation index at: https://docs.htsapi.com/llms.txt
Use this file to discover all available pages before exploring further.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (min 2 chars, max 200 chars) |
limit | integer | No | Maximum number of results (default: 10, max: 20) |
Example Request
Example Response
Behavior
- Code queries: If the query starts with a number, searches by code prefix
- Text queries: If the query starts with text, performs full-text search on descriptions
- Scoring: Results are scored by relevance (higher is better)
Use Cases
- Typeahead search boxes
- Quick code lookup
- Search suggestions
- Real-time search experiences
Authorizations
API key as Bearer token. Format: Bearer your_hts_api_key
Query Parameters
Search query (minimum 2 characters)
Required string length:
2 - 200Maximum number of results (default: 10, max: 20)
Required range:
1 <= x <= 20Response
Autocomplete suggestions