Skip to main content

Scientific paper search and ranking across OpenAlex, Semantic Scholar, and Unpaywall

Project description

paper-search

Search and rank scientific papers across multiple academic APIs from the command line.

Queries OpenAlex (250M+ works), Semantic Scholar (215M+ papers), and Unpaywall in parallel, merges results by DOI, and outputs ranked papers with citation counts, TLDRs, and PDF links. Use --save to persist results to .claude/papers.md for use as project context in Claude Code.

Installation

uv tool install paper-search

Or from source:

git clone https://github.com/Csed-dev/paper-search.git
cd paper-search
uv sync

Quick Start

# Search papers by topic, ranked by citations
paper-search search "large language models" -n 10

# Filter by year
paper-search search "vision transformers" --year 2024 --sort date

# Find similar papers (accepts DOI, arXiv ID, or Semantic Scholar ID)
paper-search recommend 1706.03762 -n 10

# Save results to .claude/papers.md in current project
paper-search search "reinforcement learning" --save

# Enable PDF links via Unpaywall
paper-search search "graph neural networks" --email you@example.com

Example Output

$ paper-search search "attention mechanism" -n 5

  Results for: attention mechanism
  5 papers, sorted by citations

    1. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks (2016) [52848 citations] (9606 influential) [OA]
       Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun
       DOI: 10.1109/tpami.2016.2577031
       PDF: https://arxiv.org/pdf/1506.01497

    2. Effective Approaches to Attention-based Neural Machine Translation (2015) [8517 citations] [OA]
       Thang Luong, Hieu Pham, Christopher D. Manning
       DOI: 10.18653/v1/d15-1166

    3. Attention mechanisms in computer vision: A survey (2022) [2242 citations] [OA]
       Meng-Hao Guo, Tian-Xing Xu, Jiangjiang Liu, Zheng-Ning Liu, Peng-Tao Jiang +5 more
       DOI: 10.1007/s41095-022-0271-y
       PDF: https://arxiv.org/pdf/2111.07624

What It Does

paper-search search "query"
        |
        +--- OpenAlex ---------- phrase search, topic taxonomy, citation ranking
        |
        +--- Semantic Scholar -- TLDR summaries, influential citations
        |
        +--- Unpaywall --------- OA PDF links (when --email is set)
        |
        v
    Merge by DOI -> Rank -> Display / Save

Results include: title, authors, citation count (with influential count from S2), abstract, TLDR, DOI, PDF link, and topics.

Commands

search (alias: s)

paper-search search "query" [options]
Flag Description
-n, --limit N Number of results (default: 10)
-y, --year YYYY Filter by publication year
--sort citations|date|relevance Sort order (default: citations)
--save Append results to .claude/papers.md
--email EMAIL Enable Unpaywall PDF links + faster OpenAlex
--s2-key KEY Semantic Scholar API key

recommend (alias: r)

paper-search recommend <paper_id> [options]

Accepts DOI (10.1038/s41586-023-06291-2), arXiv ID (1706.03762, hep-th/9905111), or Semantic Scholar ID.

Same --save, --email, --s2-key, -n flags as search.

Environment Variables

Set these to avoid passing flags every time:

Variable Description
PAPER_SEARCH_EMAIL Email for OpenAlex polite pool + Unpaywall
PAPER_SEARCH_S2_KEY Semantic Scholar API key

The --save Flag

When used inside a project directory, --save writes results to .claude/papers.md. This file persists as context for Claude Code, making your paper references available in future conversations.

cd my-research-project
paper-search search "federated learning" -n 15 --save
# Creates .claude/papers.md with formatted paper references

Running the same query twice with --save won't duplicate the section.

API Keys (Free)

Both APIs offer free keys for higher rate limits:

The tool works without keys, just with lower rate limits.

Development

git clone https://github.com/Csed-dev/paper-search.git
cd paper-search
uv sync --group dev
uv run pytest

Tests use captured API fixtures (no network calls):

uv run pytest tests/ -v    # 71 tests, runs in <1s

To refresh fixtures from live APIs:

uv run python tests/capture_fixtures.py

Contributing

See CONTRIBUTING.md for guidelines.

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

paper_search-0.1.0.tar.gz (480.6 kB view details)

Uploaded Source

Built Distribution

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

paper_search-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file paper_search-0.1.0.tar.gz.

File metadata

  • Download URL: paper_search-0.1.0.tar.gz
  • Upload date:
  • Size: 480.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for paper_search-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25dfc0558a66ebc57fc6fd1f3be3baed75d834d6b8c510581b0afb1899e22b0f
MD5 53c67a65f394d6d742b821db5dca9e2d
BLAKE2b-256 ffe2822938c1526e5aaee420bce7f5060446489596810926da56904bebd1e280

See more details on using hashes here.

Provenance

The following attestation bundles were made for paper_search-0.1.0.tar.gz:

Publisher: release.yml on Csed-dev/paper-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file paper_search-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: paper_search-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for paper_search-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc2e0f434beb54b486756d49c0336a3661abe7f86f05ca8a170ea309c234941
MD5 dad894ce09681884ae25c34f578b2036
BLAKE2b-256 b9e01183c4926f7b32354ce1d3cb48ac4ccc220ed6148a33b5c62f84b1bf2621

See more details on using hashes here.

Provenance

The following attestation bundles were made for paper_search-0.1.0-py3-none-any.whl:

Publisher: release.yml on Csed-dev/paper-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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