A reproducible workflow layer over pybliometrics for Scopus searches
Project description
scopusflow (Python)
scopusflow is a reproducible workflow layer over pybliometrics for Scopus searches. It is the Python twin of the R package scopusflow and follows the same design, so a search written in one language reads much the same in the other.
This is an early release, covered by an offline test suite. The retrieval path is a thin driver over pybliometrics, so before you lean on it for a large live harvest it is worth a short trial run against your installed version.
Why this exists
pybliometrics is the mature way to reach the Scopus API from Python. It wraps around ten endpoints and handles the HTTP, cursor pagination, weekly-quota rotation and per-query caching. What it does not provide is a workflow on top of that plumbing. There is no declarative search plan, no single record schema that stays the same across query types, no resumable harvest with checkpoints, no DOI change-tracking between runs, and nothing ready-made for trends, topic comparisons, abstracts or plots. Researchers tend to hand-roll those around pybliometrics, and that is the work scopusflow takes on. It depends on pybliometrics rather than re-implementing the plumbing that already works well.
| pybliometrics | scopusflow | |
|---|---|---|
| Reach the API (search, retrieval, quota, cursor, cache) | yes | delegates to pybliometrics |
| Declarative, reproducible search plan | no | yes |
| One stable record schema across query types | no | yes |
| Resumable, checkpointed harvest of a plan | no | yes |
| DOI extraction and change-tracking between runs | no | yes |
| Annual publication trends without downloading records | no | yes |
| Topic-trend comparison with stability bands | no | yes |
| Batch abstract retrieval, resilient per id | no | yes |
| Trend and top-source/author plots | no | yes |
| Export to reference managers (BibTeX, RIS) | no | yes |
| Minimal, uniform keyword/reference corpus export | no | yes |
The other Python options are not live alternatives. elsapy was archived as read-only in January 2025, and pyscopus last saw a release in January 2019.
Install
You need a Scopus API key configured for pybliometrics, in its standard ~/.config/pybliometrics.cfg.
pip install scopusflow
The optional extras add the figures and the app. Install scopusflow[plot] for the matplotlib plots and scopusflow[app] for the code-free app. To work on the package itself, install from a clone with pip install -e ".[dev,plot]".
A first search
The example below builds a query, plans a harvest partitioned by year, retrieves it with caching, and then draws on the stable record schema for everything that follows.
import scopusflow as sf
q = sf.scopus_query("graphene", "supercapacitor", field="TITLE-ABS-KEY")
plan = sf.SearchPlan(q, years=range(2015, 2025), partition="year")
records = sf.fetch_plan(plan, cache_dir="harvest", resume=True)
sf.top(records, by="source")
dois = sf.extract_dois(records)
Re-running the same plan later and comparing the two retrievals shows which records have appeared or disappeared in the meantime.
later = sf.fetch_plan(plan, cache_dir="harvest2")
sf.diff_dois(old=records, new=later)
The publication trend can be tallied from a harvest you already hold, or fetched directly as cheap per-year result-size lookups that never download the records themselves.
trend = sf.year_counts(records)
trend = sf.scopus_trend(q, years=range(2015, 2025))
A topic comparison shows how sub-topics grow within the reference literature over time. The abstract and export helpers carry the work onward into reading and into a reference manager.
cmp = sf.compare_topics(q, ["lithium-ion", "sodium-ion"], years=range(2015, 2023))
sf.plot_comparison(cmp)
abstracts = sf.scopus_abstract(dois[:10], by="doi")
with open("scopus-records.bib", "w", encoding="utf-8") as fh:
fh.write(sf.to_bibtex(records))
The pure-logic helpers, from query building to DOI tracking, need no API key and are exercised by the offline tests. Everything that contacts the API needs a key, and the plots need the optional plot extra. To try the analysis half before configuring anything, sf.example_records() returns a bundled harvest of 138 real articles in the same schema. It is not a Scopus harvest, since retrieved records may not be redistributed; the documentation explains where it comes from.
A code-free app
A local NiceGUI app drives the whole workflow without writing code, and mirrors every choice back as a runnable Python script, so it works as an on-ramp to the package rather than a replacement. It runs on your own machine, so your API key never leaves it, and a demo mode lets you try the flow with no key at all, replaying the bundled set of real published articles in place of a harvest.
pip install "scopusflow[app]"
scopusflow-gui
The retrieval runs in the background with a live progress terminal. Results appear as a paginated table and a pair of plots with one-click export, and a Compare topics card draws the same comparison figure the library produces.
Citation
If scopusflow contributes to published work, please cite it. GitHub builds a ready-made citation from CITATION.cff through the Cite this repository button.
Bernabeu, P. (2026). scopusflow: A reproducible workflow layer over pybliometrics for Scopus searches. Python package version 0.3.0. https://doi.org/10.5281/zenodo.21252666
The About page carries the same citation with a BibTeX entry.
Developer
scopusflow is written by Pablo Bernabeu, a researcher in the Department of Education at the University of Oxford, with hands-on experience of behavioural experiments, EEG, corpus analysis, computational modelling and statistics. He develops open, reproducible research software in R and Python, and is a Fellow of the Software Sustainability Institute. His ORCID record lists his other work.
Licence
MIT. Scopus is a trademark of Elsevier. This is an independent client and is not affiliated with or endorsed by Elsevier.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scopusflow-0.3.0.tar.gz.
File metadata
- Download URL: scopusflow-0.3.0.tar.gz
- Upload date:
- Size: 473.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
829dcdd51dc4782733a40eadeb0df4afed994f178aad2480635c83589400693d
|
|
| MD5 |
0fcf79098fff48d282cbb399839a7f5e
|
|
| BLAKE2b-256 |
fd8c662104dcbc4dff340caedd4ef00c480b164a36a0ee4dd373414836b21106
|
Provenance
The following attestation bundles were made for scopusflow-0.3.0.tar.gz:
Publisher:
publish.yml on pablobernabeu/scopusflow-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scopusflow-0.3.0.tar.gz -
Subject digest:
829dcdd51dc4782733a40eadeb0df4afed994f178aad2480635c83589400693d - Sigstore transparency entry: 2229130732
- Sigstore integration time:
-
Permalink:
pablobernabeu/scopusflow-py@af9125926fb0d0580cda188f5a7b92f0778d5bcb -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/pablobernabeu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af9125926fb0d0580cda188f5a7b92f0778d5bcb -
Trigger Event:
release
-
Statement type:
File details
Details for the file scopusflow-0.3.0-py3-none-any.whl.
File metadata
- Download URL: scopusflow-0.3.0-py3-none-any.whl
- Upload date:
- Size: 60.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e54750368708f444a68614fb470c6c766365f8b95f31eced93f53b7efd36efe4
|
|
| MD5 |
12d1243311f7b93cccd2f201d345c8ea
|
|
| BLAKE2b-256 |
09996d9a6a42f9ac5f15ebf45242ed48e8ad6510430fabf3ea7d0833b466ae6b
|
Provenance
The following attestation bundles were made for scopusflow-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on pablobernabeu/scopusflow-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scopusflow-0.3.0-py3-none-any.whl -
Subject digest:
e54750368708f444a68614fb470c6c766365f8b95f31eced93f53b7efd36efe4 - Sigstore transparency entry: 2229131346
- Sigstore integration time:
-
Permalink:
pablobernabeu/scopusflow-py@af9125926fb0d0580cda188f5a7b92f0778d5bcb -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/pablobernabeu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af9125926fb0d0580cda188f5a7b92f0778d5bcb -
Trigger Event:
release
-
Statement type: