# Grants & Funding Opportunities Harvester (`datapilot/grants-funding-opportunities-harvester`) Actor

A comprehensive grant opportunities scraper that collects funding data from Grants.gov, the EU Funding Portal, USASpending.gov, and private foundation sources. Extracts grant titles, agencies, deadlines, award amounts, eligibility, funding details, and application links for research and analysis.

- **URL**: https://apify.com/datapilot/grants-funding-opportunities-harvester.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Categories:** AI, SEO tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 scraped grant results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Grants & Funding Opportunities Harvester

💰 **Grants & Funding Opportunities Harvester** is a powerful Apify Actor designed to aggregate and discover comprehensive **Grants & Funding** opportunities from multiple authoritative sources including Grants.gov, EU Funding Portal, private foundations, and USASpending.gov. This tool provides detailed **Grants & Funding** data with award amounts, deadlines, eligibility criteria, and funding details. Whether you're seeking research funding, business grants, or nonprofit support, the Grants & Funding Opportunities Harvester delivers actionable **Grants & Funding** opportunities efficiently.

With multi-source integration from four major funding databases, comprehensive search capabilities, deduplication, intelligent summary generation, and PPE billing support, the Grants & Funding Opportunities Harvester ensures complete **Grants & Funding** discovery. It focuses on key **Grants & Funding** metrics including award amounts, deadlines, eligibility, and funding agencies, making it an essential tool for **Grants & Funding** research and opportunity identification.

---

### 📋 Table of Contents

- [Features](#-features)
- [Data Sources](#-data-sources)
- [How It Works](#-how-it-works)
- [Input](#-input)
- [Output](#-output)
- [Technical Stack](#-technical-stack)
- [Data Fields](#-data-fields)
- [Supported Sources](#-supported-sources)
- [Funding Categories](#-funding-categories)
- [Use Cases](#-use-cases)
- [Quick Start](#-quick-start)
- [Configuration](#-configuration)
- [Performance](#-performance)
- [Billing](#-billing)
- [Important Notes](#-important-notes)
- [Keywords](#-keywords)
- [Changelog](#-changelog)
- [Support](#-support)

---

### 🔥 Features

- **Multi-Source Integration** – Aggregates **Grants & Funding** from 4 major sources simultaneously.
- **Grants.gov Database** – Direct API access to official federal **Grants & Funding** opportunities.
- **EU Funding Portal** – European **Grants & Funding** opportunities (Horizon Europe, etc.).
- **Private Foundations** – News monitoring of foundation **Grants & Funding** announcements.
- **USASpending.gov** – Historical awarded grant data with recipient and amount information.
- **Keyword Search** – Search **Grants & Funding** by keyword across all sources.
- **Category Filtering** – Filter **Grants & Funding** by funding category/activity type.
- **Award Amount Extraction** – Captures minimum and maximum award amounts.
- **Deadline Detection** – Automatically extracts application deadlines.
- **Eligibility Extraction** – Captures eligible applicant types and eligibility criteria.
- **Agency Information** – Identifies awarding agency and sub-agency details.
- **CFDA Numbers** – Includes Catalog of Federal Domestic Assistance numbers.
- **Status Tracking** – Tracks **Grants & Funding** status (forecasted, posted, awarded).
- **Funding Instruments** – Categorizes by funding type (grant, contract, loan, etc.).
- **Description Capture** – Extracts detailed **Grants & Funding** descriptions.
- **Timeline Tracking** – Records posted dates, close dates, and deadlines.
- **URL Generation** – Provides direct links to **Grants & Funding** opportunities.
- **Deduplication** – Removes duplicate **Grants & Funding** across sources.
- **Summary Generation** – Generates comprehensive **Grants & Funding** analysis.
- **Statistics** – Calculates funding statistics and opportunity breakdown.
- **PPE Billing Integration** – Pay-per-event billing per **Grants & Funding** opportunity.
- **Charge Limit Handling** – Respects user's maximum PPE charge limits.
- **Proxy Support** – Apify residential proxy support for reliability.
- **Real-Time Dataset Push** – Pushes results to Apify Dataset with metadata.
- **Detailed Logging** – Comprehensive logging of processing and charges.
- **Asyncio-Friendly** – Non-blocking async/await architecture.

---

### 🌍 Data Sources

#### **1. Grants.gov**

- **Authority**: Official U.S. federal grants database
- **Coverage**: 1000+ active federal grant opportunities
- **Data**: Complete opportunity details, eligibility, deadlines
- **Updates**: Real-time posting of new opportunities
- **API**: Official REST API with comprehensive data
- **Categories**: Research, education, business, nonprofits, and more

#### **2. EU Funding Portal**

- **Authority**: European Commission official portal
- **Coverage**: 100+ active European funding programs
- **Data**: Horizon Europe, ERASMUS+, Life, and other EU programs
- **Updates**: Regular updates of funding calls
- **API**: Official EU Funding Portal API
- **Categories**: Research, innovation, education, environment, social

#### **3. Private Foundations**

- **Authority**: Foundation grant announcements via news monitoring
- **Coverage**: Foundation grant opportunities and deadlines
- **Data**: Funding amounts, deadlines, eligibility criteria
- **Updates**: Real-time news monitoring
- **Source**: Google News RSS feeds
- **Categories**: Research grants, fellowships, scholarships, awards

#### **4. USASpending.gov**

- **Authority**: U.S. Government spending transparency database
- **Coverage**: Historical awarded grant data
- **Data**: Recipient information, award amounts, agencies
- **Updates**: Regular updates of awarded grants
- **API**: Official USASpending API
- **Categories**: All federal award types and recipients

---

### ⚙️ How It Works

The Grants & Funding Opportunities Harvester accepts a keyword and optional category filter, then simultaneously queries all four funding sources. It fetches detailed opportunity information, performs deduplication to remove duplicate **Grants & Funding**, extracts key data fields, and generates comprehensive summaries. All unique opportunities are analyzed and charged via PPE billing. A summary report is generated with statistics, top agencies, and opportunity breakdown.

**Key Processing Steps:**

1. **Input Parsing** – Accept keyword and optional category
2. **Proxy Setup** – Configure Apify residential proxy
3. **Grants.gov Query** – API search for federal opportunities
4. **EU Funding Query** – API search for European opportunities
5. **Foundation Query** – News RSS search for foundation grants
6. **USASpending Query** – API search for awarded grants
7. **Data Extraction** – Extract fields from each source
8. **Detail Fetching** – Fetch full details from Grants.gov
9. **Deduplication** – Remove duplicates by source + title
10. **Summary Generation** – Build statistics and breakdown
11. **Dataset Push** – Push summary and opportunities
12. **PPE Charging** – Charge per unique opportunity
13. **Charge Limit Check** – Stop if user limit reached

**Key Benefits:**

- Discover **Grants & Funding** opportunities from multiple sources
- Find deadline-driven opportunities quickly
- Understand eligibility requirements
- Identify funding amounts and agency details
- Automate **Grants & Funding** research
- Make informed funding decisions

---

### 📥 Input

The Actor accepts the following input parameters:

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `keyword` | string | required | Search keyword for **Grants & Funding** (e.g., "research", "education") |
| `category` | string | "" | Funding category filter (optional) |
| `maxResults` | integer | `50` | Maximum results to return per source |
| `sources` | array | all 4 | Which sources to query (grantsGov, euFunding, foundations, usaSpending) |
| `useApifyProxy` | boolean | `true` | Enable Apify residential proxies |
| `apifyProxyGroups` | array | `["RESIDENTIAL"]` | Proxy group configuration |

**Example Input:**

```json
{
  "keyword": "artificial intelligence",
  "category": "Research and Development",
  "maxResults": 50,
  "sources": ["grantsGov", "euFunding", "foundations", "usaSpending"],
  "useApifyProxy": true
}
````

**Research Focus:**

```json
{
  "keyword": "machine learning",
  "category": "Research and Development",
  "maxResults": 100
}
```

**Business/Startup Funding:**

```json
{
  "keyword": "small business",
  "sources": ["grantsGov", "usaSpending"],
  "maxResults": 75
}
```

***

### 📤 Output

The Actor pushes **Grants & Funding** records with the following structure:

**Grants & Funding Opportunity Record:**

| Field | Type | Description |
|-------|------|-------------|
| `source` | string | Source database (Grants.gov, EU Funding Portal, etc.) |
| `grant_id` | string | Unique grant/opportunity identifier |
| `title` | string | **Grants & Funding** opportunity title |
| `agency` | string | Awarding agency name |
| `agency_code` | string | Agency code or program code |
| `opportunity_number` | string | Official opportunity number |
| `status` | string | Status (forecasted, posted, awarded) |
| `category` | string | Funding category/activity type |
| `funding_instrument` | string | Instrument type (Grant, Contract, Loan, etc.) |
| `award_ceiling` | string | Maximum award amount |
| `award_floor` | string | Minimum award amount |
| `estimated_total_funding` | string | Total estimated program funding |
| `expected_awards` | string | Number of expected awards |
| `posted_date` | string | Date opportunity was posted |
| `close_date` | string | Application close/deadline date |
| `deadline` | string | Application deadline |
| `description` | string | Full opportunity description (500 chars) |
| `eligibility` | string | Eligible applicant types |
| `cfda_numbers` | string | CFDA program numbers |
| `url` | string | Direct link to opportunity |
| `keyword` | string | Search keyword used |
| `scraped_at` | string | ISO 8601 scrape timestamp |

**Summary Record:**

Comprehensive analysis including:

- Total unique opportunities found
- Breakdown by source
- Status distribution
- Top funding agencies
- Count with deadlines
- Count with award amounts
- Generation timestamp

**Example Grants & Funding Record:**

```json
{
  "source": "Grants.gov",
  "grant_id": "HHS-2025-ACF-ORR-SI-1234",
  "title": "Research on Artificial Intelligence in Healthcare Applications",
  "agency": "Department of Health and Human Services",
  "agency_code": "HHS",
  "opportunity_number": "HHS-2025-ACF-ORR-SI-1234",
  "status": "posted",
  "category": "Research and Development",
  "funding_instrument": "Grant",
  "award_ceiling": "500000",
  "award_floor": "100000",
  "estimated_total_funding": "5000000",
  "expected_awards": "10",
  "posted_date": "2025-02-01",
  "close_date": "2025-05-15",
  "deadline": "2025-05-15",
  "description": "This funding opportunity supports innovative research on artificial intelligence applications in healthcare. Projects may focus on diagnostic AI, treatment optimization, or healthcare administration...",
  "eligibility": "State governments, Universities and colleges, Nonprofits, For-profit organizations",
  "cfda_numbers": "93.353",
  "url": "https://www.grants.gov/search-results-detail/HHS-2025-ACF-ORR-SI-1234",
  "keyword": "artificial intelligence",
  "scraped_at": "2025-02-14T12:00:00"
}
```

**Example Summary:**

```json
{
  "type": "SUMMARY",
  "summary": {
    "keyword": "artificial intelligence",
    "category": "Research and Development",
    "total": 87,
    "generated_at": "2025-02-14T12:00:00",
    "by_source": {
      "Grants.gov": 45,
      "EU Funding Portal": 18,
      "Private Foundation / News": 16,
      "USASpending.gov": 8
    },
    "by_status": {
      "posted": 52,
      "forecasted": 12,
      "awarded": 8,
      "active": 15
    },
    "top_agencies": [
      "National Science Foundation",
      "Department of Energy",
      "National Institutes of Health",
      "European Commission",
      "Office of Naval Research"
    ],
    "with_deadline": 78,
    "with_amount": 65
  }
}
```

***

### 🧰 Technical Stack

- **APIs:** Grants.gov, EU Funding Portal, USASpending.gov
- **News Feeds:** Google News RSS for foundations
- **HTML/XML Parsing:** BeautifulSoup
- **Pattern Matching:** Regex for deadline and amount extraction
- **Async:** asyncio for non-blocking operations
- **Data Structure:** Collections (Counter) for statistics
- **Proxy:** Apify Proxy with RESIDENTIAL configuration
- **Logging:** Apify Actor logging system
- **Platform:** Apify Actor serverless environment
- **Billing:** Apify PPE (Pay-Per-Event) system

***

### 📊 Data Fields Explained

#### **Identification**

- **grant\_id**: Unique identifier for deduplication
- **opportunity\_number**: Official number from source

#### **Funding Details**

- **award\_ceiling**: Maximum award amount
- **award\_floor**: Minimum award amount
- **estimated\_total\_funding**: Total program budget
- **expected\_awards**: Number of awards anticipated

#### **Timeline**

- **posted\_date**: When opportunity opened
- **close\_date**: Application deadline
- **deadline**: When to submit application

#### **Requirements**

- **eligibility**: Who can apply
- **funding\_instrument**: Type of funding (grant, contract, loan)
- **category**: Funding category/activity

#### **Reference**

- **cfda\_numbers**: Catalog of Federal Domestic Assistance numbers
- **url**: Direct link to opportunity details

***

### 🎯 Funding Categories

The Actor supports multiple **Grants & Funding** categories:

- Research and Development
- Education and Training
- Healthcare and Medicine
- Environmental Protection
- Social Services
- Business and Entrepreneurship
- Infrastructure
- Energy and Climate
- Agriculture
- Arts and Culture
- And more

***

### 🎯 Use Cases

- **Researcher Funding** – Find research **Grants & Funding** for academic projects
- **Business Growth** – Discover small business **Grants & Funding** and grants
- **Nonprofit Support** – Find nonprofit **Grants & Funding** and donations
- **Startup Capital** – Locate **Grants & Funding** for startups and entrepreneurs
- **International Research** – Discover European **Grants & Funding** via Horizon Europe
- **Grant Management** – Track and manage **Grants & Funding** opportunities
- **Funding Strategy** – Build strategy based on available **Grants & Funding**
- **Grant Writing** – Research potential **Grants & Funding** before writing proposals
- **Competitive Analysis** – Understand **Grants & Funding** landscape
- **Deadline Tracking** – Monitor upcoming **Grants & Funding** deadlines
- **Eligibility Screening** – Screen for eligible **Grants & Funding** opportunities
- **Agency Intelligence** – Understand which agencies offer **Grants & Funding**
- **Budget Planning** – Use **Grants & Funding** amounts for budget planning
- **Compliance** – Stay informed on **Grants & Funding** requirements
- **Investment Opportunities** – Identify **Grants & Funding** as investment sources

***

### 🚀 Quick Start

#### **1. Prepare Input**

Go to Apify Console and enter:

```json
{
  "keyword": "artificial intelligence",
  "category": "Research and Development",
  "maxResults": 50,
  "useApifyProxy": true
}
```

#### **2. Run the Actor**

Click **Start** button. The Actor will:

- Query Grants.gov for federal opportunities
- Query EU Funding Portal for European opportunities
- Search news for foundation grants
- Query USASpending for awarded grants
- Deduplicate results
- Generate summary
- Push to Dataset

#### **3. Monitor Progress**

Console shows:

```
Keyword: 'artificial intelligence' | Category: 'Research and Development' | Max: 50
Proxy active: RESIDENTIAL
[Grants.gov] keyword='artificial intelligence'
  Grants.gov hits: 234 (fetching 50)
  + Grants.gov total: 45
[EU Funding] keyword='artificial intelligence'
  EU API items: 18
  + EU Funding total: 18
[Private Foundations] keyword='artificial intelligence'
  + Foundation total: 16
[USASpending] keyword='artificial intelligence'
  USASpending awards: 8
  + USASpending total: 8
Charged for unique 'Result' scraped: Title='Research on AI in Healthcare...' from Source='Grants.gov'
Charged for unique 'Result' scraped: Title='Horizon Europe AI Initiative...' from Source='EU Funding Portal'
...
Done! Total Scraped=87 | Total Processed & Charged=87 | With deadline=78 | With amount=65
```

#### **4. View & Download Results**

- **Results Tab**: All **Grants & Funding** opportunities + summary
- **Export**: JSON, CSV, Excel
- **Filter**: By source, status, or amount
- **Sort**: By deadline or award amount

***

### ⚙️ Configuration

#### **Search Scope**

Federal only:

```json
{
  "sources": ["grantsGov", "usaSpending"]
}
```

International focus:

```json
{
  "sources": ["euFunding", "foundations"]
}
```

All sources (default):

```json
{
  "sources": ["grantsGov", "euFunding", "foundations", "usaSpending"]
}
```

#### **Result Limits**

Quick search (25 per source):

```json
{
  "maxResults": 25
}
```

Comprehensive (100+ per source):

```json
{
  "maxResults": 100
}
```

***

### 📈 Performance

#### **Processing Speed**

- \~30-60 seconds for all 4 sources
- \~50-100 opportunities per keyword
- Concurrent API requests
- News parsing adds ~20-30 seconds

#### **Resource Usage**

- Memory: ~120-200MB
- CPU: ~40-50% during processing
- Network: ~4-8MB per search
- API calls: 4-6 depending on sources

***

### 💰 Billing

#### **PPE (Pay-Per-Event) Billing**

- **Event Name:** "result-scrape"
- **Charge:** 1 credit per unique **Grants & Funding** opportunity
- **Billing Trigger:** Per unique opportunity found
- **Typical Cost:** 50-100 credits per search

#### **Cost Examples**

- 50 opportunities × 1 credit = 50 credits
- 87 opportunities × 1 credit = 87 credits
- 150 opportunities × 1 credit = 150 credits

***

### ⚠️ Important Notes

#### **Legal & Compliance**

- **Fair Use**: Respects all API ToS and rate limits
- **Attribution**: Respects data sources and agencies
- **Accuracy**: Data as provided by official sources
- **Eligibility**: Always verify eligibility independently
- **Deadlines**: Confirm deadlines with original sources

#### **Data Quality**

- **Completeness**: Varies by keyword and source
- **Freshness**: Real-time data from official APIs
- **Accuracy**: Official source data
- **Availability**: Depends on source coverage
- **Verification**: Always verify with original sources

#### **Best Practices**

- Use residential proxies
- Respect API rate limits
- Verify deadlines independently
- Check eligibility carefully
- Confirm award amounts
- Monitor funding announcements
- Subscribe to agency updates
- Contact agencies for clarification
- Maintain deadline tracking
- Plan ahead for applications

### 📦 Changelog

**Initial Release:**

- Grants.gov API integration (federal opportunities)
- EU Funding Portal API integration (European opportunities)
- Google News RSS parsing for private foundation grants
- USASpending.gov API integration (awarded grants)
- Multi-source simultaneous querying
- Keyword-based search across all sources
- Category filtering support
- Opportunity detail fetching from Grants.gov
- Full field extraction from all sources
- Award amount extraction (ceiling, floor, total)
- Deadline extraction and formatting
- Eligibility criteria capture
- CFDA number extraction
- Agency and sub-agency tracking
- Status tracking (forecasted, posted, awarded)
- Funding instrument categorization
- Deduplication by source + title
- Summary generation with statistics
- By-source breakdown
- By-status breakdown
- Top agencies extraction
- Deadline and amount statistics
- PPE billing per unique opportunity
- Charge limit detection and stopping
- Apify proxy support
- Real-time Dataset push
- Detailed progress logging
- Comprehensive error handling
- Asyncio executor support

***

### 🧑‍💻 Support & Feedback

- **Issues:** Submit via Apify console with keyword
- **Documentation:** Check Actor details page
- **Community:** Apify forum discussions
- **Feature Requests:** Suggest new funding sources
- **Bug Reports:** Include keyword and error details

***

### 📄 License & Legal

**Terms of Use:**

- Use for legitimate **Grants & Funding** research
- Respect all source ToS and rate limits
- Respect agency and foundation copyrights
- Verify information independently
- Don't republish without permission
- Comply with applicable laws
- Use data ethically and responsibly

**Disclaimer:**
Grants & Funding Opportunities Harvester is provided as-is for research purposes. Users are responsible for ensuring compliance with source ToS and applicable laws. Always verify grant details with official sources.

***

### 🎉 Get Started Today

**Deploy now for **Grants & Funding** research!**

Use for:

- 📊 Opportunity Discovery
- 🔍 Funding Research
- 💡 Grant Matching
- 📈 Deadline Tracking
- 🎯 Eligibility Screening

**Perfect for:**

- Researchers
- Nonprofit Leaders
- Business Founders
- Grant Writers
- Funding Managers

***

**Last Updated:** February 2025\
**Version:** 1.0.0\
**Status:** Production Ready\
**Platform:** Apify Actor\
**Architecture:** Async/Await\
**Sources:** 4 (Grants.gov, EU Funding, Foundations, USASpending)

***

### 📚 Related Tools

- News Mention Alert Engine
- Export Intelligence Monitor
- App Review Intelligence Monitor
- Business Social Media Finder

**Your complete Apify-powered **Grants & Funding** discovery solution!** 🚀✨

***

### 💰 Grants & Funding Excellence

This Actor is optimized for **Grants & Funding** research with:

- ✅ Multi-source aggregation (4 sources)
- ✅ Grants.gov integration
- ✅ EU Funding Portal integration
- ✅ Foundation monitoring
- ✅ USASpending integration
- ✅ Summary generation
- ✅ PPE billing support
- ✅ Real-time Dataset push
- ✅ Error recovery
- ✅ Production-ready code

**Discover funding opportunities effortlessly!** 💎🚀

# Actor input Schema

## `keyword` (type: `string`):

Topic to search for grant opportunities. e.g: climate, AI research, healthcare, education

## `category` (type: `string`):

Filter by funding category. e.g: Education, Health, Science and Technology

## `sources` (type: `array`):

Select which grant databases to query.

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

Maximum number of grants to fetch from each source.

## `useApifyProxy` (type: `boolean`):

Recommended to avoid rate limiting from news sources.

## `apifyProxyGroups` (type: `array`):

RESIDENTIAL works best for Google News RSS scraping.

## Actor input object example

```json
{
  "keyword": "climate",
  "category": "",
  "sources": [
    "grantsGov",
    "euFunding",
    "foundations",
    "usaSpending"
  ],
  "maxResults": 50,
  "useApifyProxy": true,
  "apifyProxyGroups": [
    "RESIDENTIAL"
  ]
}
```

# 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 = {
    "keyword": "climate"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/grants-funding-opportunities-harvester").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 = { "keyword": "climate" }

# Run the Actor and wait for it to finish
run = client.actor("datapilot/grants-funding-opportunities-harvester").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keyword": "climate"
}' |
apify call datapilot/grants-funding-opportunities-harvester --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datapilot/grants-funding-opportunities-harvester",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Grants & Funding Opportunities Harvester",
        "description": "A comprehensive grant opportunities scraper that collects funding data from Grants.gov, the EU Funding Portal, USASpending.gov, and private foundation sources. Extracts grant titles, agencies, deadlines, award amounts, eligibility, funding details, and application links for research and analysis.",
        "version": "0.0",
        "x-build-id": "7IeMkhc7viNlGBAN9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datapilot~grants-funding-opportunities-harvester/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datapilot-grants-funding-opportunities-harvester",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datapilot~grants-funding-opportunities-harvester/runs": {
            "post": {
                "operationId": "runs-sync-datapilot-grants-funding-opportunities-harvester",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datapilot~grants-funding-opportunities-harvester/run-sync": {
            "post": {
                "operationId": "run-sync-datapilot-grants-funding-opportunities-harvester",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keyword"
                ],
                "properties": {
                    "keyword": {
                        "title": "Search Keyword / Topic",
                        "type": "string",
                        "description": "Topic to search for grant opportunities. e.g: climate, AI research, healthcare, education"
                    },
                    "category": {
                        "title": "Category (optional)",
                        "type": "string",
                        "description": "Filter by funding category. e.g: Education, Health, Science and Technology",
                        "default": ""
                    },
                    "sources": {
                        "title": "Sources to search",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Select which grant databases to query.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "grantsGov",
                                "euFunding",
                                "foundations",
                                "usaSpending"
                            ]
                        },
                        "default": [
                            "grantsGov",
                            "euFunding",
                            "foundations",
                            "usaSpending"
                        ]
                    },
                    "maxResults": {
                        "title": "Max results per source",
                        "minimum": 10,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of grants to fetch from each source.",
                        "default": 50
                    },
                    "useApifyProxy": {
                        "title": "Use Apify Proxy",
                        "type": "boolean",
                        "description": "Recommended to avoid rate limiting from news sources.",
                        "default": true
                    },
                    "apifyProxyGroups": {
                        "title": "Proxy Groups",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "RESIDENTIAL works best for Google News RSS scraping.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "RESIDENTIAL",
                                "DATACENTER",
                                "GOOGLE"
                            ]
                        },
                        "default": [
                            "RESIDENTIAL"
                        ]
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
