Academic papers API: OpenAlex and Crossref in code
Two open scholarly databases have free REST APIs that need no key: OpenAlex, an index of works across all disciplines (its data is CC0), and Crossref, the DOI registry. OpenAlex has citation counts and open access status for each work. Crossref holds the metadata registered with each DOI, including its own citation count. This guide shows how to read a paper from both in Python and what to watch for when you combine them.
This guide is independent and is not an official OpenAlex or Crossref resource.
How do I get a paper's metadata from OpenAlex and Crossref in Python?
Both APIs take a DOI directly:
import json, urllib.parse, urllib.request
doi = "10.1038/nature14539"
def get(url):
req = urllib.request.Request(url, headers={"User-Agent": "example (mailto:you@example.com)"})
with urllib.request.urlopen(req, timeout=60) as r:
return json.load(r)
w = get("https://api.openalex.org/works/doi:" + doi)
print("OpenAlex:", w["title"], w["publication_year"], w["cited_by_count"], w["open_access"]["oa_status"])
c = get("https://api.crossref.org/works/" + urllib.parse.quote(doi))["message"]
print("Crossref:", c["title"][0], c["container-title"][0], c["is-referenced-by-count"])
On 1 November 2026 it printed Deep learning (Nature, 2015) from both. OpenAlex counted 84,126 citations and Crossref 78,986.
Why do OpenAlex and Crossref give different citation counts?
Each one counts the citations it can see in its own data, so the numbers differ from each other and from other citation indexes. Pick one source for citation counts and say which you used.
What else trips people up?
- The same paper twice. A search across both sources returns many papers from each. Merge on DOI, or on exact title and year when there's no DOI.
- Abstracts and copyright. Crossref says almost none of its metadata is subject to copyright, but some abstracts may be under the publisher's or author's copyright. Check the paper's licence before you republish an abstract.
- OpenAlex without a key. It has a small shared daily allowance per network. For large or frequent jobs, get a free OpenAlex key.
- Pacing. Keep requests slow and retry after server errors. We send Crossref one request a second and OpenAlex four.
- Author names. A name can match more than one author profile. An ORCID iD is safer.
We built this
Disclosure: Your Evenings built and sells this. It's independent and isn't affiliated with or endorsed by OpenAlex, OurResearch or Crossref. The Academic Papers API on Apify Store searches OpenAlex and Crossref in one run and returns one row per paper, merged by DOI.
- Three modes. Topic search, DOI lookup for up to 500 DOIs, or an author's papers by name or ORCID iD, sorted by newest or most cited.
- Citation counts and open access links for every paper. Papers found only in Crossref are looked up in OpenAlex by DOI to add citation counts, open access status and free-to-read links.
- Abstracts where the licence allows. An abstract is returned when an openly available version of the paper carries a CC0, CC BY, CC BY-SA or public-domain licence, and
abstractStatussays why when it isn't. - New-paper alerts. In monitor mode, a scheduled run returns only papers it hasn't returned before.
- Free status rows for invalid or unknown DOIs and source errors.
Pricing: $0.002 per paper returned, plus $0.01 per alert run that finds new papers and a small Actor start fee. Higher Apify plans pay less. A DOI list of 500 papers costs 500 × $0.002 = $1.00, plus the start fee.
FAQ
Do I need an API key for OpenAlex or Crossref? No. Both APIs work without a key. OpenAlex without a key has a small shared daily allowance, so for large or frequent jobs use your own free OpenAlex key.
Why are citation counts different between OpenAlex and Crossref? Each counts the citations in its own data, so the numbers differ from each other and from other citation indexes.
Can I republish abstracts from Crossref? Some abstracts may be under the publisher's or author's copyright. Check the paper's licence first. Openly licensed abstracts, such as CC BY, can be shared under that licence.
How do I get alerts for new papers on a topic? Run the same search on a schedule, sorted by newest, and keep only DOIs you haven't seen before.
Product names and logos belong to their owners. Your Evenings is not affiliated with or endorsed by them. Paper metadata from OpenAlex (CC0) and Crossref. Your Evenings is not affiliated with or endorsed by OpenAlex, OurResearch or Crossref.
