Data source: ProPublica Nonprofit Explorer API
Overview
US Nonprofits (IRS 990) wraps ProPublica Nonprofit Explorer API, handling authentication, pagination, and rate limits for you. This tutorial covers all 3 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-nonprofits": {
"url": "https://context.gnist.ai/mcp/nonprofits/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (3)
search_nonprofits
Search 1.6M+ IRS-registered US nonprofit organizations. Find nonprofits by name, location, category (NTEE code), or tax-exempt type. Returns basic info: EIN, name, city, state, NTEE code, and tax-exempt subsection. Examples: search_nonprofits("hospital", state="NY") → New York hospitals search_nonprofits("climate", ntee=3) → Environmental nonprofits about climate search_nonprofits("ProPublica") → Find a specific organization Returns: total_results, page, num_pages, organizations (list of matches).
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search query — name, city, or keyword. Example: 'red cross'. |
state | any | optional | Two-letter US state code. Example: 'CA'. |
ntee | any | optional | NTEE major group: 1=Arts, 2=Education, 3=Environment, 4=Health, 5=Human Services, 6=International, 7=Public Benefit, 8=Religion, 9=Mutual Benefit, 10=Unknown. |
c_code | any | optional | 501(c) subsection code. Use 3 for 501(c)(3) charitable orgs. |
page | integer | optional | Page number (0-indexed, 25 results per page). (default: 0) |
curl -X POST "https://context.gnist.ai/mcp/nonprofits/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_nonprofits", "arguments": {"query": "renewable energy"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nonprofits/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': 'renewable energy'},
'name': 'search_nonprofits'}},
)
print(resp.json())
get_nonprofit
Get detailed information and IRS 990 financial filings for a US nonprofit. Returns organization details (address, NTEE code, ruling date, income, assets) plus parsed financial data from all available Form 990/990-EZ/990-PF filings: revenue, expenses, assets, liabilities, compensation, and more. Examples: get_nonprofit("14-2007220") → ProPublica Inc financials get_nonprofit("530196605") → American Red Cross Returns: Organization details and list of filings with key financial fields.
| Parameter | Type | Required | Description |
|---|---|---|---|
ein | string | required | Employer Identification Number. Example: '14-2007220' or '142007220'. |
curl -X POST "https://context.gnist.ai/mcp/nonprofits/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_nonprofit", "arguments": {"ein": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nonprofits/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'ein': 'example'}, 'name': 'get_nonprofit'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/nonprofits/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nonprofits/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use
search_nonprofits to find items, then get_nonprofit to get full details. This two-step pattern is common for exploring data before drilling down.Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does US Nonprofits (IRS 990) provide?
Search 1.6M+ US nonprofits and access IRS 990 financial filings — revenue, expenses, assets, compensation, and tax-exempt status. It exposes 3 tools: search_nonprofits, get_nonprofit, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the US Nonprofits (IRS 990) API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.