Data source: Semantic Scholar API
Overview
Semantic Scholar wraps Semantic Scholar API, handling authentication, pagination, and rate limits for you. This tutorial covers all 8 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-semantic-scholar": {
"url": "https://context.gnist.ai/mcp/semantic-scholar/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (8)
search_papers
Search 200M+ academic papers in Semantic Scholar. Find papers across all scientific disciplines. Returns titles, authors, citation counts, venues, and links to open-access PDFs when available. Use paper IDs from results with get_paper, get_citations, get_references, and recommend_papers. Args: query: Search keywords or phrase. limit: Number of results (1-100, default 10). offset: Pagination offset for paging through results. year: Year or year range filter. fields_of_study: Filter by academic field(s). Returns: Papers with paperId, title, year, venue, authors, citationCount, doi.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search query for academic papers (e.g. "transformer attention mechanism", "CRISPR gene editing", "climate change mitigation"). |
limit | integer | optional | Number of results to return (1-100, default 10). (default: 10) |
offset | integer | optional | Pagination offset for additional results (default 0). (default: 0) |
year | any | optional | Year filter — single year ("2023"), range ("2020-2023"), or open range ("2020-"). |
fields_of_study | any | optional | Filter by academic field (e.g. ["Computer Science"], ["Medicine", "Biology"]). |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_papers", "arguments": {"query": "transformer attention mechanism"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': 'transformer attention mechanism'},
'name': 'search_papers'}},
)
print(resp.json())
get_paper
Get detailed information about a specific academic paper. Retrieve full paper details including abstract, citation/reference counts, authors, fields of study, and AI-generated TLDR summary. Accepts multiple ID formats: Semantic Scholar paper ID, DOI, ArXiv ID, PMID, or CorpusId. Args: paper_id: Paper identifier in any supported format. Returns: Full paper details with abstract, authors, citations, TLDR, and links.
| Parameter | Type | Required | Description |
|---|---|---|---|
paper_id | string | required | Paper identifier — S2 ID (40-char hex), DOI (e.g. "10.1038/s41586-021-03819-2"), ArXiv ID (e.g. "2301.12345"), or prefixed ID (e.g. "PMID:12345", "CorpusId:12345"). |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_paper", "arguments": {"paper_id": "10.1038/s41586-021-03819-2"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'paper_id': '10.1038/s41586-021-03819-2'},
'name': 'get_paper'}},
)
print(resp.json())
get_citations
Get papers that cite a given paper. Explore a paper's citation graph by finding all papers that reference it. Useful for tracking research impact, finding follow-up work, and discovering how a paper has influenced subsequent research. Args: paper_id: Paper identifier in any supported format. limit: Number of citing papers to return (1-100, default 20). offset: Pagination offset. Returns: List of citing papers with title, year, venue, authors, citationCount.
| Parameter | Type | Required | Description |
|---|---|---|---|
paper_id | string | required | Paper identifier (S2 ID, DOI, ArXiv ID, or prefixed ID). |
limit | integer | optional | Number of citing papers to return (1-100, default 20). (default: 20) |
offset | integer | optional | Pagination offset (default 0). (default: 0) |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_citations", "arguments": {"paper_id": "12345"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'paper_id': '12345'}, 'name': 'get_citations'}},
)
print(resp.json())
get_references
Get papers referenced by a given paper. Explore a paper's bibliography — the works it cites. Useful for understanding a paper's foundations, finding seminal works in a field, and building reading lists from authoritative sources. Args: paper_id: Paper identifier in any supported format. limit: Number of referenced papers to return (1-100, default 20). offset: Pagination offset. Returns: List of referenced papers with title, year, venue, authors, citationCount.
| Parameter | Type | Required | Description |
|---|---|---|---|
paper_id | string | required | Paper identifier (S2 ID, DOI, ArXiv ID, or prefixed ID). |
limit | integer | optional | Number of referenced papers to return (1-100, default 20). (default: 20) |
offset | integer | optional | Pagination offset (default 0). (default: 0) |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_references", "arguments": {"paper_id": "12345"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'paper_id': '12345'}, 'name': 'get_references'}},
)
print(resp.json())
search_authors
Search for academic authors by name. Find researchers by name and see their publication counts, citation counts, h-index, and institutional affiliations. Use authorId from results with get_author for detailed profiles. Args: query: Author name to search for. limit: Number of results (1-100, default 10). Returns: Authors with authorId, name, paperCount, citationCount, hIndex, affiliations.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Author name to search for (e.g. "Yann LeCun", "Geoffrey Hinton"). |
limit | integer | optional | Number of results to return (1-100, default 10). (default: 10) |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_authors", "arguments": {"query": "Yann LeCun"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': 'Yann LeCun'}, 'name': 'search_authors'}},
)
print(resp.json())
get_author
Get an author's profile by Semantic Scholar author ID. Retrieve detailed author information including paper count, citation count, h-index, and affiliations. Args: author_id: Numeric S2 author ID from search_authors results. Returns: Author profile with name, paperCount, citationCount, hIndex, affiliations.
| Parameter | Type | Required | Description |
|---|---|---|---|
author_id | string | required | Semantic Scholar author ID (numeric, e.g. "1688882"). |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_author", "arguments": {"author_id": "1688882"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'author_id': '1688882'}, 'name': 'get_author'}},
)
print(resp.json())
recommend_papers
Get paper recommendations based on a seed paper. Uses Semantic Scholar's recommendation engine to find related papers you might want to read next. Useful for literature review, discovering adjacent research, and expanding knowledge in a topic area. Args: paper_id: Paper to get recommendations for. limit: Number of recommendations (1-100, default 10). Returns: Recommended papers similar to the seed paper.
| Parameter | Type | Required | Description |
|---|---|---|---|
paper_id | string | required | Paper identifier (S2 ID, DOI, ArXiv ID, or prefixed ID) to get recommendations for. |
limit | integer | optional | Number of recommendations (1-100, default 10). (default: 10) |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "recommend_papers", "arguments": {"paper_id": "12345"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'paper_id': '12345'}, 'name': 'recommend_papers'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/semantic-scholar/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/semantic-scholar/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use
search_papers to find items, then get_paper to get full details. This two-step pattern is common for exploring data before drilling down.Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does Semantic Scholar provide?
Search 200M+ academic papers, explore citation graphs, find author profiles, and get AI-powered paper recommendations across all scientific disciplines. It exposes 8 tools: search_papers, get_paper, get_citations, get_references, search_authors, get_author, recommend_papers, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the Semantic Scholar API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.