API reference
Nonprofit lookup (IRS)
POST /nonprofit reads an EIN in the IRS exempt organization files: name, location, 501(c) subsection, deductibility, ruling date, NTEE code, finances and revocation.
https://api.qelka.com/v1/nonprofitCheck whether an Employer Identification Number (EIN) belongs to a US tax-exempt organization: you get its name and location, the section of the Internal Revenue Code it is exempt under, such as 501(c)(3), whether donations to it are deductible, its ruling date, its activity code, its latest assets, income and revenue, and whether the IRS revoked its exemption. Each lookup costs 1 credit, found or not; errors and test keys are never billed.
Request
einstringRequiredfreshbooleanDefault falseThe lookup does not wait for the IRS, so it answers quickly; every snippet still sets a 30-second client timeout.
curl https://api.qelka.com/v1/nonprofit \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ein": "53-0196605"}'
const response = await fetch('https://api.qelka.com/v1/nonprofit', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ein: '53-0196605' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/nonprofit",
headers={"Authorization": f"Bearer {api_key}"},
json={"ein": "53-0196605"},
timeout=30,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/nonprofit');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['ein' => '53-0196605']),
CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
func main() {
payload, _ := json.Marshal(map[string]any{"ein": "53-0196605"})
request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/nonprofit", bytes.NewReader(payload))
request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result)
}
require 'json'
require 'net/http'
uri = URI('https://api.qelka.com/v1/nonprofit')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ ein: '53-0196605' })
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) do |http|
http.request(request)
end
result = JSON.parse(response.body)
puts result
Response
Every lookup gets a 200, found or not. Read status first: exempt, revoked, not_found or invalid.
idstringlkp_ followed by 26 characters.objectstringnonprofit.inputstringein you sent.einstring or nullXX-XXXXXXX. null when the input is not 9 digits.validbooleanfalse when the input is not 9 digits, or starts with a prefix the IRS does not assign and is in neither file.statusstringexempt, revoked, not_found or invalid.reasonstring or nullinvalid: invalid_format or invalid_prefix. null otherwise.organizationobject or nullorganization.namestringorganization.care_ofstring or nullorganization.citystring or nullorganization.statestring or nullorganization.zipstring or nullorganization.subsectionobject or nullorganization.subsection.codestring03.organization.subsection.labelstring or null501(c)(3).organization.ruling_datestring or nullYYYY-MM.organization.deductibilityobject or nullorganization.deductibility.codestring1, 2 or 4.organization.deductibility.labelstring or nullContributions are deductible.organization.deductibility.deductiblebooleantrue for codes 1 and 4.organization.foundationobject or nullorganization.foundation.codestring15.organization.foundation.labelstring or nullorganization.organization_typeobject or nullcode and label, such as 1 for Corporation.organization.exempt_statusobject or nullcode and label, such as 01 for Unconditional exemption.organization.affiliationobject or nullcode and label, such as 3 for Independent organization.organization.nteeobject or nullorganization.ntee.codestringP210.organization.ntee.groupstringP for human services.organization.ntee.labelstring or nullAmerican Red Cross.organization.group_exemptionstring or nullorganization.filingobjectorganization.filing.tax_periodstring or nullYYYY-MM.organization.filing.assetsnumber or nullorganization.filing.incomenumber or nullorganization.filing.revenuenumber or nullorganization.in_master_filebooleantrue when the organization is in the current Business Master File, false when it is only on the revocation list.revocationobject or nullnull otherwise.revocation.revoked_onstring or nullYYYY-MM-DD.revocation.posted_onstring or nullYYYY-MM-DD.revocation.reinstated_onstring or nullYYYY-MM-DD. null when it was not.revocation.exemption_typestring or null501(c)(7).datasetobject or nullnull when the input is not 9 digits.dataset.organizationsintegerdataset.revocationsintegerdataset.master_file_publishedstring or nullYYYY-MM-DD.dataset.revocations_publishedstring or nullYYYY-MM-DD.dataset.loaded_atstringcredits_usedinteger0 with a test key.cachedbooleanfalse: lookups are never cached.{
"id": "lkp_01M8CFQ9KCAEGWZFV6T5NDF6A3",
"object": "nonprofit",
"input": "53-0196605",
"ein": "53-0196605",
"valid": true,
"status": "exempt",
"reason": null,
"organization": {
"name": "AMERICAN NATIONAL RED CROSS",
"care_of": null,
"city": "WASHINGTON",
"state": "DC",
"zip": "20006-5310",
"subsection": { "code": "03", "label": "501(c)(3)" },
"ruling_date": "1938-12",
"deductibility": { "code": "1", "label": "Contributions are deductible", "deductible": true },
"foundation": {
"code": "15",
"label": "Organization that receives a substantial part of its support from a governmental unit or the general public 170(b)(1)(A)(vi)"
},
"organization_type": { "code": "1", "label": "Corporation" },
"exempt_status": { "code": "01", "label": "Unconditional exemption" },
"affiliation": { "code": "1", "label": "Central organization (no group exemption)" },
"ntee": { "code": "P210", "group": "P", "label": "American Red Cross" },
"group_exemption": null,
"filing": { "tax_period": "2025-06", "assets": 5052941623, "income": 4608946426, "revenue": 3916983933 },
"in_master_file": true
},
"revocation": null,
"dataset": {
"organizations": 3050635,
"revocations": 1228742,
"master_file_published": "2026-11-09",
"revocations_published": "2026-11-17",
"loaded_at": "2026-11-26T17:46:03.756Z"
},
"credits_used": 1,
"cached": false
}
Act on the status
status |
reason |
What it means | What to do |
|---|---|---|---|
exempt |
null |
The organization is in the IRS files and its exemption is not revoked. | Check organization.subsection and organization.deductibility: only some organizations can receive tax-deductible donations. |
revoked |
null |
The IRS revoked the exemption and has not reinstated it. | Do not treat the organization as tax-exempt. Read revocation.revoked_on, and ask the organization whether it has applied for reinstatement. |
not_found |
null |
The EIN is well formed but in neither IRS file. | It may belong to a business, or to an organization the IRS has not recognized as exempt. Confirm on the IRS Tax Exempt Organization Search. |
invalid |
invalid_format |
The input is not 9 digits once spaces and dashes are removed. | Ask for the EIN again. |
invalid |
invalid_prefix |
The EIN starts with two digits the IRS does not assign, and is in neither file. | Ask for the EIN again: it is mistyped or invented. |
Every status is billed 1 credit, because the lookup ran.
Not every tax-exempt organization is listed: churches are not required to apply for recognition of exemption, and an organization recognized after the files in use were published is not in them yet.
Test keys read two fictional organizations instead of the IRS files: 99-0000001, SAMPLE COMMUNITY FOUNDATION in Springfield, IL, exempt under 501(c)(3), and 99-0000002, TEST REVOKED SOCIAL CLUB, whose 501(c)(7) exemption was revoked on 2022-05-15. Any other well-formed EIN is not_found, or invalid with an unassigned prefix.
Deductibility and revocation
Exemption and deductibility are not the same thing. Organizations exempt under 501(c)(3) can usually receive tax-deductible donations; most other subsections, such as social welfare organizations (501(c)(4)) or social clubs (501(c)(7)), cannot. organization.deductibility gives the IRS answer: code 1 for deductible, 2 for not deductible, 4 for deductible by treaty (foreign organizations).
The IRS revokes an exemption automatically when an organization does not file a required annual return or notice for three consecutive years. A revoked organization must apply again to be exempt; when the IRS reinstates it, revocation.reinstated_on is set and the status is exempt again. An organization that obtained a new ruling after its revocation is exempt too: its ruling_date falls in or after the month of revocation.revoked_on.
How the EIN is checked
An EIN has 9 digits, written XX-XXXXXXX. Its first two digits are a prefix the IRS assigns; these are never assigned: 00, 07, 08, 09, 17, 18, 19, 28, 29, 49, 69, 70, 78, 79, 89, 96 and 97. The prefix is only checked when the EIN is in neither IRS file.
Where the data comes from
The data is the IRS Exempt Organizations Business Master File Extract, four regional files published monthly by IRS Statistics of Income, merged by EIN with the IRS Automatic Revocation of Exemption List, also published monthly. Both are works of the U.S. Government, in the public domain. They are loaded into the API's database, so a lookup never waits for the IRS; street addresses are not stored. When this page was built, the master file of 2026-11-09 and the revocation list of 2026-11-17 were loaded: 3,050,635 organizations and 1,228,742 revocations. dataset in each response gives the files actually compared. See the data sources page.
Look up a revoked organization
With a test key in QELKA_API_KEY, this request returns the fictional revoked social club. It is only on the revocation list, so in_master_file is false and most organization fields are null.
curl https://api.qelka.com/v1/nonprofit \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ein": "99-0000002"}'
const response = await fetch('https://api.qelka.com/v1/nonprofit', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ein: '99-0000002' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/nonprofit",
headers={"Authorization": f"Bearer {api_key}"},
json={"ein": "99-0000002"},
timeout=30,
)
result = response.json()
print(result)
{
"id": "lkp_01M8CGAAP3MS8G2Y6NVK1CW4RT",
"object": "nonprofit",
"input": "99-0000002",
"ein": "99-0000002",
"valid": true,
"status": "revoked",
"reason": null,
"organization": {
"name": "TEST REVOKED SOCIAL CLUB",
"care_of": null,
"city": "SPRINGFIELD",
"state": "IL",
"zip": "62702-0002",
"subsection": { "code": "07", "label": "501(c)(7)" },
"ruling_date": null,
"deductibility": null,
"foundation": null,
"organization_type": null,
"exempt_status": null,
"affiliation": null,
"ntee": null,
"group_exemption": null,
"filing": { "tax_period": null, "assets": null, "income": null, "revenue": null },
"in_master_file": false
},
"revocation": {
"revoked_on": "2022-05-15",
"posted_on": "2022-08-08",
"reinstated_on": null,
"exemption_type": "501(c)(7)"
},
"dataset": {
"organizations": 1,
"revocations": 1,
"master_file_published": "2026-01-12",
"revocations_published": "2026-01-12",
"loaded_at": "2026-01-15T00:00:00.000Z"
},
"credits_used": 0,
"cached": false
}
Errors
| Status | Type | When |
|---|---|---|
| 400 | invalid_request | ein missing, empty or longer than 20 characters, a body that is not a JSON object, or a field the request table does not list |
| 401 | invalid_api_key | The key is missing, unknown or revoked |
| 402 | insufficient_credits | Your balance is less than 1 credit (live keys only) |
| 403 | forbidden | The key is restricted to other endpoints |
| 405 | invalid_request | The method is not POST |
| 429 | rate_limited | Too many requests: wait Retry-After seconds |
| 500 | internal_error | Unexpected error on our side: retry with backoff |
| 502 | upstream_unavailable | The IRS data is not loaded yet: retry later |
No error is billed. An EIN that is in neither file is not an error: it is a 200 with status: "not_found".
Related
- Nonprofit verification API
- Free tool: nonprofit EIN lookup
- SEC company data for the EINs of SEC filers, also in the free EIN lookup
- Batch: up to 100 lookups in one call, each item with
type: "nonprofit" - Bulk: a whole file of EINs with
type=nonprofit - Errors, Test mode