curl --request GET \
--url 'https://api.givingcompass.org/insights/typeahead/nonprofits?q=red%20cro&limit=5' \
--header 'X-API-Key: <api-key>'
import requests
response = requests.get(
"https://api.givingcompass.org/insights/typeahead/nonprofits",
params={"q": "red cro", "limit": 5},
headers={"X-API-Key": "<api-key>"},
)
print(response.json())
const response = await fetch(
"https://api.givingcompass.org/insights/typeahead/nonprofits?" +
new URLSearchParams({ q: "red cro", limit: "5" }),
{ headers: { "X-API-Key": "<api-key>" } }
);
const data = await response.json();
{
"query": "red cro",
"count": 2,
"results": [
{
"ein": "530196605",
"name": "American National Red Cross",
"city": "Washington",
"state": "DC",
"score": 42.0
},
{
"ein": "030179419",
"name": "Red Crow Foundation",
"city": "Burlington",
"state": "VT",
"score": 18.5
}
]
}
{
"detail": [
{
"loc": ["query", "q"],
"msg": "String should have at least 2 characters",
"type": "string_too_short"
}
]
}
Nonprofit Endpoints
Typeahead Nonprofits
Search-as-you-type nonprofit suggestions matched by name or EIN
GET
/
typeahead
/
nonprofits
curl --request GET \
--url 'https://api.givingcompass.org/insights/typeahead/nonprofits?q=red%20cro&limit=5' \
--header 'X-API-Key: <api-key>'
import requests
response = requests.get(
"https://api.givingcompass.org/insights/typeahead/nonprofits",
params={"q": "red cro", "limit": 5},
headers={"X-API-Key": "<api-key>"},
)
print(response.json())
const response = await fetch(
"https://api.givingcompass.org/insights/typeahead/nonprofits?" +
new URLSearchParams({ q: "red cro", limit: "5" }),
{ headers: { "X-API-Key": "<api-key>" } }
);
const data = await response.json();
{
"query": "red cro",
"count": 2,
"results": [
{
"ein": "530196605",
"name": "American National Red Cross",
"city": "Washington",
"state": "DC",
"score": 42.0
},
{
"ein": "030179419",
"name": "Red Crow Foundation",
"city": "Burlington",
"state": "VT",
"score": 18.5
}
]
}
{
"detail": [
{
"loc": ["query", "q"],
"msg": "String should have at least 2 characters",
"type": "string_too_short"
}
]
}
Search-as-you-type nonprofit lookup. Prefix-matches active 501(c)(3) legal names and IRS Business Master File alternate names using a weighted completion suggester, tolerating a single typo. Input that looks like an EIN—with or without dashes—returns that nonprofit directly.
Requests that fail validation (e.g.
Authorizations
Query Parameters
What the user typed (2–100 characters): a nonprofit name prefix, or an EIN with or without dashes (e.g.
12-3456789 or 123456789).2-letter state code. Accepted for forward-compatibility but currently ignored—results are not state-filtered yet.
Response
Ranked nonprofit suggestions, best match first.
Show properties
Show properties
The organization’s 9-digit EIN as a string, with leading zeros preserved (e.g.
"030179419"). Never coerce to an integer.q shorter than 2 characters, limit outside 1–25) return a 422 validation error.
curl --request GET \
--url 'https://api.givingcompass.org/insights/typeahead/nonprofits?q=red%20cro&limit=5' \
--header 'X-API-Key: <api-key>'
import requests
response = requests.get(
"https://api.givingcompass.org/insights/typeahead/nonprofits",
params={"q": "red cro", "limit": 5},
headers={"X-API-Key": "<api-key>"},
)
print(response.json())
const response = await fetch(
"https://api.givingcompass.org/insights/typeahead/nonprofits?" +
new URLSearchParams({ q: "red cro", limit: "5" }),
{ headers: { "X-API-Key": "<api-key>" } }
);
const data = await response.json();
{
"query": "red cro",
"count": 2,
"results": [
{
"ein": "530196605",
"name": "American National Red Cross",
"city": "Washington",
"state": "DC",
"score": 42.0
},
{
"ein": "030179419",
"name": "Red Crow Foundation",
"city": "Burlington",
"state": "VT",
"score": 18.5
}
]
}
{
"detail": [
{
"loc": ["query", "q"],
"msg": "String should have at least 2 characters",
"type": "string_too_short"
}
]
}