# GuideStar / ProPublica Nonprofit Scraper (`muhammadafzal/guidestar-propublica-nonprofit-scraper`) Actor

Find public nonprofit profiles by EIN or search phrase and return ProPublica IRS 990 data, financial metrics, filing history, and GuideStar profile links. No login required. $0.005 per record.

- **URL**: https://apify.com/muhammadafzal/guidestar-propublica-nonprofit-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Other, MCP servers, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 nonprofit records

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 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

## GuideStar / ProPublica Nonprofit Scraper

Find public US nonprofit profiles by EIN or search phrase and return structured organization data, IRS Form 990 summary metrics, filing history, and source links. The actor is designed for grant researchers, nonprofit due-diligence teams, journalists, fundraisers, and AI agents that need a small, traceable nonprofit dataset without a login.

This actor uses the public ProPublica Nonprofit Explorer API v2. ProPublica organization objects can include a `guidestar_url`, so the output preserves that GuideStar profile link when available. GuideStar is now part of Candid; this actor does not authenticate to Candid, bypass access controls, or claim to return paid GuideStar/Candid-only fields.

### What it extracts

One dataset item represents one nonprofit identified by EIN.

| Field group | Included data |
| --- | --- |
| Identity | EIN, formatted EIN, organization name, alternate name, address, city, state, ZIP |
| Tax classification | IRS subsection code, NTEE code, organization status, classification, deductibility, ruling date |
| Financial snapshot | Latest filing year/type, revenue, expenses, assets, liabilities |
| Filing history | Up to `maxFilingsPerOrganization` compact Form 990 / 990-EZ / 990-PF summaries |
| Public profiles | ProPublica, GuideStar, and NCCS URLs when supplied by the source |
| Provenance | Search query, API search URL, source identifier, scrape timestamp, warnings |

The API source is a public index of IRS-exempt-organization and Form 990 data. A missing value is returned as `null`, not invented or silently removed. Filing fields vary by form type, so the actor normalizes common financial aliases and keeps the result shape stable.

### When to use it

Use exact EINs when you already have a list of organizations and need their public profiles. Use `searchQueries` when you want discovery by organization name, alternate name, or city. Add `state`, `nteeCode`, or `subsectionCode` to narrow a search. Keep `includeFilings` enabled when you need financial metrics; disable it for faster profile-only discovery.

Do not use this actor for private donor data, Candid account data, paid GuideStar reports, real-time charity ratings, grant-award databases, or legal/tax determinations. It is also not a general-purpose web search tool.

### Example inputs

Small discovery run:

```json
{
  "searchQueries": ["food bank"],
  "state": "NY",
  "subsectionCode": 3,
  "maxResults": 25,
  "includeFilings": true,
  "responseFormat": "detailed"
}
```

Exact EIN lookup:

```json
{
  "eins": ["14-2007220", "13-1837418"],
  "maxResults": 2,
  "maxFilingsPerOrganization": 3
}
```

For an AI-agent response with fewer nested fields:

```json
{
  "searchQueries": ["community health"],
  "state": "CA",
  "maxResults": 10,
  "responseFormat": "concise"
}
```

### Output example

```json
{
  "ein": "142007220",
  "formattedEin": "14-2007220",
  "name": "PRO PUBLICA",
  "city": "NEW YORK",
  "state": "NY",
  "subsectionCode": 3,
  "nteeCode": "A20",
  "latestFilingYear": 2024,
  "latestFilingType": "Form 990",
  "latestRevenue": 1035696,
  "latestExpenses": 983566,
  "filingCount": 8,
  "filings": [],
  "guidestarUrl": "https://www.guidestar.org/organizations/14-2007220/.aspx",
  "proPublicaUrl": "https://projects.propublica.org/nonprofits/organizations/142007220",
  "source": "propublica-nonprofit-explorer",
  "warnings": []
}
```

When `responseFormat` is `detailed`, `filings` contains the newest selected filing summaries. In `concise` mode it is an empty array while latest filing metrics and `filingCount` remain available. See the dataset schema for the exact stable shape.

### Pricing

| Event | Price |
| --- | ---: |
| Actor start | $0.00005, scaled by allocated memory |
| Stored nonprofit record | $0.005 each |

The actor charges a record only after its dataset item is stored. A run with `maxResults: 25` has a maximum record-event estimate of $0.125, plus the actor-start event and normal Apify platform usage. The run status and `OUTPUT` key-value record report collected records, charged events, request errors, and warnings.

### Reliability and source limits

The actor uses the documented ProPublica API v2 search endpoint, which returns 25 organizations per page, and the EIN organization endpoint for filing detail. It retries transient request failures with a short backoff, paces requests with `requestDelayMs`, deduplicates EINs, persists progress, and returns a profile-only record with a warning if filing detail fails. Empty valid searches are successful and clearly reported.

ProPublica notes that the API is subject to change. If fields disappear or a request begins failing, provide the run ID, source URL, and an example EIN in an actor issue. The API and IRS data are not a substitute for verifying a nonprofit with the source agency or a qualified professional.

### JavaScript and Python API usage

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('YOUR_USERNAME/guidestar-propublica-nonprofit-scraper').call({
  eins: ['14-2007220'],
  includeFilings: true,
  responseFormat: 'detailed'
});
console.log(run.defaultDatasetId);
```

```python
from apify_client import ApifyClient

client = ApifyClient(token='YOUR_APIFY_TOKEN')
run = client.actor('YOUR_USERNAME/guidestar-propublica-nonprofit-scraper').call(
    run_input={'searchQueries': ['food bank'], 'state': 'TX', 'maxResults': 10}
)
print(run['defaultDatasetId'])
```

The input and output are also suitable for Apify's hosted MCP integration: the input descriptions route an agent to exact EIN lookup versus discovery, and each dataset item has semantic field titles, descriptions, and provenance.

### Responsible use

This independent actor is not affiliated with ProPublica, GuideStar, Candid, the IRS, or NCCS. Respect the source's data terms, robots and rate limits, applicable privacy and data-protection law, and any restrictions on downstream outreach. Treat public financial figures and tax classifications as research data; verify material grant, compliance, eligibility, and tax decisions against current primary records.

#### Official source documentation

- [ProPublica Nonprofit Explorer API](https://projects.propublica.org/nonprofits/api/)
- [Candid developer portal](https://developer.candid.org/reference/welcome)
- [Candid notice about decommissioned GuideStar Gen 1 APIs](https://developer.candid.org/changelog/02012023-guidestar-gen-1-apis-are-deprecated)

# Actor input Schema

## `searchQueries` (type: `array`):

Use this when you want to discover nonprofits by name, alias, or city through ProPublica Nonprofit Explorer. Enter phrases such as 'food bank' or 'New York arts'. Defaults to 'nonprofit'. This is not a general web search or a GuideStar account search.

## `eins` (type: `array`):

Use this when you already know the nonprofit Employer Identification Number and want an exact ProPublica organization lookup. Accepts 7 to 9 digits, with or without a hyphen, for example '14-2007220'. Invalid values are reported in OUTPUT and ignored. This is not a Candid API key field.

## `state` (type: `string`):

Use this when search results should be limited to one US state or territory. Enter a two-letter code such as NY or CA. Leave blank for all supported locations. This filter applies to searchQueries, not exact EIN lookups.

## `nteeCode` (type: `integer`):

Use this when you want a ProPublica NTEE major-group filter for search results: 1 arts, 2 education, 3 environment, 4 health, 5 human services, 6 international, 7 public benefit, 8 religion, 9 membership, or 10 unknown. Leave blank for all groups.

## `subsectionCode` (type: `integer`):

Use this when you want to filter search results to an IRS tax subsection, most commonly 3 for 501(c)(3), 4 for 501(c)(4), or 92 for 4947(a)(1). Leave blank for all subsections. This is an IRS code, not a Candid rating.

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

Use this to cap stored nonprofit records and the $0.005-per-record event cost. Enter 1 to 500; defaults to 25. The actor may stop earlier when the API has no more matches. This is a record limit, not a page limit.

## `maxPages` (type: `integer`):

Use this when a search phrase may have more matches than the record cap. ProPublica returns 25 organizations per search page; enter 1 to 40, default 2. Exact EIN lookups do not use pages. This is separate from maxResults.

## `includeFilings` (type: `boolean`):

Use this when you need latest revenue, expenses, assets, liabilities, and a compact filing history for each nonprofit. Defaults to true. Set false for faster profile-only discovery and lower API traffic; the organization fields and public source links remain available.

## `maxFilingsPerOrganization` (type: `integer`):

Use this to limit the detailed filing history array returned for each nonprofit. Enter 1 to 25, default 5. Latest filing metrics are retained even when the array is shorter. This does not change the source data or filingCount.

## `responseFormat` (type: `string`):

Use concise for smaller AI-agent records or detailed for the selected filing history. Choose concise or detailed; detailed is the default. Both formats keep identity, public links, latest financial metrics, provenance, and warnings.

## `requestDelayMs` (type: `integer`):

Use this when you want to pace requests to the public ProPublica API. Enter 100 to 5,000 milliseconds; default is 250. Increase it for large runs or if the source is rate-limiting. This is not a total run timeout.

## Actor input object example

```json
{
  "searchQueries": [
    "nonprofit"
  ],
  "eins": [],
  "state": "NY",
  "nteeCode": 5,
  "subsectionCode": 3,
  "maxResults": 25,
  "maxPages": 2,
  "includeFilings": true,
  "maxFilingsPerOrganization": 5,
  "responseFormat": "detailed",
  "requestDelayMs": 250
}
```

# Actor output Schema

## `results` (type: `string`):

One structured public nonprofit profile per dataset item, including IRS identity, latest Form 990 metrics, selected filing history, source links, and warnings.

## `summary` (type: `string`):

Record count, request diagnostics, source policy, and event charges.

# 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 = {
    "searchQueries": [
        "nonprofit"
    ],
    "eins": [],
    "state": "",
    "nteeCode": 0,
    "subsectionCode": 0,
    "maxResults": 25,
    "maxPages": 2,
    "includeFilings": true,
    "maxFilingsPerOrganization": 5,
    "responseFormat": "detailed",
    "requestDelayMs": 250
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/guidestar-propublica-nonprofit-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 = {
    "searchQueries": ["nonprofit"],
    "eins": [],
    "state": "",
    "nteeCode": 0,
    "subsectionCode": 0,
    "maxResults": 25,
    "maxPages": 2,
    "includeFilings": True,
    "maxFilingsPerOrganization": 5,
    "responseFormat": "detailed",
    "requestDelayMs": 250,
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/guidestar-propublica-nonprofit-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 '{
  "searchQueries": [
    "nonprofit"
  ],
  "eins": [],
  "state": "",
  "nteeCode": 0,
  "subsectionCode": 0,
  "maxResults": 25,
  "maxPages": 2,
  "includeFilings": true,
  "maxFilingsPerOrganization": 5,
  "responseFormat": "detailed",
  "requestDelayMs": 250
}' |
apify call muhammadafzal/guidestar-propublica-nonprofit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/guidestar-propublica-nonprofit-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/2Vss1ziR8vrNtBH8D/builds/dyIEnNibAl5hcZd6s/openapi.json
