Quickstart tutorial
Query the OpenAlex dataset using the magic of The Internet
Lets use the OpenAlex API to get journal articles and books published by authors at Stanford University. We'll limit our search to articles published between 2010 and 2020. Since OpenAlex is free and openly available, these examples work without any login or account creation. 👍
If you open these examples in a web browser, they will look much better if you have a browser plug-in such as JSONVue installed.
1. Find the institution
You can use the institutions endpoint to learn about universities and research centers. OpenAlex has a powerful search feature that searches across 108,000 institutions.
Lets use it to search for Stanford University:
Find Stanford University
https://api.openalex.org/institutions?search=stanford
Our first result looks correct (yeah!):
We can use the ID https://openalex.org/I97018004
in that result to find out more.
2. Find articles (works) associated with Stanford University
The works endpoint contains over 240 million articles, books, and theses 😲. We can filter to show works associated with Stanford.
Show works where at least one author is associated with Stanford University
https://api.openalex.org/works?filter=institutions.id:https://openalex.org/I97018004
This is just one of the 50+ ways that you can filter works!
3. Filter works by publication year
Right now the list shows records for all years. Lets narrow it down to works that were published between 2010 to 2020, and sort from newest to oldest.
Show works with publication years 2010 to 2020, associated with Stanford University https://api.openalex.org/works?filter=institutions.id:https://openalex.org/I97018004,publication_year:2010-2020&sort=publication_date:desc
4. Group works by publication year to show counts by year
Finally, you can group our result by publication year to get our final result, which is the number of articles produced by Stanford, by year from 2010 to 2020. There are more than 30 ways to group records in OpenAlex, including by publisher, journal, and open access status.
That gives a result like this:
There you have it! This same technique can be applied to hundreds of questions around scholarly data. The data you received is under a CC0 license, so not only did you access it easily, you can share it freely! 🎉
What's next?
Jump into an area of OpenAlex that interests you:
And check out our tutorials page for some hands-on examples!
Last updated