Old OpenAlex API documentation
  • Overview
  • Quickstart tutorial
  • API Entities
    • Entities overview
    • 📄Works
      • Work object
        • Authorship object
        • Location object
      • Get a single work
      • Get lists of works
      • Filter works
      • Search works
      • Group works
      • Get N-grams
    • 👩Authors
      • Author object
      • Get a single author
      • Get lists of authors
      • Filter authors
      • Search authors
      • Group authors
      • Limitations
      • Author disambiguation
    • 📚Sources
      • Source object
      • Get a single source
      • Get lists of sources
      • Filter sources
      • Search sources
      • Group sources
    • 🏫Institutions
      • Institution object
      • Get a single institution
      • Get lists of institutions
      • Filter institutions
      • Search institutions
      • Group institutions
    • 💡Topics
      • Topic object
      • Get a single topic
      • Get lists of topics
      • Filter topics
      • Search topics
      • Group topics
    • 🗝️Keywords
    • 🏢Publishers
      • Publisher object
      • Get a single publisher
      • Get lists of publishers
      • Filter publishers
      • Search publishers
      • Group publishers
    • 💰Funders
      • Funder object
      • Get a single funder
      • Get lists of funders
      • Filter funders
      • Search funders
      • Group funders
    • 🌎Geo
      • Continents
      • Regions
    • 💡Concepts
      • Concept object
      • Get a single concept
      • Get lists of concepts
      • Filter concepts
      • Search concepts
      • Group concepts
    • Aboutness endpoint (/text)
  • How to use the API
    • API Overview
    • Get single entities
      • Random result
      • Select fields
    • Get lists of entities
      • Paging
      • Filter entity lists
      • Search entities
      • Sort entity lists
      • Select fields
      • Sample entity lists
      • Autocomplete entities
    • Get groups of entities
    • Rate limits and authentication
  • Download all data
    • OpenAlex snapshot
    • Snapshot data format
    • Download to your machine
    • Upload to your database
      • Load to a data warehouse
      • Load to a relational database
        • Postgres schema diagram
  • Additional Help
    • Tutorials
    • Report bugs
    • FAQ
Powered by GitBook
On this page
  • Request format
  • Response format
  • The hint property
  • IDs in autocomplete
  • Filter autocomplete results
  1. How to use the API
  2. Get lists of entities

Autocomplete entities

PreviousSample entity listsNextGet groups of entities

Last updated 1 year ago

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.

Request format

The format for requests is simple: /autocomplete/<entity_type>?q=<query>

  • entity_type (optional): the name of one of the OpenAlex entities: works, authors, sources, institutions, concepts, publishers, or funders.

  • 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.

{
    meta: {
        count: 183,
        db_response_time_ms: 5,
        page: 1,
        per_page: 10
    },
    results: [
        {
            id: "https://openalex.org/I33213144",
            display_name: "University of Florida",
            hint: "Gainesville, USA",
            cited_by_count: 17190001,
            entity_type: "institution",
            external_id: "https://ror.org/02y3ad647"
        },
        // more results...
    ]
}

Each object in the results list includes these properties:

  • display_name (string): The entity's display_name property.

  • entity_type (string): The entity's type: author, concept, institution, source, publisher, funder, or work.

  • 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 linked to that entity.

  • works_count (integer): The number of works associated with the entity. For entity type work it's always null.

  • 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"

  • Source: The host_organization, e.g. "Oxford University Press"

  • Institution: The institution's location, e.g. "Gainesville, USA"

IDs in autocomplete

Filter autocomplete results

This is the query behind that result:

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:

You can optionally .

id (string): The for this result entity.

external_id (string): The for this result entity.

Author: The author's , e.g. "University of North Carolina at Chapel Hill, USA"

Concept: The Concept's , e.g. "the study of relation between plant species and genera"

and are detected within autocomplete queries and matched to the appropriate record if it exists. For example:

The query will search for the author with ORCID ID https://orcid.org/0000-0002-7436-3176 and return 0 records if it does not exist.

The query will search for the source with OpenAlex ID https://openalex.org/S49861241 and return 0 records if it does not exist.

All entity and queries can be added to autocomplete and work as expected, like:

https://api.openalex.org/autocomplete/institutions?q=flori
https://explore.openalex.org/
https://api.openalex.org/autocomplete?q=https://orcid.org/0000-0002-7436-3176
https://api.openalex.org/autocomplete/sources?q=S49861241
filters
search
https://api.openalex.org/autocomplete/works?filter=publication_year:2010&search=frogs&q=greenhou
filter autocomplete results
OpenAlex ID
Canonical External ID
Canonical External IDs
OpenAlex IDs
last known institution
description