# NIH Grants Scraper — RePORTER Funding & PI Data (`devilscrapes/nih-reporter-grants-scraper`) Actor

Search NIH RePORTER and export funded grants — project title, abstract, award amount, fiscal year, recipient institution, principal investigator and NIH institute/center — as clean JSON, CSV or Excel.

- **URL**: https://apify.com/devilscrapes/nih-reporter-grants-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## NIH Grants Scraper — RePORTER Funding & PI Data

**💰 $6.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Search NIH RePORTER and export funded grants — project title, abstract, award amount, fiscal year, recipient institution, principal investigator and NIH institute/center — as clean JSON, CSV or Excel.

</div>

***

> **Quick answer:** The **NIH Grants Scraper** searches NIH RePORTER and exports funded grants — project title, abstract, award amount, fiscal year, recipient institution, principal investigator and NIH institute/center — into JSON, CSV or Excel. RePORTER's full corpus is about 2.9 million project records and its API caps how deep any one query can page, so we require a real filter (fiscal year, text, institution, PI or agency) before a run starts, page within NIH's own ceilings, and unpack its bracket-packed `<Term A><Term B>` topic strings into a real JSON array. Pricing is pay-per-result — **$6.20 per 1 000 grants**, no subscription, no card required to try it.

### 🎯 What this scrapes

NIH RePORTER is the federal government's public record of every grant it funds — but its unfiltered corpus is 2.9 million project records, its search API caps how deep any single query can page, and it packs research topics into a single string like <code>\<Term A>\<Term B></code> instead of a usable list. This Actor requires a real filter (fiscal year, text, institution, PI or agency), pages within the platform's own limits, and flattens every project — title, abstract, award amount, institution, PI and agency — into one clean row.

### 🔥 What we handle for you

- 🏛️ **Required-filter guardrail** — we block an unfiltered run before it starts so you never accidentally pay for a crawl of NIH's entire 2.9M-project history.
- 🔁 **Retries with exponential backoff** on `429`/`5xx` and transient network errors — up to 5 attempts per page.
- 📄 **Pagination that respects NIH's own ceilings** — page size and offset limits handled for you, with a clear status message if a search is too broad to page all the way through.
- 🧹 **Terms and PI lists flattened** — NIH's bracket-packed `<Term A><Term B>` strings become a real JSON array, and every principal investigator is a structured record.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for grant records that hit your dataset. No data, no charge.

### 💡 Use cases

- Track who got NIH funding in your therapeutic area before a partnership or licensing conversation.
- Build a competitive-intelligence feed of a rival institution's or PI's active grants.
- Size a research niche's funding trend across fiscal years for a market or investment thesis.
- Feed a grant-writing or business-development CRM with fresh award data instead of a stale export.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `fiscalYears` | `array` | no | \[2024] | Only grants active/awarded in these fiscal years, e.g. <code>\[2024, 2025]</code>. |
| `textSearch` | `string` | no | 'cancer immunotherapy' | Match this text against project title, abstract and indexed research terms. |
| `orgNames` | `array` | no | '—' | Recipient institution names to match, e.g. 'Harvard University'. |
| `piNames` | `array` | no | '—' | Principal investigator names to match, e.g. 'Smith'. |
| `agencies` | `array` | no | '—' | NIH institute/center abbreviation codes to match, e.g. 'NCI', 'NIAID'. |
| `minAwardAmount` | `integer` | no | '—' | Only grants awarded at least this much, in US dollars. |
| `maxAwardAmount` | `integer` | no | '—' | Only grants awarded at most this much, in US dollars. |
| `maxResults` | `integer` | no | 100 | Stop after this many grant records. Each record is one billed result row. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | NIH RePORTER is a public federal API and does not need a proxy. Leave this off unless your account requires egress… |

#### Example input

```json
{
  "fiscalYears": [
    2024
  ],
  "textSearch": "cancer immunotherapy",
  "maxResults": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `appl_id` | `integer` | NIH RePORTER application ID. |
| `project_num` | `string` | Full project number for this fiscal year. |
| `core_project_num` | `string` | Project number without the year suffix. |
| `project_title` | `string` | Project title. |
| `abstract_text` | `string` | Project abstract as submitted to NIH. |
| `fiscal_year` | `integer` | Fiscal year of this award record. |
| `award_amount` | `number` | Total award amount, USD. |
| `direct_cost_amt` | `number` | Direct cost portion, USD. |
| `indirect_cost_amt` | `number` | Indirect cost portion, USD. |
| `org_name` | `string` | Recipient institution name. |
| `org_city` | `string` | Recipient institution city. |
| `org_state` | `string` | Recipient institution US state code. |
| `org_country` | `string` | Recipient institution country. |
| `agency_code` | `string` | Funding NIH institute/center abbreviation. |
| `agency_name` | `string` | Funding NIH institute/center full name. |
| `contact_pi_name` | `string` | Contact principal investigator, as printed. |
| `investigators` | `array` | All listed principal investigators. |
| `project_start_date` | `string` | Project period start. |
| `project_end_date` | `string` | Project period end. |
| `is_active` | `boolean` | Whether the project is currently active. |
| `spending_categories_desc` | `string` | Human-readable NIH spending/topic categories. |
| `terms` | `array` | Indexed research terms for this project. |
| `project_detail_url` | `string` | NIH RePORTER project detail page. |

#### Example output

```json
{}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result` | $0.006 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$6.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Returns NIH RePORTER's published record only — no reviewer scores, summary statements or non-NIH federal funders.
- A single search can page roughly 15,000 records deep; broader topics need multiple narrower runs (e.g. one per fiscal year).

### ❓ FAQ

**Do I need an API key?**

No. NIH RePORTER's search API is public and keyless — you just need a filter narrow enough to page through.

**Why do I have to set a filter?**

NIH RePORTER's unfiltered corpus is 2.9 million project records. Requiring at least one of fiscal year, text, institution, PI or agency keeps a run scoped and affordable.

**Is there a limit on how many results I can page through?**

NIH RePORTER itself caps pagination at roughly 15,000 records per search, regardless of the total match count. Narrow your filters (e.g. add a fiscal year) to search a large topic in slices.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `fiscalYears` (type: `array`):

Only grants active/awarded in these fiscal years, e.g. <code>\[2024, 2025]</code>.

## `textSearch` (type: `string`):

Match this text against project title, abstract and indexed research terms.

## `orgNames` (type: `array`):

Recipient institution names to match, e.g. 'Harvard University'.

## `piNames` (type: `array`):

Principal investigator names to match, e.g. 'Smith'.

## `agencies` (type: `array`):

NIH institute/center abbreviation codes to match, e.g. 'NCI', 'NIAID'.

## `minAwardAmount` (type: `integer`):

Only grants awarded at least this much, in US dollars.

## `maxAwardAmount` (type: `integer`):

Only grants awarded at most this much, in US dollars.

## `maxResults` (type: `integer`):

Stop after this many grant records. Each record is one billed result row. NIH RePORTER caps how deep any single search can page (~15,000 records) — narrow your filters to go beyond that.

## `proxyConfiguration` (type: `object`):

NIH RePORTER is a public federal API and does not need a proxy. Leave this off unless your account requires egress through Apify Proxy.

## Actor input object example

```json
{
  "fiscalYears": [
    2024
  ],
  "textSearch": "cancer immunotherapy",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fiscalYears": [
        2024
    ],
    "textSearch": "cancer immunotherapy",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/nih-reporter-grants-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "fiscalYears": [2024],
    "textSearch": "cancer immunotherapy",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/nih-reporter-grants-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fiscalYears": [
    2024
  ],
  "textSearch": "cancer immunotherapy",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/nih-reporter-grants-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/nih-reporter-grants-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KQsjtHNRJVniG9Rtm/builds/JYmOMudck7y8aPxON/openapi.json
