Skip to main content

Download academic papers from Unpaywall, OpenAlex, PubMed, bioRxiv, ArXiv, and more (no LLM)

Project description

respf - Research Paper Fetcher

A Python package for downloading academic papers across all research fields (CS, biology, medicine, physics, and more). No LLM calls: only APIs, metadata, and deterministic title matching.

Installation

pip install respf
# or local dev:
cd final && uv venv && uv pip install -e ".[dev]"

Sources

Source Best for
acl ACL Anthology (NLP/CL proceedings) — IDs, URLs, titles
acm ACM Digital Library (10.1145/*, dl.acm.org)
crossref Journal DOIs via Crossref PDF links in metadata
plos PLOS open-access journals (10.1371/*)
hal HAL open archive (hal.science)
osf OSF preprints
ieee IEEE Xplore (when stamp PDF is open)
direct_url Direct PDF URLs, Springer/Nature heuristics
unpaywall Any DOI with legal open-access PDF
pubmed Biology / medicine (PMC open access)
biorxiv bioRxiv & medRxiv preprints
openalex Cross-disciplinary search & OA links
arxiv Physics, CS, math preprints
europepmc Biomedical literature (Europe PMC API)
zenodo Open research records (10.5281/zenodo.*)
semantic_scholar DOI/title with openAccessPdf
google_scholar Fallback PDF discovery
springer, acm, github Publisher / repo search

Default source order depends on identifier type (DOI tries Unpaywall first; PMID tries PubMed first; titles try OpenAlex before ArXiv).

Usage

CLI

# List sources
respf --list-sources

# How will this identifier be resolved? (no download)
respf --resolve "10.1038/nature12373" --json

# Download by DOI (biology, any field)
respf "10.1038/nature12373"

# Download by PubMed ID
respf "https://pubmed.ncbi.nlm.nih.gov/12345678/"

# Download by title (title similarity verification, no LLM)
respf "Attention Is All You Need"

# Direct PDF URL (e.g. ACL Anthology)
respf "https://aclanthology.org/2025.findings-emnlp.1074.pdf"

# Explicit sources
respf "10.1101/2020.01.01.123456" --sources unpaywall,biorxiv,openalex

# Citations file with --parse (APA, IEEE, BibTeX, PubMed, PMC, bioRxiv URLs)
respf --file citations.txt --parse --dir ./papers

# Metadata without download (OpenAlex / Unpaywall)
respf --info "10.1038/nature12373" --json

# Dry-run: routing + metadata, no PDF
respf --dry-run "10.1038/nature12373" --json

# Batch with 4 parallel workers
respf --file citations.txt --parse --workers 4

# Agent capability manifest (JSON)
respf --capabilities

Agent / programmatic API

Structured JSON-friendly responses with resolved, error_code, and routing metadata.

from respf import (
    ResearchPaperDownloader,
    agent_capabilities,
    agent_fetch,
    agent_lookup,
    agent_resolve,
    download_paper,
    resolve_identifier,
    list_sources,
    parse_identifier,
)

# Agent session bootstrap
print(agent_capabilities())

# Discover sources
print(list_sources())

# Route before downloading (agents)
routing = resolve_identifier("10.1038/nature12373")
# {"kind": "doi", "recommended_sources": ["direct_url", "unpaywall", ...], ...}

downloader = ResearchPaperDownloader(download_dir="papers")
result = downloader.download_paper("10.1038/nature12373")
# result["success"], result["results"][0]["filepath"], result["resolved"]

info = downloader.get_paper_info("10.1038/nature12373")  # no PDF download

# Or agent helpers (stable JSON shapes)
agent_lookup("10.1038/nature12373")
agent_fetch("10.1038/nature12373", dry_run=True)

Environment (optional)

Variable Purpose
UNPAYWALL_EMAIL Polite pool email for Unpaywall API
OPENALEX_EMAIL Polite pool for OpenAlex
SEMANTIC_SCHOLAR_API_KEY Higher rate limits for Semantic Scholar

Accuracy (no LLM)

  • Identifier routing: DOI, PMID, PMC, ArXiv, bioRxiv, and direct PDF URLs go to the right source first.
  • Title search: difflib similarity; downloads rejected if best match score < 0.62 (ArXiv/OpenAlex/Semantic Scholar).
  • PDF verification: Every download checked for %PDF magic bytes and minimum size.

PDF Summarization

pip install respf[summarize]
respf --summarize --dir ./papers

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

respf-1.3.1.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

respf-1.3.1-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file respf-1.3.1.tar.gz.

File metadata

  • Download URL: respf-1.3.1.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for respf-1.3.1.tar.gz
Algorithm Hash digest
SHA256 040c8f4ebbd34bbb104d59e7a2ae39c7d56b76acbbcc858df452513518b92a7e
MD5 a6aa9a05c9e47af0743865579b918863
BLAKE2b-256 b2956a3895b47188eca5a18297356584789a5c1da60dc4c2d20acdd0d029f309

See more details on using hashes here.

File details

Details for the file respf-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: respf-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for respf-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77c2cef7ce2811051971e460b55c9039ec5f194021834b0f830f37a2d7d8f7fa
MD5 726ed5fce474e6ba377a2ac50f26af04
BLAKE2b-256 9128df5f462ddd508849a2b81ef7e8c70baf23879529e88078fd994889531fd1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page