Skip to main content

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

Metadata

Release files for respf 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for respf 1.3.1
File Size Uploaded Provenance Actions
respf-1.3.1.tar.gz 47.7 kB Without provenance Details for respf-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for respf 1.3.1
File Interpreter ABI Platform Actions
respf-1.3.1-py3-none-any.whl Python 3 none any Details for respf-1.3.1-py3-none-any.whl

Total release size: 106.4 kB

Release files / respf-1.3.1.tar.gz

Download URL respf-1.3.1.tar.gz
Size 47.7 kB
Tags Source
SHA-256 checksum
How to use checksums
040c8f4ebbd34bbb104d59e7a2ae39c7d56b76acbbcc858df452513518b92a7e
BLAKE2b-256 checksum
How to use checksums
b2956a3895b47188eca5a18297356584789a5c1da60dc4c2d20acdd0d029f309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / respf-1.3.1-py3-none-any.whl

Download URL respf-1.3.1-py3-none-any.whl
Size 58.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77c2cef7ce2811051971e460b55c9039ec5f194021834b0f830f37a2d7d8f7fa
BLAKE2b-256 checksum
How to use checksums
9128df5f462ddd508849a2b81ef7e8c70baf23879529e88078fd994889531fd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for respf 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files No provenance

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page