Skip to main content

One-line multi-source academic literature review (11 free APIs)

Project description

litreview

One-line multi-source academic literature review using 11 free APIs — no paid subscriptions required.

Default run uses 9 sources (no API key). Add semantic_scholar or core with a free API key when you want them.

Install

pip install litreview-search

For Excel export (--excel):

pip install "litreview-search[excel]"

Note: The PyPI name litreview is taken by an unrelated legacy package. This project publishes as litreview-search. The CLI command is still litreview, and the Python import is still from litreview import review.

Install from GitHub (alternative):

pip install git+https://github.com/abdullahkarasan/litreview.git

Usage

Python

from litreview import review

papers, stats = review("federated learning privacy")

That's it. Results are saved as .json in the current folder.

Add excel=True (Python) or --excel (CLI) for a styled spreadsheet too.

papers, stats = review("federated learning privacy", excel=True)
litreview "federated learning privacy" --excel

Command line

litreview "federated learning privacy"

Multi-word and multiple topics

Multi-word queries (use quotes in the shell)

A topic with spaces is one search phrase, not separate keywords. Each API receives the full string (e.g. "federated learning privacy").

CLI — wrap the phrase in quotes so the shell passes it as a single argument:

litreview "federated learning privacy"
litreview "retrieval augmented generation"

Without quotes, only the first word is used:

litreview federated learning privacy   # searches "federated" only

Python — pass a normal string; no special quoting needed:

papers, stats = review("federated learning privacy")

Output filenames turn spaces into underscores: federated_learning_privacy.json.

Multiple topics — separate files (loop)

Call review() once per topic. Each run writes its own JSON (and optional Excel) file:

from litreview import review

topics = [
    "federated learning privacy",
    "differential privacy healthcare",
    "machine learning fairness",
]

for topic in topics:
    papers, stats = review(topic)

CLI equivalent:

for topic in "federated learning privacy" "differential privacy healthcare"; do
  litreview "$topic"
done

Multiple topics — one merged file (run_search)

To search several topics in a single run and save one combined JSON/Excel (with a Category column per topic), use Settings and run_search():

from pathlib import Path

from litreview.config import Settings
from litreview.pipeline import run_search

settings = Settings(
    output_basename="multi_topic_review",
    year_start=2020,
    year_end=2026,
    export_excel=True,
    required_title_terms=[],   # same open search as review()
    relevance_rag_terms=[],
    search_plans=[
        {"category": "Federated learning privacy", "default_query": "federated learning privacy"},
        {"category": "DP in healthcare", "default_query": "differential privacy healthcare"},
    ],
)

papers, stats = run_search(settings=settings, output_dir=Path("."))
# → multi_topic_review.json, multi_topic_review.xlsx

Each entry in search_plans needs a category (label in output) and default_query (search text). You can also set per-source queries, e.g. "arxiv": "federated learning", when a source needs different wording.

Options

papers, stats = review(
    "transformer attention mechanism",
    year_start=2022,          # default: 2020
    year_end=2026,            # default: 2026
    max_per_query=200,        # results per source, default: 100
    output_dir="results/",    # default: current directory
    excel=True,               # also save .xlsx, default: False
    sources=["semantic_scholar", "arxiv", "openalex"],
    debug=True,               # show live progress, default: True
)
litreview "CRISPR gene editing" --year-start 2022 --sources semantic_scholar arxiv
litreview "climate change AI" --output-dir ./results --excel --max 200 --no-debug

Sources

Source Key Notes
Semantic Scholar semantic_scholar Required SEMANTIC_SCHOLAR_API_KEY (free)
arXiv arxiv Free, no key needed
OpenAlex openalex Free, set OPENALEX_MAILTO for polite pool
Crossref crossref Free, set CROSSREF_MAILTO
Europe PMC europe_pmc Free
PubMed pubmed Optional NCBI_API_KEY + NCBI_EMAIL
DBLP dblp Free, CS-focused
DOAJ doaj Open access journals
HAL hal French open archive
Zenodo zenodo Free
CORE core Required CORE_API_KEY (free registration)

Output

Each run saves a JSON file named after your keyword:

  • federated_learning_privacy.json — array of papers (Title, Authors, Year, Venue, Citations, Category, Source, DOI, URL, Abstract).

Optional Excel (--excel or excel=True):

  • federated_learning_privacy.xlsx — styled spreadsheet with summary sheets by source and category.

Optional API Keys (environment variables)

export SEMANTIC_SCHOLAR_API_KEY=your_key   # required for --sources semantic_scholar
export CORE_API_KEY=your_key               # required for --sources core
export NCBI_API_KEY=your_key               # optional, faster PubMed
export NCBI_EMAIL=you@example.com
export OPENALEX_MAILTO=you@example.com     # polite pool (faster)
export CROSSREF_MAILTO=you@example.com     # polite pool (faster)

When you include semantic_scholar or core in --sources, litreview prompts for the key if it is not already set (terminal only).

litreview "topic" --sources semantic_scholar arxiv
# prompts: Enter SEMANTIC_SCHOLAR_API_KEY:

litreview "topic" --sources semantic_scholar --semantic-scholar-key YOUR_KEY

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

litreview_search-0.1.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

litreview_search-0.1.1-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file litreview_search-0.1.1.tar.gz.

File metadata

  • Download URL: litreview_search-0.1.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for litreview_search-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4d5abb29ceed1516698e381f5e43cbc44477035fc5e6fc6e79a9380871b16854
MD5 83f1a7ddc4b8ac3b6fabae57b033ccd1
BLAKE2b-256 5a9eb634f31d568d4532d4204c8bcc99ba115e273611624c9712ff2a1d02f4d2

See more details on using hashes here.

File details

Details for the file litreview_search-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for litreview_search-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b50ff282a598e00ff55f077f4b2c1b523083299c5668393bae18e4697f04e2b
MD5 1dcec91236b909c3c0a3e3eca570d851
BLAKE2b-256 170b6e9d4345c073a34a6415e5ef5e1d0296ceaf7315179db55b1fedfd509a3b

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