semantic-scholar-database

Access the Semantic Scholar Graph API to search papers and retrieve paper/author/citation data when you need literature discovery or citation graph exploration.

53 stars

Best use case

semantic-scholar-database is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Access the Semantic Scholar Graph API to search papers and retrieve paper/author/citation data when you need literature discovery or citation graph exploration.

Teams using semantic-scholar-database should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/semantic-scholar-database/SKILL.md --create-dirs "https://raw.githubusercontent.com/aipoch/medical-research-skills/main/scientific-skills/Evidence Insight/semantic-scholar-database/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/semantic-scholar-database/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How semantic-scholar-database Compares

Feature / Agentsemantic-scholar-databaseStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Access the Semantic Scholar Graph API to search papers and retrieve paper/author/citation data when you need literature discovery or citation graph exploration.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)

## When to Use

- You need to find relevant papers by keyword, title, or known identifiers (e.g., Semantic Scholar Paper ID).
- You want to fetch detailed metadata for a paper (abstract, venue, year, fields of study, etc.).
- You need author-centric information such as an author profile and their publications.
- You want to explore a citation network by traversing references or citations for a given paper.
- You are building a literature review workflow that requires programmatic access to scholarly graph data.

## Key Features

- Paper search via the Semantic Scholar Graph API.
- Paper details retrieval (e.g., abstract, venue, citations-related fields depending on requested fields).
- Author details retrieval (author profile and associated papers depending on requested fields).
- Citation graph traversal:
  - Fetch papers that cite a target paper (`citations`)
  - Fetch papers referenced by a target paper (`references`)
- Optional API key support for higher rate limits via environment variable.

## Dependencies

- Python `>=3.9`
- `requests >=2.25.0`

## Example Usage

```python
import os
from scripts.client import (
    search_papers,
    get_paper_details,
    get_author_details,
    get_citations,
)

# Optional: set for higher rate limits
# os.environ["S2_API_KEY"] = "YOUR_API_KEY"

def main():
    # 1) Search papers
    results = search_papers(query="Attention Is All You Need", limit=5)
    print("Search results (top 5):")
    for i, p in enumerate(results, 1):
        # The exact keys depend on the fields requested by the client implementation.
        print(f"{i}. {p.get('title')} ({p.get('year')}) - paperId={p.get('paperId')}")

    # 2) Get paper details
    paper_id = "649def34f8be52c8b66281af98ae884c09aef38b"
    paper = get_paper_details(paper_id=paper_id)
    print("\nPaper details:")
    print("Title:", paper.get("title"))
    print("Venue:", paper.get("venue"))
    print("Year:", paper.get("year"))
    print("Abstract:", (paper.get("abstract") or "")[:300], "...")

    # 3) Get author details
    author_id = "1741101"
    author = get_author_details(author_id=author_id)
    print("\nAuthor details:")
    print("Name:", author.get("name"))
    print("AuthorId:", author.get("authorId"))

    # 4) Traverse citations / references
    citing = get_citations(paper_id=paper_id, method="citations")
    refs = get_citations(paper_id=paper_id, method="references")
    print("\nCitation traversal:")
    print("Citations count:", len(citing) if isinstance(citing, list) else "N/A")
    print("References count:", len(refs) if isinstance(refs, list) else "N/A")

if __name__ == "__main__":
    main()
```

## Implementation Details

- **API Endpoint**: The skill communicates with the Semantic Scholar Graph API:
  - Base URL: `https://api.semanticscholar.org/graph/v1/`
- **HTTP Client**: Uses `requests` to perform REST calls.
- **Authentication / Rate Limits**:
  - If `S2_API_KEY` is set in the environment, requests should include it (typically via an `x-api-key` header) to obtain higher rate limits.
  - Without an API key, the API may enforce stricter rate limiting.
- **Core Operations** (as implemented in `scripts/client.py`):
  - `search_papers(query, limit=...)`: queries the search endpoint and returns a list of matching papers.
  - `get_paper_details(paper_id)`: fetches metadata for a specific paper ID.
  - `get_author_details(author_id)`: fetches metadata for a specific author ID.
  - `get_citations(paper_id, method="citations"|"references")`: traverses the citation graph by selecting either inbound citations or outbound references.
- **Parameters**:
  - `limit`: controls the maximum number of results returned by search.
  - `method`: must be either `"citations"` or `"references"` to select traversal direction.

Related Skills

uspto-database

53
from aipoch/medical-research-skills

Access USPTO data (Patent Search, PEDS, TSDR, assignments) when you need to query patents/trademarks and retrieve prosecution or status information programmatically.

zinc-database

53
from aipoch/medical-research-skills

Access the ZINC (230M+ purchasable compounds) database when you need to look up compounds by ZINC ID/SMILES, run similarity/analog searches, or download 3D ready-to-dock structures for virtual screening and drug discovery.

uniprot-database

53
from aipoch/medical-research-skills

Direct REST API access to UniProt for protein search, entry retrieval, and identifier mapping; use when you need programmatic UniProtKB queries or cross-database ID conversion.

string-database

53
from aipoch/medical-research-skills

Access the STRING database to map identifiers, retrieve protein–protein interaction networks, and run functional/PPI enrichment when you need interaction context for a gene/protein set.

scite-database

53
from aipoch/medical-research-skills

Access Scite.ai Smart Citations to classify how a paper is cited (supporting, contrasting, mentioning) and assess scientific claims; use it when you need to evaluate a paper’s reliability or its acceptance in the literature.

scholar-evaluation

53
from aipoch/medical-research-skills

Implements the ScholarEval framework to evaluate scholarly documents; trigger when the user provides a PDF/DOCX/TXT file or pasted text and requests critique, scoring, or quality assessment.

pubchem-database-skill

53
from aipoch/medical-research-skills

Programmatic access to the PubChem database (via PUG-REST API and PubChemPy) for searching chemical compounds, retrieving physicochemical properties, performing structure similarity/substructure searches, and obtaining bioactivity data.

pdb-database

53
from aipoch/medical-research-skills

Access the RCSB Protein Data Bank (PDB) to search, download, and programmatically retrieve 3D macromolecular structures and metadata; use when you need structure discovery (text/sequence/3D similarity) or automated structural data ingestion for structural biology and drug discovery workflows.

kegg-database

53
from aipoch/medical-research-skills

Direct access to KEGG via the REST API for academic-only pathway/gene/compound/drug queries; use when you need precise HTTP-level control or targeted KEGG ID mapping.

hmdb-database

53
from aipoch/medical-research-skills

Access the Human Metabolome Database (HMDB) to search metabolites by name/structure/ID and extract chemical/biological/clinical fields when you need metabolomics research data or automated HMDB XML mining.

gwas-database

53
from aipoch/medical-research-skills

Query the NHGRI-EBI GWAS Catalog to retrieve SNP–trait associations, study metadata, and (when available) summary statistics when you need evidence for a variant, trait/disease, gene, or genomic region.

gene-database

53
from aipoch/medical-research-skills

Query the NCBI Gene database via E-utilities and the NCBI Datasets API; use it when you need to search genes by symbol/ID and retrieve annotations (RefSeq, GO, location, phenotype) for single or batch gene lists.