skillfed

pyalex

Python interface to the OpenAlex database

pyalex v0.21 117.1K downloads/30d#12,180 on PyPI
Permissive license MIT Active released

What it is and what it does

PyAlex wraps the OpenAlex REST API, a free index of scholarly metadata (papers, authors, institutions, concepts, topics, publishers, funders). It provides a thin Python interface that mirrors the API's design, supporting entity retrieval by ID or DOI, filtering, full-text search, semantic similarity matching, grouping, pagination, and field selection. The library converts OpenAlex's inverted-index abstracts to plaintext on the fly and can fetch full-text content in PDF or TEI XML format where available.

Typical use is to query scholarly data programmatically—finding papers by topic or author, discovering similar works, aggregating publication statistics, or building research tools. It requires an OpenAlex API key (free) and depends only on requests and urllib3 for HTTP transport. The library is designed to stay close to the original API's structure, so developers familiar with OpenAlex's REST endpoints will find the Python calls intuitive.

Use it for:

  • Query and filter scholarly papers by topic, author, institution, or open-access status for research surveys.
  • Retrieve author profiles and publication histories to build researcher directories or impact dashboards.
  • Find semantically similar papers to a given work or abstract using the semantic search endpoint.
  • Download full-text content in PDF or TEI format for papers with open-access availability.
  • Aggregate publication counts and metadata by institution, funder, or concept for bibliometric analysis.
  • Autocomplete author, institution, or topic names in interactive research tools.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyAlex is a Python interface to the OpenAlex REST API, enabling programmatic access to hundreds of millions of scholarly papers, authors, institutions, and related metadata with support for filtering, searching, semantic similarity, and content retrieval.

Yes. PyAlex is a lightweight, actively maintained wrapper around a free, CC0-licensed scholarly database. Low install friction, no security vulnerabilities, permissive licensing, and broad Python version support (3.8–3.12) make it a straightforward choice for anyone building research tools, bibliometric dashboards, or academic data pipelines. The main gotcha is the required API key (free but mandatory as of February 2026), not a blocker for legitimate use.

Install

pyalex on PyPI

pip

pip install pyalex

uv

uv add pyalex

poetry

poetry add pyalex

Installing pyalex

Before you install

Low friction: pure Python wheel with only requests and urllib3 as runtime dependencies. Active maintenance with a recent release as of 2026-02-23. Supports Python 3.8 through 3.12.

License in practice

MIT license (permissive). OpenAlex data itself is CC0 licensed, so combined use poses no licensing barrier for most academic and commercial applications.

Quickstart

pip install pyalex

import pyalex
pyalex.config.api_key = "<YOUR_API_KEY>"

from pyalex import Works
work = Works()["W2741809807"]
print(work["open_access"])

API key required as of February 13, 2026 (free account at openalex.org); without one, limited to 100 credits per day.

Verify before relying

  • Exact number of scholarly records indexed by OpenAlex (described as 'hundreds of millions' but not quantified in fact sheet).
  • Performance characteristics for large-scale queries or pagination across millions of results.
  • Whether pipe operations and semantic search are fully stable or still experimental.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, urllib3
Maintenance actively maintained — 172 days since the last release
First released
Downloads 117,110/month — #12,180 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyalex-0.21-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

openAlex API python clientscholarly data search libraryacademic paper metadata retrievalresearch publication database accesssemantic search similar papersacademic author institution lookupopen access paper discovery
scholarly-metadataacademic-searchrest-api-client

More Information Analysis packages