Query the OpenAlex dataset using the magic of The Internet
The API is the primary way to get OpenAlex data. It's free, requires no authentication, and has no rate limits; it's also much easier than downloading and using the snapshot. So for most use cases, this is what you're looking for.
The OpenAlex API doesn't require authentication. However, it is helpful for us to know who's behind each API call, for two reasons:
- It allows us to get in touch with the user if something's gone wrong--for instance, their script has run amok and we've needed to start blocking or throttling their usage.
- It lets us report back to our funders, which helps us keep the lights on.
Like Crossref (whose approach we are shamelessly stealing), we prefer carrots to sticks for this. So, depending on your preferences, you'll be in one of two API pools:
The polite pool has much faster and more consistent response times. It's a good place to be.
To get into the polite pool, you just have to give us an email where we can contact you. You can give us this email in one of two ways:
The common pool has slower and less consistent response times. It's a less good place to be. We encourage everyone to get in the polite pool
The API doesn't have daily rate limits. However, there is a burst rate limit of 10 requests per second. So calling multiple requests at the same time could lead to errors with code 429. If you're calling the API with a list of IDs, using the OR syntax will save a lot of time and likely reduce any 429 errors.
pagequery parameter to control which page of results you want (eg
page=2, etc). By default there are 25 results per page; you can use the
per-pageparameter to change that to any number between 1 and 200.
To use cursor paging, you request a cursor by adding the
cursor=*parameter-value pair to your query.
The response to your query will include a
next_cursorvalue in the response's
metaobject. Here's what it looks like:
"results" : [
// the first page of results
To retrieve the next page of results, copy the
meta.next_cursorvalue into the cursor field of your next request.
- Get the next page of results using a cursor value:
This second page of results will have a new value for
meta.next_cursor. You'll use this new value the same way you did the first, and it'll give you the second page of results. To get all the results, keep repeating this process until
meta.next_cursoris null and the
resultsset is empty.
Because the API is all GET requests without fancy authentication, you can view any request in your browser. This is a very useful and pleasant way to explore the API and debug scripts; we use it all the time.
A lot prettier than cURL
There's no officially-supported client library for the API, for now. However, here's a short list of third-party libraries (and if you know of others, give us a shout):