Skip to contents

OpenAlex works without a key, with a budget of US$0.10 per day: about 1,000 searches, while looking up a work by its DOI or OpenAlex ID is free. A free key raises the budget to US$1 per day. Make one by signing up at https://openalex.org/signup and copying the key from https://openalex.org/settings/api-key.

Usage

openalex_key(key = NULL)

Arguments

key

the key to set, or NULL to get the current key

Value

the current key (character; "" when none is set)

Details

Store it as the OPENALEX_API_KEY environment variable so it is read every time R starts. A key OpenAlex refuses makes it refuse every request, so a refused key is left out (see api_key_status()).

Examples

openalex_key() # returns "" unless a key is set
#> [1] ""