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.0.tar.gz (44.3 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.0-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: respf-1.3.0.tar.gz
  • Upload date:
  • Size: 44.3 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.0.tar.gz
Algorithm Hash digest
SHA256 f7208fc20229b1b2bc88a4a699d133117822e6d2132a4b28920fe1841f6a1577
MD5 fe5337dfbfe95b6d0ce1ba74158a4614
BLAKE2b-256 6b1a7ca6441d4b75a8e766a3d57d9b5ffb44675819aa93c2d494bd28e9ce8479

See more details on using hashes here.

File details

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

File metadata

  • Download URL: respf-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 58.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e85c40c62fbdaff7ccb020b9e5fefd296c452f6530b2c772a4c7265736bc8bcb
MD5 7852983eb3a6160b67b11834ceb62696
BLAKE2b-256 922fe9daa6f946266c8829390779427021c20ebf46309491abf38c280b411cbd

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