GnistAI GnistAI
Log in

Getting Started with NIH RePORTER

Search 2.9M+ NIH-funded research projects — $50B+/year across all scientific disciplines. Project details, investigators, funding amounts, abstracts, and linked publications.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Science

Data source: NIH RePORTER API

Overview

NIH RePORTER wraps NIH RePORTER API, handling authentication, pagination, and rate limits for you. This tutorial covers all 5 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-nih-reporter": {
      "url": "https://context.gnist.ai/mcp/nih-reporter/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (5)

search_projects

Search NIH-funded research projects across all NIH institutes. Covers 2.9M+ projects with $50B+/year in funding. Includes project details, principal investigators, award amounts, and abstracts. Data from NIH RePORTER. Args: query: Search term for project titles, abstracts, and terms. fiscal_years: Fiscal years to filter by. org_names: Organization names to filter by. pi_name: Principal investigator name to filter by. activity_codes: NIH activity codes to filter by. limit: Number of results (1–50, default 20). Returns: List of matching projects with title, PI, organization, funding amount, and abstract excerpt. Use project_num with get_project or get_publications for more details.

ParameterTypeRequiredDescription
querystringrequiredSearch term for NIH-funded projects (e.g. "cancer immunotherapy", "CRISPR gene editing", "Alzheimer biomarkers").
fiscal_yearsanyoptionalFiscal years to filter by (e.g. [2023, 2024]). Omit for all years.
org_namesanyoptionalOrganization names to filter by (e.g. ["Harvard", "MIT"]).
pi_nameanyoptionalPrincipal investigator name to filter by.
activity_codesanyoptionalNIH activity codes (e.g. ["R01", "R21", "U01"]). R01=standard research, R21=exploratory, K=career development, U=cooperative agreement, P=program project.
limitintegeroptionalNumber of results (1–50, default 20). (default: 20)
curl -X POST "https://context.gnist.ai/mcp/nih-reporter/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_projects", "arguments": {"query": "cancer immunotherapy"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/nih-reporter/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'query': 'cancer immunotherapy'},
            'name': 'search_projects'}},
)
print(resp.json())

get_project

Get detailed information about a specific NIH-funded project. Returns the full project record including abstract, investigators, funding, dates, and MeSH terms. Use the project_num from search_projects results. Args: project_num: NIH project number. Returns: Project details with abstract, investigators, organization, funding amount, activity dates, and research terms. Returns found=false if project not found.

ParameterTypeRequiredDescription
project_numstringrequiredNIH project number (e.g. "R01CA227622", "5R01AI123456-03"). Found in search_projects results.
curl -X POST "https://context.gnist.ai/mcp/nih-reporter/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_project", "arguments": {"project_num": "R01CA227622"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/nih-reporter/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'project_num': 'R01CA227622'}, 'name': 'get_project'}},
)
print(resp.json())

get_publications

Get PubMed publications linked to an NIH-funded project. Returns PubMed IDs (PMIDs) for papers that acknowledged NIH funding from the specified project. Use PMIDs with PubMed for full paper details. Args: project_num: NIH core project number. limit: Number of results (1–50, default 20). Returns: List of PubMed IDs linked to the project. Use with pubmed server for full paper details.

ParameterTypeRequiredDescription
project_numstringrequiredNIH core project number (e.g. "R01CA227622"). Found in search_projects results.
limitintegeroptionalNumber of results (1–50, default 20). (default: 20)
curl -X POST "https://context.gnist.ai/mcp/nih-reporter/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_publications", "arguments": {"project_num": "R01CA227622"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/nih-reporter/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'project_num': 'R01CA227622'},
            'name': 'get_publications'}},
)
print(resp.json())

get_funding_trends

Track NIH funding trends for a research topic across fiscal years. Shows how many projects were funded and total sampled award amounts for each year. Useful for understanding research funding priorities and growth areas. Args: query: Research topic to track. fiscal_years: Fiscal years to compare. Returns: Per-year project counts and sampled funding totals. Note: funding totals are based on up to 500 sampled projects per year, not exhaustive sums.

ParameterTypeRequiredDescription
querystringrequiredResearch topic to track funding for (e.g. "machine learning", "mRNA vaccines", "climate health").
fiscal_yearslist[integer]requiredFiscal years to compare (e.g. [2020, 2021, 2022, 2023, 2024]). Minimum 1, maximum 20.
curl -X POST "https://context.gnist.ai/mcp/nih-reporter/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_funding_trends", "arguments": {"query": "machine learning", "fiscal_years": "[2020"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/nih-reporter/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'fiscal_years': '[2020', 'query': 'machine learning'},
            'name': 'get_funding_trends'}},
)
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'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/nih-reporter/" \
  -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/nih-reporter/",
    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

Search then retrieve
Use search_projects to find items, then get_project to get full details. This two-step pattern is common for exploring data before drilling down.
Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.

FAQ

What data does NIH RePORTER provide?

Search 2.9M+ NIH-funded research projects — $50B+/year across all scientific disciplines. Project details, investigators, funding amounts, abstracts, and linked publications. It exposes 5 tools: search_projects, get_project, get_publications, get_funding_trends, 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 NIH RePORTER API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials