Autocomplete endpoint
The autocomplete endpoint lets you add autocomplete or typeahead components to your applications, without the overhead of hosting your own API endpoint.
Each endpoint takes a string, and (very quickly) returns a list of entities that match that string.
Here's an example of an autocomplete component that lets users quickly select an institution:
A user looking for information on the flagship of Florida's state university system.
This is the query behind that result: https://api.openalex.org/autocomplete/institutions?q=flori
The autocomplete endpoint is very fast; queries generally return in around 200ms. If you'd like to see it in action, we're using a slightly-modified version of this endpoint in the OpenAlex website here: https://explore.openalex.org/

Request format

The format for requests is simple: /autocomplete/<entity_type>?q=<query>
  • entity_type: the name of one of the five OpenAlex entities: works, authors, venues, institutions, or concepts.
  • query: the search string supplied by the user.

Response format

Each request returns a response object with two properties:
  • meta: an object with information about the request, including timing and results count
  • results: a list of up to ten results for the query, sorted by citation count. Each result represents an entity that matched against the query.
1
{
2
meta: {
3
count: 183,
4
db_response_time_ms: 5,
5
page: 1,
6
per_page: 10
7
},
8
results: [
9
{
10
id: "https://openalex.org/I33213144",
11
display_name: "University of Florida",
12
hint: "Gainesville, USA",
13
cited_by_count: 17190001,
14
entity_type: "institution",
15
external_id: "https://ror.org/02y3ad647"
16
},
17
// more results...
18
]
19
}
Copied!
Each object in the results list includes these properties:
  • id (string): The OpenAlex ID for this result entity.
  • external_id (string): The Canonical External ID for this result entity.
  • display_name (string): The entity's display_name property.
  • entity_type (string): The entity's type: work, author, venue, institution, or concept.
  • cited_by_count (integer): The entity's cited_by_count property. For works this is simply the number of incoming citations. For other entities, it's the sum of incoming citations for all the works linke to that entity.
  • hint: Some extra information that can help identify the right item. Differs by entity type.

The hint property

Result objects have a hint property. You can show this to users to help them identify which item they're selecting. This is particularly helpful when the display_name values of different results are the same, as often happens when autocompleting an author entity--a user who types in John Smi is going to see a lot of identical-looking results, even though each one is a different person.
The content of the hint property varies depending on what kind of entity you're looking up:
  • Work: The work's authors' display names, concatenated. e.g. "R. Alexander Pyron, John J. Wiens"
  • Author: The title and year of the Author's most recent work, e.g. "Touch screen car dashboards as serious danger for causing traffic accidents (2019)"
  • Venue: The publisher, e.g. "Oxford University Press"
  • Institution: The institution's location, e.g. "Gainesville, USA"
  • Concept: The Concept's description, e.g. "the study of relation between plant species and genera"