The default bibtex exports from Semantic Scholar(S2) libraries do not include DOIs, which is problematic for some. This simple CLI app scratches that itch for you. It creates a new bibtex file with the missing DOIs. You may find it useful to ask Zotero SciHub plugin to fetch PDFs or find citation counts (with other plugins).
-
Prepare the environment
uv sync source .venv/bin/activateUse
source .venv/bin/activate.fishif you are using fish shell. Same applies to other shells. -
Run in CLI
uv run doi_lookup.py my_semantic_scholar_exported.bib -
Check the results.
We basically use the official S2 API to fetch full information with the S2-assigned CorpusID number. The basic lookup quota is pretty generous and should suffice most library sizes.