openalexPro
An R ecosystem for large-scale, on-disk access to OpenAlex β the open catalogue of global scholarly work.
OpenAlex provides free, comprehensive metadata on over 250 million scholarly works, authors, institutions, and concepts. The openalexPro ecosystem is built around a single design principle: process data on disk rather than in memory, so workflows scale to millions of records without hitting RAM limits.
Packages
Version: r-universe is the released version, which install.packages() gives you (built from main); main and dev are the versions in each branchβs DESCRIPTION, read live from GitHub. Checks: test coverage of main, then R CMD check of main and of dev.
| Package | Description | Version | Checks |
|---|---|---|---|
| openalexPro |
Core API client β build queries (classic filters or OpenAlex's query language, OQL), page through the results, and store them as Parquet; resumes interrupted downloads; saves results as OpenAlex collections (shareable, reusable ID sets kept in sync with their queries) | ||
| openalexSnowball |
Snowball citation searches β expand seed papers by the works citing them and the works they cite, live via the API or offline against a snapshot | ||
| openalexConvert |
Export a Parquet corpus to BibTeX, BibLaTeX, CSL JSON, Markdown, LaTeX, HTML or PDF via Pandoc, or straight into Zotero (collections and tags included) | ||
| openalexSnapshot |
Offline work with a local OpenAlex snapshot β ID, DOI and citation indexes, record extraction by ID or DOI at scale, and an offline citation graph; pure R over DuckDB | ||
| openalexVectorComp |
Text embedding, cosine-distance scoring, and threshold calibration β backend-neutral (HuggingFace, OpenAI, TEI) |
Installation
Released versions come from the openalexPro r-universe, which builds them from each packageβs main branch. Install the packages you need; their openalexPro dependencies come along automatically:
install.packages(
c("openalexPro", "openalexSnowball", "openalexConvert",
"openalexSnapshot", "openalexVectorComp"),
repos = c("https://openalexpro.r-universe.dev", "https://cloud.r-project.org")
)
Development versions (the dev branch: newest features, not yet released) install from GitHub:
# install.packages("remotes")
remotes::install_github("openalexPro/openalexPro", ref = "dev")
Typical workflow
# 1. Query OpenAlex and store the results as Parquet in my_project/parquet
library(openalexPro)
url <- pro_query(search = '"biodiversity" AND "ecosystem services"')
pro_fetch(url, project_folder = "my_project")
# 2. Or work offline with a local OpenAlex snapshot
library(openalexSnapshot)
build_corpus_index(root_dir = "/data/openalex") # once per snapshot
lookup_by_id(root_dir = "/data/openalex", ids = "W2741809807")
# 3. Snowball-expand a set of seed papers (optional)
library(openalexSnowball)
pro_snowball(identifier = "W2741809807", output = "my_project/snowball")
# 4. Export to BibTeX, or into Zotero
library(openalexConvert)
corpus_export_via_pandoc("my_project/parquet", "my_project/refs.bib", to = "bibtex")
corpus_to_zotero("my_project") # into the collection my_project > parquet
Design principles
- On-disk processing β results are paged and written to Parquet; memory use stays flat regardless of corpus size.
- Arrow / DuckDB throughout β all data manipulation uses columnar formats; SQL queries run in-process.
- Composable β each package has a single responsibility and speaks the same Parquet dialect, so they chain naturally.
- Pure R β none of the packages has compiled code of its own, so nothing needs a toolchain to install.
Contributing
Issues and pull requests are welcome on the individual package repositories. Please open an issue before starting large changes.
Acknowledgements
This ecosystem builds on the excellent openalexR package and the OpenAlex teamβs commitment to open scholarly infrastructure.
Disclaimer
The packages are provided as is. The authors are not affiliated with OpenAlex.