https://benthic.io/ngopen/irs_ng/

This database provides geocoded versions of IRS Exempt Organizations Business Master File, Form 990/990-EZ/990-PF SOI financials, Publication 78 deductibility eligibility, auto-revocation list, Form 990-N e-Postcard, Form 990 XML filings with Schedule O narratives and Schedule R flags, Section 527 political organizations, and ACS census demographics.

At a glance

CollectionNGOpen
Endpoint/ngopen/irs_ng/
OpenAPIirs_ng.json
Manifestngopen/irs_ng
Provenancemigrated 2026-08-14, commit 66f585560f
Relations18
Columns388
UpdatedMonthly
LicenceUpstream terms — irs.gov
Source5 upstream feeds (see Data sources)
Pipelinengopen-pipelines/pipelines/irs_ng/README.md

Tables

bmf_organizations

Core table. One row per exempt organization from the IRS Business Master File (BMF), merged across monthly NCCS archive releases. Geocoded via Photon API.

ColumnTypeDescription
einvarchar(20)Employer Identification Number
org_name_currenttextCurrent organization name
org_name_sectextSecondary/sort name
ntee_irsvarchar(10)NTEE code (IRS version)
nccs_level_1varchar(100)NTEE major group name (e.g. “Education”)
bmf_subsection_codevarchar(10)IRC subsection (e.g. 03 = 501(c)(3))
bmf_status_codevarchar(10)IRS status code
bmf_foundation_codevarchar(10)Foundation classification code
bmf_deductibility_codevarchar(10)Deductibility contribution code
f990_org_addr_streettextStreet address
f990_org_addr_cityvarchar(100)City
f990_org_addr_statevarchar(10)State abbreviation
f990_org_addr_zipvarchar(20)ZIP code
org_addr_fulltextFull concatenated address
latitudedecimal(10,8)Geocoded latitude
longitudedecimal(11,8)Geocoded longitude
geocoder_scoredecimal(5,2)Photon geocoder confidence score
geocoder_matchvarchar(100)Geocoder matched location name
geocoding_sourcevarchar(50)photon_api, photon_failed, or null
geom_pointgeometry(Point, 4326)PostGIS point geometry (auto-populated from lat/lon)
f990_total_revenue_recentbigintMost recent revenue from BMF
f990_total_income_recentbigintMost recent income from BMF
f990_total_assets_recentbigintMost recent assets from BMF
org_ruling_datevarchar(20)IRS ruling date
org_ruling_yearvarchar(10)IRS ruling year
bmf_affiliation_codevarchar(10)Affiliation code
bmf_classification_codevarchar(10)Classification code
bmf_organization_codevarchar(10)Organization type code
bmf_group_exempt_numvarchar(50)Group exemption number
is_currentbooleanTRUE for the latest BMF version of this EIN+name
imported_attimestampWhen this row was last updated

Indexes: ein, is_current, f990_org_addr_state, ntee_irs, geocoded/not-geocoded partial indexes.

Example queries

# Find organizations in California with 501(c)(3) status
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?f990_org_addr_state=eq.CA&bmf_subsection_code=eq.03&is_current=is.true&limit=10"

# Search by EIN
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?ein=eq.123456789"

# Get geocoded orgs in a bounding box
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?latitude=gte.40.0&latitude=lte.41.0&longitude=gte.-74.0&longitude=lte.-73.0&latitude=not.is.null&limit=100"

# Select only specific columns
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?select=ein,org_name_current,f990_org_addr_state,latitude,longitude&is_current=is.true&limit=50"

# Filter by NTEE major group letter
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?ntee_irs=like.E*&is_current=is.true&limit=20"

# Count organizations per state
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?select=f990_org_addr_state,count&is_current=is.true&groupby=f990_org_addr_state"

bmf_organization_snapshots

Historical monthly snapshots of BMF data. Each row represents an organization’s record from a specific BMF release date. Allows tracking changes over time (name changes, status changes, address moves, revenue shifts).

ColumnTypeDescription
einvarchar(20)EIN
release_datedateBMF archive release date (YYYY-MM-01)
release_sourcevarchar(255)Source filename
org_namevarchar(500)Organization name at that release
bmf_status_codevarchar(10)Status code at that release
bmf_subsection_codevarchar(10)IRC subsection
ntee_irsvarchar(10)NTEE code
f990_org_addr_cityvarchar(100)City
f990_org_addr_statevarchar(10)State
f990_org_addr_streettextStreet address
f990_org_addr_zipvarchar(20)ZIP
f990_total_revenuebigintRevenue
f990_total_incomebigintIncome
f990_total_assetsbigintAssets
org_ruling_datevarchar(20)Ruling date
org_year_firstvarchar(10)First year on file
org_year_lastvarchar(10)Last year on file

Unique key: (ein, release_date, release_source)

Example queries

# Get all snapshots for an EIN (shows history)
curl "https://benthic.io/ngopen/irs_ng/bmf_organization_snapshots?ein=eq.123456789&order=release_date"

# Get BMF releases for a specific month
curl "https://benthic.io/ngopen/irs_ng/bmf_organization_snapshots?release_date=eq.2024-01-01&limit=50"

form990_soi

Per-EIN annual financial data from IRS Statistics of Income (SOI) extracts. Covers Form 990 and Form 990-EZ filers. One row per EIN per tax year.

ColumnTypeDescription
einvarchar(20)EIN
tax_yearintegerTax year
form_typevarchar(10)990 or 990ez
subseccdvarchar(5)IRC subsection code
is_501c3booleanTRUE if 501(c)(3)
total_revenuebigintTotal revenue
total_expensesbigintTotal functional expenses
total_assetsbigintTotal assets (EOY)
total_liabilitiesbigintTotal liabilities (EOY)
net_assetsbigintNet assets
contributionsbigintContributions and grants received
grants_paidbigintGrants paid
compensation_officersbigintOfficer compensation
total_program_revenuebigintProgram service revenue
investment_incomebigintInvestment income
royalty_incomebigintRoyalty income
net_rental_incomebigintNet rental income
net_gains_lossesbigintNet gains/losses from sale of assets
fundraising_incomebigintGross fundraising income
gaming_incomebigintGross gaming income
tax_exempt_interestbigintTax-exempt bond interest
legal_feesbigintLegal fees
accounting_feesbigintAccounting fees
professional_fundraisingbigintProfessional fundraising fees
management_feesbigintManagement fees
investment_mgmt_feesbigintInvestment management fees
advertisingbigintAdvertising expense
office_expensesbigintOffice expenses
occupancybigintOccupancy/rent
travelbigintTravel
insurancebigintInsurance
depreciationbigintDepreciation
interest_expensebigintInterest expense
other_salaries_wagesbigintOther salaries/wages
pension_contributionsbigintPension plan contributions
employee_benefitsbigintEmployee benefits
payroll_taxesbigintPayroll taxes
total_reportable_compbigintTotal reportable compensation
total_estimated_compbigintTotal estimated compensation
individuals_over_100kintegerCount of individuals compensated >$100k
land_buildings_equipmentbigintLand, buildings, equipment (EOY)
investments_endbigintInvestments (EOY)
cash_endbigintCash (EOY)
num_employeesintegerNumber of employees
num_orgsintegerNumber of organizations (group returns)
total_supportbigintTotal support
non_pf_reasonvarchar(5)Reason not a private foundation
filed_990tbooleanFiled Form 990-T (UBIT)
unrelated_business_incomebooleanHas unrelated business income
foreign_officesbooleanHas foreign offices
political_activitiesbooleanPolitical campaign activities
lobbying_activitiesbooleanLobbying activities
operates_hospitalbooleanOperates a hospital
donor_advised_fundsbooleanMaintains donor-advised funds
asset_sizevarcharAsset size category
ntee_codevarcharNTEE classification code
org_namevarcharOrganization name
statevarcharState abbreviation
revenue_less_expensesbigintRevenue minus expenses
total_programsbigintTotal program count

Unique key: (ein, tax_year)

Example queries

# Get financials for a specific EIN across years
curl "https://benthic.io/ngopen/irs_ng/form990_soi?ein=eq.123456789&order=tax_year"

# Largest organizations by revenue in 2022
curl "https://benthic.io/ngopen/irs_ng/form990_soi?select=ein,total_revenue,total_expenses,total_assets&tax_year=eq.2022&order=total_revenue.desc&limit=25"

# 501(c)(3) organizations with lobbying activities
curl "https://benthic.io/ngopen/irs_ng/form990_soi?is_501c3=is.true&lobbying_activities=is.true&tax_year=eq.2022&limit=50"

# Organizations by NTEE code
curl "https://benthic.io/ngopen/irs_ng/form990_soi?ntee_code=eq.E&tax_year=eq.2022&select=ein,org_name,ntee_code,total_revenue&order=total_revenue.desc&limit=25"

# Filter by state and asset size
curl "https://benthic.io/ngopen/irs_ng/form990_soi?state=eq.CA&asset_size=eq.L&tax_year=eq.2022&select=ein,org_name,total_revenue,total_expenses&order=total_revenue.desc&limit=25"

form990_soi_private_foundation

Per-EIN annual financial data for private foundations from IRS SOI extracts (Form 990-PF). One row per EIN per tax year.

ColumnTypeDescription
einvarchar(20)EIN
tax_yearintegerTax year
tax_periodvarchar(6)Tax period (YYYYMM)
operating_cdvarchar(5)Operating foundation code
is_operatingbooleanTRUE if operating foundation
fair_market_valuebigintFair market value of all assets
gross_contributionsbigintGross contributions received
interest_revenuebigintInterest revenue
dividendsbigintDividends
gross_rentsbigintGross rents
total_receipts_booksbigintTotal receipts per books
compensation_officersbigintOfficer compensation
total_expenses_booksbigintTotal expenses per books
contributions_paidbigintContributions, gifts, grants paid
net_investment_incomebigintNet investment income
total_assetsbigintTotal assets (EOY)
total_liabilitiesbigintTotal liabilities
fund_net_worthbigintFund balance/net worth
distributionsbigintQualifying distributions
undistributed_incomebigintUndistributed income
minimum_investment_returnbigintMinimum investment return
grants_approved_futurebigintGrants approved for future payment
excise_taxbigintExcise tax on investment income

Unique key: (ein, tax_year)

form990_details

Parsed data from IRS Form 990 XML filings. Includes Schedule R flags indicating organizational complexity.

ColumnTypeDescription
einvarchar(20)EIN
tax_periodvarchar(10)Tax period (YYYYMM)
form_typevarchar(10)990, 990EZ, or 990PF
filing_datedateDate filed
total_revenuebigintTotal revenue
contributions_receivedbigintContributions received
program_service_revenuebigintProgram service revenue
total_expensesbigintTotal expenses
grants_paidbigintGrants paid
total_assetsbigintTotal assets
total_liabilitiesbigintTotal liabilities
net_assetsbigintNet assets
has_disregarded_entitybooleanSchedule R: has disregarded entity
has_related_entitybooleanSchedule R: has related entity
has_related_org_controlbooleanSchedule R: related org controls entity
has_transfer_to_noncharitablebooleanSchedule R: transfer to non-charitable related org
has_partnership_activitybooleanSchedule R: partnership activities
xml_pathvarchar(500)Path to source XML file

Unique key: (ein, tax_period)

Example queries

# Filings with complex organizational structures (Schedule R flags)
curl "https://benthic.io/ngopen/irs_ng/form990_details?has_related_entity=is.true&has_disregarded_entity=is.true&limit=50"

# Recent filings for an EIN
curl "https://benthic.io/ngopen/irs_ng/form990_details?ein=eq.123456789&order=tax_period.desc"

form990t_details

Unrelated Business Income Tax (UBIT) data parsed from IRS Form 990-T XML filings. Organizations with unrelated business income must file this form. Useful for identifying nonprofits engaged in commercial activities.

ColumnTypeDescription
idintegerPrimary key
einvarchar(20)EIN
tax_periodvarchar(10)Tax period (YYYYMM)
filing_datedateDate filed
organization_501c_typevarchar(10)501(c) subsection type
book_value_assets_eoybigintBook value of assets at end of year
total_ubti_computedbigintTotal unrelated business taxable income (computed)
total_ubtibigintTotal unrelated business taxable income
taxable_corporationbigintTaxable corporation indicator
total_tax_computationbigintTotal tax computation
total_taxbigintTotal tax due
estimated_tax_paymentsbigintEstimated tax payments
specific_deductionbigintSpecific deduction
total_deductionbigintTotal deduction
charitable_contributions_dedbigintCharitable contributions deduction
capital_gain_net_incomebigintNet capital gain income
total_ordinary_gain_lossbigintTotal ordinary gain/loss
total_prtshp_scorp_incomebigintTotal partnership/S-corp income
other_incomebigintOther income
interest_deductionbigintInterest deduction
other_deductionsbigintOther deductions
total_deductionsbigintTotal deductions
unrelated_bus_incomebigintUnrelated business income
principal_business_activity_cdvarchar(10)Principal business activity code
trade_or_business_desctextTrade or business description
source_filevarchar(500)Source filename
xml_pathvarchar(500)Path to source XML file
imported_attimestampImport timestamp

Unique key: (ein, tax_period)

Example queries

# Organizations with high UBIT
curl "https://benthic.io/ngopen/irs_ng/form990t_details?total_ubti=gt.1000000&select=ein,tax_period,total_ubti,total_tax,trade_or_business_desc&order=total_ubti.desc&limit=25"

# Find nonprofits engaged in specific business activities
curl "https://benthic.io/ngopen/irs_ng/form990t_details?trade_or_business_desc=ilike.*real%20estate*&select=ein,tax_period,trade_or_business_desc,total_ubti&limit=25"

# Organizations with large estimated tax payments
curl "https://benthic.io/ngopen/irs_ng/form990t_details?estimated_tax_payments=gt.100000&select=ein,estimated_tax_payments,total_tax&order=estimated_tax_payments.desc&limit=25"

form990_schedule_o

Narrative text from Form 990 Schedule O (Supplemental Information). Contains program accomplishments, governance descriptions, and other supplemental disclosures.

ColumnTypeDescription
einvarchar(20)EIN
tax_periodvarchar(6)Tax period (YYYYMM)
form_typevarchar(10)Form type
program_accomplishmentstextProgram accomplishments narrative
governance_texttextGovernance descriptions
supplemental_infotextOther supplemental information

Unique key: (ein, tax_period, form_type)

form990_xml_import_log

Tracks XML filing import jobs. Records when Form 990/990-T/Schedule O XML files were processed and how many records were imported.

ColumnTypeDescription
idintegerPrimary key
zip_filenamevarcharSource ZIP filename
xml_countintegerNumber of XML files in source
records_importedintegerTotal records imported
records_990integerForm 990 records imported
records_990tintegerForm 990-T records imported
schedule_o_countintegerSchedule O records imported
import_started_attimestampImport job start time
import_completed_attimestampImport job completion time
import_statusvarcharJob status
notestextImport notes/errors

pub78_eligible

Organizations eligible to receive tax-deductible charitable contributions (IRS Publication 78).

ColumnTypeDescription
einvarchar(20)EIN (unique)
org_namevarchar(500)Organization name
cityvarchar(100)City
statevarchar(10)State
is_deductiblebooleanEligible for deductible contributions

Example queries

# Check if an org is Pub78 eligible
curl "https://benthic.io/ngopen/irs_ng/pub78_eligible?ein=eq.123456789"

# Search by name
curl "https://benthic.io/ngopen/irs_ng/pub78_eligible?org_name=ilike.*red%20cross*&limit=20"

revoked_organizations

Organizations whose federal tax-exempt status has been automatically revoked by the IRS (typically for failure to file for 3 consecutive years).

ColumnTypeDescription
einvarchar(20)EIN (unique)
org_namevarchar(500)Organization name
revocation_datedateDate of revocation
revocation_reasonvarchar(255)Reason for revocation

Example queries

# Check if an org was revoked
curl "https://benthic.io/ngopen/irs_ng/revoked_organizations?ein=eq.123456789"

# Revoked in a date range
curl "https://benthic.io/ngopen/irs_ng/revoked_organizations?revocation_date=gte.2024-01-01&revocation_date=lte.2024-12-31&limit=100"

form990n_small_orgs

Small tax-exempt organizations filing Form 990-N (e-Postcard). These are organizations with gross receipts normally $50,000 or less.

ColumnTypeDescription
einvarchar(20)EIN (unique)
org_namevarchar(500)Organization name
tax_periodvarchar(20)Most recent tax period
websitevarchar(500)Organization website

political_orgs_527

Political organizations registered under IRC Section 527, from IRS Form 8871 filings.

ColumnTypeDescription
einvarchar(20)EIN
org_namevarchar(500)Organization name
filing_typevarchar(10)Filing type (e.g. 8871)
org_typevarchar(200)Organization type description
addressvarchar(500)Mailing address
cityvarchar(100)City
statevarchar(10)State
zipvarchar(20)ZIP code
filing_datedateDate of filing
latitudenumericGeocoded latitude
longitudenumericGeocoded longitude
geocoding_sourcevarchar(50)Geocoding source

Unique key: (ein, filing_type)

Example queries

# All 527 orgs in a state
curl "https://benthic.io/ngopen/irs_ng/political_orgs_527?state=eq.TX&limit=50"

# Geocoded 527 orgs
curl "https://benthic.io/ngopen/irs_ng/political_orgs_527?latitude=not.is.null&limit=100"

census_demographics

ACS 5-year estimates for census tracts and counties (2009-2024). Useful for contextualizing nonprofit locations with socioeconomic data.

ColumnTypeDescription
geoidvarchar(20)Census GEOID (11-digit for tracts, 5-digit for counties)
geo_typevarchar(10)tract or county
yearintegerACS survey year
total_populationintegerTotal population
median_household_incomeintegerMedian household income
poverty_countintegerPopulation below poverty line
white_countintegerWhite alone population
black_countintegerBlack or African American alone population
hispanic_countintegerHispanic or Latino population
bachelors_countintegerBachelor’s degree or higher (2012+)
housing_unitsintegerTotal housing units
median_housing_valueintegerMedian housing value (owner-occupied)

Unique key: (geoid, year, geo_type)

Example queries

# Get demographics for a specific tract
curl "https://benthic.io/ngopen/irs_ng/census_demographics?geoid=eq.06075010100&geo_type=eq.tract&year=eq.2022"

# Counties with highest median income
curl "https://benthic.io/ngopen/irs_ng/census_demographics?select=geoid,total_population,median_household_income&geo_type=eq.county&year=eq.2022&order=median_household_income.desc&limit=20"

Views

v_org_financial_profile

Joins bmf_organizations (current records only) with form990_soi to provide a combined organizational + financial profile. Left join means BMF organizations appear even without SOI data.

ColumnTypeDescription
einvarchar(20)EIN
org_name_currenttextCurrent organization name
f990_org_addr_statevarchar(10)State
ntee_irsvarchar(10)NTEE code
bmf_subsection_codevarchar(10)IRC subsection
latitudenumericGeocoded latitude
longitudenumericGeocoded longitude
tax_yearintegerTax year
form_typevarchar(10)Form type
total_revenuebigintTotal revenue
total_expensesbigintTotal expenses
total_assetsbigintTotal assets
contributionsbigintContributions received
compensation_officersbigintOfficer compensation
grants_paidbigintGrants paid
investment_incomebigintInvestment income
total_program_revenuebigintProgram service revenue
num_employeesintegerNumber of employees
filed_990tbooleanFiled Form 990-T
unrelated_business_incomebooleanHas unrelated business income
# Get combined profile for an EIN
curl "https://benthic.io/ngopen/irs_ng/v_org_financial_profile?ein=eq.123456789"

# Top revenue organizations with location data
curl "https://benthic.io/ngopen/irs_ng/v_org_financial_profile?select=ein,org_name_current,f990_org_addr_state,total_revenue,latitude,longitude&total_revenue=gt.10000000&order=total_revenue.desc&limit=25"

# 501(c)(3) organizations with UBIT filings
curl "https://benthic.io/ngopen/irs_ng/v_org_financial_profile?bmf_subsection_code=eq.03&filed_990t=is.true&select=ein,org_name_current,total_revenue,total_expenses&order=total_revenue.desc&limit=25"

v_org_multi_year

Financial trends for organizations with 2+ years of SOI data. Includes computed net_income (revenue - expenses) and margin_pct (net income as percentage of revenue).

ColumnTypeDescription
einvarchar(20)EIN
tax_yearintegerTax year
total_revenuebigintTotal revenue
total_expensesbigintTotal expenses
total_assetsbigintTotal assets
net_incomebigintComputed: revenue - expenses
margin_pctnumericComputed: net income / revenue * 100
contributionsbigintContributions received
grants_paidbigintGrants paid
compensation_officersbigintOfficer compensation
# Multi-year trend for an EIN
curl "https://benthic.io/ngopen/irs_ng/v_org_multi_year?ein=eq.123456789&order=tax_year"

# Organizations with declining revenue (negative net income)
curl "https://benthic.io/ngopen/irs_ng/v_org_multi_year?net_income=lt.0&select=ein,tax_year,total_revenue,total_expenses,net_income,margin_pct&order=net_income&limit=25"

# Highest margin organizations
curl "https://benthic.io/ngopen/irs_ng/v_org_multi_year?select=ein,tax_year,total_revenue,net_income,margin_pct&margin_pct=gt.50&order=margin_pct.desc&limit=25"

v_political_orgs

Joins political_orgs_527 with bmf_organizations to show 527 political organizations alongside any BMF records with the same EIN. Useful for identifying nonprofits that also operate as political organizations.

ColumnTypeDescription
einvarchar(20)EIN
political_namevarchar(500)527 organization name
filing_typevarchar(10)Filing type
org_typevarchar(200)Organization type description
cityvarchar(100)City
statevarchar(10)State
latitudenumericGeocoded latitude
longitudenumericGeocoded longitude
bmf_nametextBMF organization name (if matched)
bmf_statevarchar(10)BMF state (if matched)
# All 527 orgs with BMF matches
curl "https://benthic.io/ngopen/irs_ng/v_political_orgs?bmf_name=not.is.null&select=ein,political_name,bmf_name,state"

# 527 orgs in a state
curl "https://benthic.io/ngopen/irs_ng/v_political_orgs?state=eq.FL&select=ein,political_name,org_type,latitude,longitude&limit=50"

mv_nonprofit_profile

Unified nonprofit profile joining bmf_organizations with pub78_eligible, revoked_organizations, and most recent form990_soi financials. One row per current BMF organization.

ColumnTypeDescription
einvarchar(20)EIN
org_name_currenttextCurrent organization name
org_name_sectextSecondary/sort name
ntee_irsvarchar(10)NTEE code
nccs_level_1varchar(100)NTEE major group
bmf_subsection_codevarchar(10)IRC subsection
f990_org_addr_cityvarchar(100)City
f990_org_addr_statevarchar(10)State
org_addr_fulltextFull address
latitudenumericGeocoded latitude
longitudenumericGeocoded longitude
geom_pointgeometryPostGIS point geometry
org_ruling_yearvarchar(10)IRS ruling year
pub78_eligiblebooleanPub78 deductibility status
revocation_datedateRevocation date (if revoked)
revocation_reasonvarchar(255)Revocation reason
recent_revenuebigintMost recent SOI revenue
recent_expensesbigintMost recent SOI expenses
recent_assetsbigintMost recent SOI assets
latest_tax_yearintegerMost recent tax year
compensation_officersbigintOfficer compensation
num_employeesintegerNumber of employees

Example queries

# Revoked nonprofits still on BMF
curl "https://benthic.io/ngopen/irs_ng/mv_nonprofit_profile?revocation_date=not.is.null&select=ein,org_name_current,revocation_date,revocation_reason&limit=25"

# Large nonprofits by revenue
curl "https://benthic.io/ngopen/irs_ng/mv_nonprofit_profile?recent_revenue=gt.10000000&select=ein,org_name_current,f990_org_addr_state,recent_revenue,recent_expenses&order=recent_revenue.desc&limit=25"

# Nonprofits in a state with Pub78 status
curl "https://benthic.io/ngopen/irs_ng/mv_nonprofit_profile?f990_org_addr_state=eq.CA&select=ein,org_name_current,pub78_eligible,recent_revenue&order=recent_revenue.desc&limit=50"

mv_org_financial_health

Multi-year financial health scoring for organizations with 2+ years of SOI data. Classifies organizations as healthy, deficit, or stable based on average margin.

ColumnTypeDescription
einvarchar(20)EIN
years_of_databigintYears of SOI data available
first_yearintegerFirst tax year
latest_yearintegerMost recent tax year
avg_revenuenumericAverage annual revenue
avg_expensesnumericAverage annual expenses
avg_margin_pctnumericAverage profit margin %
total_contributionsbigintSum of all contributions
total_grants_paidbigintSum of all grants paid
total_officer_compbigintSum of officer compensation
ever_filed_990tbooleanEver filed UBIT return
ever_lobbiedbooleanEver reported lobbying
ever_politicalbooleanEver reported political activity
revenue_changebigintMax revenue - min revenue
financial_healthtexthealthy, deficit, or stable

Example queries

# Organizations in deficit
curl "https://benthic.io/ngopen/irs_ng/mv_org_financial_health?financial_health=eq.deficit&select=ein,avg_revenue,avg_margin_pct,years_of_data&order=avg_margin_pct&limit=25"

# Healthy large nonprofits
curl "https://benthic.io/ngopen/irs_ng/mv_org_financial_health?financial_health=eq.healthy&avg_revenue=gt.1000000&select=ein,avg_revenue,avg_margin_pct&order=avg_revenue.desc&limit=25"

# Organizations with lobbying activity
curl "https://benthic.io/ngopen/irs_ng/mv_org_financial_health?ever_lobbied=is.true&select=ein,avg_revenue,total_officer_comp&order=avg_revenue.desc&limit=25"

Spatial RPC functions

rpc_nonprofits_nearby

Find nonprofits within a radius of a lat/lon point. Returns distance in meters.

# Find nonprofits within 5km of a point
curl -X POST "https://benthic.io/ngopen/irs_ng/rpc/rpc_nonprofits_nearby" \
  -H "Content-Type: application/json" \
  -d '{"lat": 38.9072, "lon": -77.0369, "radius_meters": 5000}'

rpc_nonprofits_in_district

Find nonprofits within a specific congressional district using point-in-polygon spatial join via dblink to ucla_polysci_cdmaps.

# Find nonprofits in Texas District 7 (118th Congress)
curl -X POST "https://benthic.io/ngopen/irs_ng/rpc/rpc_nonprofits_in_district" \
  -H "Content-Type: application/json" \
  -d '{"state_name": "Texas", "district_num": 7, "congress": 118}'

PostgREST query reference

Filtering

OperatorSyntaxExample
Equals?col=value?f990_org_addr_state=eq.CA
Not equal?col=neq.value?bmf_subsection_code=neq.03
Greater than?col=gt.value?total_revenue=gt.1000000
Less than?col=lt.value?tax_year=lt.2022
Greater/eq?col=gte.value?latitude=gte.40.0
Less/eq?col=lte.value?latitude=lte.41.0
LIKE?col=like.PATTERN?org_name_current=like.*Foundation*
ILIKE?col=ilike.PATTERN?org_name=ilike.%25red%20cross%25
IS null?col=is.null?latitude=is.null
IS NOT null?col=not.is.null?latitude=not.is.null
IN?col=in.(val1,val2)?f990_org_addr_state=in.(CA,NY,TX)

Selecting columns

?select=ein,org_name_current,latitude,longitude

Ordering

?order=total_revenue.desc
?order=tax_year.asc,ein.asc

Pagination

?limit=100&offset=200

Or use range headers:

Range: 0-99

Counting

# Count with headers only
Prefer: count=exact

# Count as a column
?select=count

Grouping / aggregation

?select=f990_org_addr_state,count&groupby=f990_org_addr_state

Joining tables (embedding)

PostgREST supports resource embedding via foreign key relationships. Use the select parameter with embedded resource notation:

# Get an org from BMF with its SOI financials embedded
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?select=ein,org_name_current,form990_soi(tax_year,total_revenue,total_expenses)&ein=eq.123456789"

# Get SOI data with BMF org name
curl "https://benthic.io/ngopen/irs_ng/form990_soi?select=tax_year,total_revenue,bmf_organizations(org_name_current)&ein=eq.123456789"

# Get an org with its revocation status
curl "https://benthic.io/ngopen/irs_ng/bmf_organizations?select=ein,org_name_current,revoked_organizations(revocation_date)&ein=eq.123456789"

Key relationships

All tables link via EIN (Employer Identification Number). Join patterns:

  • bmf_organizations.ein = primary organization identifier
  • form990_soi.ein = annual financial data (one row per year)
  • form990_soi_private_foundation.ein = foundation financials (one row per year)
  • form990_details.ein = XML filing details (one row per period)
  • form990_schedule_o.ein = narrative text
  • pub78_eligible.ein = deductibility status
  • revoked_organizations.ein = revocation status
  • form990n_small_orgs.ein = small org filings
  • political_orgs_527.ein = 527 political orgs
  • bmf_organization_snapshots.ein = historical BMF snapshots

Cross-dataset: census_demographics.geoid can be derived from address components (state+county+tract FIPS codes).

Data sources

SourceDescriptionUpdate frequency
IRS BMF (via NCCS)Exempt Organization Business Master FileMonthly
IRS SOIStatistics of Income per-EIN extractsAnnual
IRS Pub 78Deductibility eligibility listPeriodic
IRS Auto-RevocationRevoked tax-exempt organizationsPeriodic
IRS Form 990-Ne-Postcard for small organizationsPeriodic
IRS Form 990 XMLFull XML filings (990, 990-EZ, 990-PF)Rolling
IRS Form 8871527 political organization registrationsPeriodic
Census ACSAmerican Community Survey 5-year estimatesAnnual

All data originates from publicly available U.S. government sources.

NTEE Code Reference

NTEE (National Taxonomy of Exempt Entities) codes classify organizations by purpose. The first letter indicates the major group:

CodeCategory
AArts, Culture, and Humanities
BEducation
CEnvironmental Quality, Protection, and Beautification
DAnimal-Related
EHealth
FMental Health and Crisis Intervention
GDiseases, Disorders, and Disciplines
HMedical Research
ICrime and Legal-Related
JEmployment
KFood, Agriculture, and Nutrition
LHousing and Shelter
MPublic Safety
NRecreation and Sports
OYouth Development
PHuman Services
QInternational, Foreign Affairs, and National Security
RCivil Rights, Social Action, and Advocacy
SCommunity Improvement and Capacity Building
TPhilanthropy, Voluntarism, and Grantmaking Foundations
UScience and Technology Research Institutes
VSocial Science Research Institutes
WPublic and Societal Benefit
XReligion-Related
YMutual and Membership Benefit
ZUnknown, Unclassified

Use bmf_organizations.ntee_irs to filter by code or bmf_organizations.nccs_level_1 to filter by the descriptive name.

Common IRC Subsection Codes

CodeMeaning
01501(c)(1) — Corporations organized under Act of Congress
02501(c)(2) — Title-holding corporations
03501(c)(3) — Charitable, religious, educational, scientific
04501(c)(4) — Social welfare organizations
05501(c)(5) — Labor, agricultural, horticultural organizations
06501(c)(6) — Business leagues, chambers of commerce
07501(c)(7) — Social and recreational clubs
08501(c)(8) — Fraternal beneficiary societies
09501(c)(9) — Voluntary employees’ beneficiary associations
10501(c)(10) — Domestic fraternal societies
11501(c)(11) — Teachers’ retirement fund associations
12501(c)(12) — Benevolent life insurance associations
13501(c)(13) — Cemetery companies
14501(c)(14) — State-chartered credit unions
15501(c)(15) — Mutual insurance companies
17501(c)(17) — Supplemental unemployment benefit trusts
18501(c)(18) — Employee funded pension trusts
19501(c)(19) — Veterans organizations
21501(c)(21) — Black lung benefit trusts
22501(c)(22) — Withdrawal liability payment fund
23501(c)(23) — Pre-1880 veterans organizations
25501(c)(25) — Title-holding corporations or trusts
26501(c)(26) — State-sponsored high risk health insurance
27501(c)(27) — State-sponsored workers’ comp reinsurance
29501(c)(29) — CO-OP health insurance issuers
40501(d) — Religious and apostolic organizations
50501(e) — Cooperative hospital service organizations
60501(f) — Cooperative service organizations of operating educational orgs
70501(k) — Child care organizations
71501(n) — Charitable risk pools
81501(c)(1) — Instrumentality of US (state)
924947(a)(1) — Nonexempt charitable trusts