API
Documentation
Get income data at the national, state and county level
Getting Started
All you need to start making API calls is to obtain a key and pass it in your call using the x-api-key
header.
To test your token you can visit : https://api.comparefi.co/api/validateKey
Header: x-api-key:{apikey}
Returns: HTTP 200 if key is valid, returns HTTP 401 if key is invalid
Get Your API Token
Example Call/Response
Example Call: https://api.comparefi.co/income/education/county?state=Arizona&county=Maricopa County
Expected Response:
{
"id": 27,
"state": "Arizona",
"county": "Maricopa County",
"medianNoHighSchoolTotal": "33618",
"medianNoHighSchoolMale": "38601",
"medianNoHighSchoolFemale": "26847",
"medianHighSchoolTotal": "40445",
"medianHighSchoolMale": "44279",
"medianHighSchoolFemale": "35468",
"medianAssociateTotal": "48485",
"medianAssociateMale": "54030",
"medianAssociateFemale": "42258",
"medianBachelorsTotal": "66613",
"medianBachelorsMale": "80150",
"medianBachelorsFemale": "56617",
"medianPostGradTotal": "81014",
"medianPostGradMale": "101124",
"medianPostGradFemale": "68418"
}
Tips
1. For each of the income endpoints, you can obtain all the county or state level data in 1 query by using '*'
Example: https://api.comparefi.co/api/income/education/state?state=*
Note: A query using '*' costs 50 API calls. As it returns 50x the data for states and ~850x the data for counties.
2. When querying, use the full name for a state (Arizona, not AZ) and make sure to use a county's full name, (Maricopa is actually Maricopa County)
Use the dropdown boxes below to find the State and County combinations possible for API calls.