GnistAI GnistAI
Log in

Getting Started with US Nonprofits (IRS 990)

Search 1.6M+ US nonprofits and access IRS 990 financial filings — revenue, expenses, assets, compensation, and tax-exempt status.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Government

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

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "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).

ParameterTypeRequiredDescription
querystringrequiredSearch query — name, city, or keyword. Example: 'red cross'.
stateanyoptionalTwo-letter US state code. Example: 'CA'.
nteeanyoptionalNTEE 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_codeanyoptional501(c) subsection code. Use 3 for 501(c)(3) charitable orgs.
pageintegeroptionalPage 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.

ParameterTypeRequiredDescription
einstringrequiredEmployer 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'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (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

Search then retrieve
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.
Pagination
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.

Next Steps

Related Tutorials