/autocomplete endpoint provides fast, type-ahead search suggestions across all Hexagraph entity types, making it ideal for building search interfaces in your application. As the user types, you can feed each keystroke to this endpoint and render a live dropdown of matching scholarly entities — works, researchers, journals, institutions, publishers, and funders — without running a full paginated search.
General Autocomplete
GET /autocomplete?q=<query> returns suggestions across every entity type in a single call. Use this when you want a unified search box that surfaces any kind of scholarly entity.
entity_type field tells your UI which icon or label to render alongside each suggestion.
Entity-Specific Autocomplete
GET /autocomplete/{entity}?q=<query> restricts suggestions to a single entity type. Use this when your search context is already known — for example, an “Add Author” field in a paper submission form should only surface author suggestions.
Supported entity values
/autocomplete/authors, only author records are returned — no outputs, sources, or institutions will appear in the list, keeping dropdown results clean and contextually appropriate.
Integration Example
Below is a minimal JavaScript implementation of a debounced type-ahead search using the general autocomplete endpoint. The 300 ms debounce prevents excessive requests while the user is still typing.autocomplete path segment:
Response Fields
Each object in the suggestions array contains the following fields:
Use
id to make a follow-up lookup to the appropriate detail endpoint (/outputs/{id}, /authors/{id}, etc.) once the user selects a suggestion.
Autocomplete queries count against your rate limit just like any other request (30 requests/min, 1,000/day). For type-ahead interfaces, debounce requests so you send at most one query per 300 ms — this keeps a fast typist from consuming dozens of quota slots per second and ensures a smoother user experience overall.