# IRS Tax Exempt Organization Scraper (`crawlerbros/irs-tax-exempt-scraper`) Actor

Search and retrieve IRS tax-exempt organizations (501c nonprofits) from the official IRS Exempt Organizations Business Master File. Search by name/EIN, filter by state, NTEE code, deductibility status.

- **URL**: https://apify.com/crawlerbros/irs-tax-exempt-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## IRS Tax Exempt Organization Scraper

Search and retrieve data on US tax-exempt nonprofit organizations directly from the **IRS Exempt Organizations Business Master File (EO BMF)** — the official IRS dataset containing over 1.9 million 501(c) organizations.

No API key required. Data is sourced from the IRS public bulk data download files.

### What This Actor Does

- Search organizations by **name** (partial match, case-insensitive)
- Filter by **US state**, **NTEE classification code**, **501(c) subsection type**, or **deductibility status**
- Lookup specific organizations by **EIN** (Employer Identification Number)
- Returns rich metadata: EIN, legal name, location, 501(c) type, NTEE code, ruling date, deductibility status, and more

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | select | `searchOrganizations` (default) or `getByEIN` |
| `searchQuery` | string | Organization name to search (partial, case-insensitive) |
| `state` | select | 2-letter state code to filter results (blank = all states) |
| `nteeCode` | string | NTEE code prefix (e.g. `H` for Health, `B` for Education) |
| `deductibilityStatus` | select | Filter by deductibility: All, Fully Deductible (1), Generally Deductible (2), Special Rules (4) |
| `subsectionCode` | string | 501(c) subsection number (e.g. `3` for 501(c)(3)) |
| `eins` | array | List of EINs for `getByEIN` mode |
| `maxItems` | integer | Max records to return (1–500, default 50) |

#### Example Inputs

**Search cancer research organizations in California:**
```json
{
  "mode": "searchOrganizations",
  "searchQuery": "cancer research",
  "state": "CA",
  "maxItems": 50
}
````

**Lookup organizations by EIN:**

```json
{
  "mode": "getByEIN",
  "eins": ["53-0204600", "13-1837418"],
  "maxItems": 10
}
```

**Find all 501(c)(3) health organizations in Texas:**

```json
{
  "mode": "searchOrganizations",
  "state": "TX",
  "subsectionCode": "3",
  "nteeCode": "H",
  "maxItems": 100
}
```

### Output

Each record contains:

| Field | Description |
|-------|-------------|
| `ein` | EIN in XX-XXXXXXX format |
| `einRaw` | 9-digit raw EIN |
| `organizationName` | Legal organization name |
| `street` | Street address |
| `city` | City |
| `state` | 2-letter state code |
| `zipCode` | ZIP code |
| `subsectionCode` | 501(c) subsection code (e.g. `03` for 501(c)(3)) |
| `subsectionDescription` | Human-readable 501(c) type |
| `deductibilityCode` | Deductibility code (1, 2, or 4) |
| `deductibilityDescription` | Deductibility status description |
| `nteeCode` | NTEE classification code |
| `ruling` | IRS ruling date (YYYYMM) |
| `affiliationCode` | Group affiliation code |
| `affiliationDescription` | Affiliation description |
| `classificationCode` | Classification code |
| `foundationCode` | Foundation code |
| `statusCode` | Exempt status code |
| `taxPeriod` | Tax period (YYYYMM) |
| `sourceUrl` | IRS bulk data source URL |
| `irsUrl` | Link to IRS TEOS search page for this org |
| `recordType` | Always `"organization"` |
| `scrapedAt` | ISO 8601 timestamp |

#### Sample Output Record

```json
{
  "ein": "53-0204600",
  "einRaw": "530204600",
  "organizationName": "AMERICAN RED CROSS",
  "street": "2025 E STREET NW",
  "city": "WASHINGTON",
  "state": "DC",
  "zipCode": "20006",
  "subsectionCode": "03",
  "subsectionDescription": "501(c)(3) - Charitable, Religious, Educational",
  "deductibilityCode": "1",
  "deductibilityDescription": "Contributions are deductible",
  "nteeCode": "P20",
  "ruling": "193402",
  "affiliationCode": "3",
  "affiliationDescription": "Independent organization",
  "classificationCode": "1000",
  "statusCode": "01",
  "taxPeriod": "202312",
  "sourceUrl": "https://www.irs.gov/charities-non-profits/tax-exempt-organization-search-bulk-data-downloads",
  "irsUrl": "https://apps.irs.gov/app/eos/detailsPage?ein=530204600...",
  "recordType": "organization",
  "scrapedAt": "2026-05-30T10:00:00+00:00"
}
```

### Data Source

Data is sourced from the **IRS Exempt Organizations Business Master File Extract** — updated monthly by the IRS. The dataset contains all organizations with IRS tax-exempt status. See the [IRS EO BMF page](https://www.irs.gov/charities-non-profits/exempt-organizations-business-master-file-extract-eo-bmf) for more details.

### NTEE Codes

Common NTEE code prefixes:

- `A` — Arts, Culture, Humanities
- `B` — Education
- `C` — Environmental Quality
- `D` — Animal-Related
- `E` — Health Care
- `F` — Mental Health
- `G` — Disease, Medical Research
- `H` — Medical Research
- `I` — Crime, Legal Related
- `J` — Employment
- `K` — Food, Agriculture
- `L` — Housing, Shelter
- `M` — Public Safety
- `N` — Recreation, Sports
- `O` — Youth Development
- `P` — Human Services
- `Q` — International
- `R` — Civil Rights, Social Action
- `S` — Community Improvement
- `T` — Philanthropy, Voluntarism
- `U` — Science and Technology
- `V` — Social Science
- `W` — Public Affairs
- `X` — Religion Related
- `Y` — Mutual Benefit Organizations
- `Z` — Unknown

### FAQs

**Q: Does this require an API key?**
No. Data is sourced from publicly available IRS bulk download files.

**Q: How current is the data?**
The IRS EO BMF is updated monthly. This actor always fetches the latest version.

**Q: Can I search by EIN?**
Yes. Use `getByEIN` mode and provide a list of EINs in the `eins` field.

**Q: What does deductibility code 4 mean?**
Code 4 means contributions may be deductible subject to special rules (e.g., private foundations with restrictions). Always consult a tax advisor.

**Q: What states are supported?**
All 50 US states plus DC.

**Q: What is NTEE code?**
The National Taxonomy of Exempt Entities (NTEE) is a classification system for nonprofit organizations developed by the IRS and the National Center for Charitable Statistics.

# Actor input Schema

## `mode` (type: `string`):

Operation mode. 'searchOrganizations' searches by name/filters. 'getByEIN' fetches specific organizations by EIN.

## `searchQuery` (type: `string`):

Search for organizations whose name contains this text (case-insensitive). Used in searchOrganizations mode.

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

Filter by US state (2-letter code). Leave blank for all states.

## `nteeCode` (type: `string`):

Filter by NTEE classification code prefix (e.g. 'A' for Arts, 'B' for Education, 'H' for Health, 'T' for Philanthropy). Leave blank to include all.

## `deductibilityStatus` (type: `string`):

Filter by charitable contribution deductibility status. Leave blank for all.

## `subsectionCode` (type: `string`):

Filter by 501(c) subsection code (e.g. '3' for 501(c)(3), '4' for 501(c)(4), '6' for 501(c)(6)). Leave blank for all.

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

List of Employer Identification Numbers to fetch (for getByEIN mode). Format: 9-digit string or XX-XXXXXXX.

## `maxItems` (type: `integer`):

Maximum number of organizations to return.

## Actor input object example

```json
{
  "mode": "searchOrganizations",
  "searchQuery": "cancer research",
  "state": "",
  "deductibilityStatus": "",
  "maxItems": 50
}
```

# Actor output Schema

## `organizations` (type: `string`):

Dataset containing all scraped IRS tax-exempt organization records.

# 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 = {
    "mode": "searchOrganizations",
    "searchQuery": "cancer research",
    "state": "",
    "deductibilityStatus": "",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/irs-tax-exempt-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 = {
    "mode": "searchOrganizations",
    "searchQuery": "cancer research",
    "state": "",
    "deductibilityStatus": "",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/irs-tax-exempt-scraper").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 '{
  "mode": "searchOrganizations",
  "searchQuery": "cancer research",
  "state": "",
  "deductibilityStatus": "",
  "maxItems": 50
}' |
apify call crawlerbros/irs-tax-exempt-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/irs-tax-exempt-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "IRS Tax Exempt Organization Scraper",
        "description": "Search and retrieve IRS tax-exempt organizations (501c nonprofits) from the official IRS Exempt Organizations Business Master File. Search by name/EIN, filter by state, NTEE code, deductibility status.",
        "version": "1.0",
        "x-build-id": "gwf6lWDcN1n1YIgda"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~irs-tax-exempt-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-irs-tax-exempt-scraper",
                "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/crawlerbros~irs-tax-exempt-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-irs-tax-exempt-scraper",
                "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/crawlerbros~irs-tax-exempt-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-irs-tax-exempt-scraper",
                "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": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "searchOrganizations",
                            "getByEIN"
                        ],
                        "type": "string",
                        "description": "Operation mode. 'searchOrganizations' searches by name/filters. 'getByEIN' fetches specific organizations by EIN.",
                        "default": "searchOrganizations"
                    },
                    "searchQuery": {
                        "title": "Search Query (organization name)",
                        "type": "string",
                        "description": "Search for organizations whose name contains this text (case-insensitive). Used in searchOrganizations mode."
                    },
                    "state": {
                        "title": "State",
                        "enum": [
                            "",
                            "AL",
                            "AK",
                            "AZ",
                            "AR",
                            "CA",
                            "CO",
                            "CT",
                            "DE",
                            "DC",
                            "FL",
                            "GA",
                            "HI",
                            "ID",
                            "IL",
                            "IN",
                            "IA",
                            "KS",
                            "KY",
                            "LA",
                            "ME",
                            "MD",
                            "MA",
                            "MI",
                            "MN",
                            "MS",
                            "MO",
                            "MT",
                            "NE",
                            "NV",
                            "NH",
                            "NJ",
                            "NM",
                            "NY",
                            "NC",
                            "ND",
                            "OH",
                            "OK",
                            "OR",
                            "PA",
                            "RI",
                            "SC",
                            "SD",
                            "TN",
                            "TX",
                            "UT",
                            "VT",
                            "VA",
                            "WA",
                            "WV",
                            "WI",
                            "WY"
                        ],
                        "type": "string",
                        "description": "Filter by US state (2-letter code). Leave blank for all states.",
                        "default": ""
                    },
                    "nteeCode": {
                        "title": "NTEE Code (National Taxonomy of Exempt Entities)",
                        "type": "string",
                        "description": "Filter by NTEE classification code prefix (e.g. 'A' for Arts, 'B' for Education, 'H' for Health, 'T' for Philanthropy). Leave blank to include all."
                    },
                    "deductibilityStatus": {
                        "title": "Deductibility Status",
                        "enum": [
                            "",
                            "1",
                            "2",
                            "4"
                        ],
                        "type": "string",
                        "description": "Filter by charitable contribution deductibility status. Leave blank for all.",
                        "default": ""
                    },
                    "subsectionCode": {
                        "title": "Subsection Code (501(c) type)",
                        "type": "string",
                        "description": "Filter by 501(c) subsection code (e.g. '3' for 501(c)(3), '4' for 501(c)(4), '6' for 501(c)(6)). Leave blank for all."
                    },
                    "eins": {
                        "title": "EINs (for getByEIN mode)",
                        "type": "array",
                        "description": "List of Employer Identification Numbers to fetch (for getByEIN mode). Format: 9-digit string or XX-XXXXXXX.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of organizations to return.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
