County API
The County API enables you to look up detailed information for every county in the United States. You can search using various parameters including county name, ZIP code, or state.
From 2,421 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 406ms | 439ms | 499ms | 815ms | 1227ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v1/county GET
https://api.api-ninjas.com/v1/county
Returns details for one or more counties matching the input parameters. For premium users, you can also specify the limit and offset parameters to paginate through results.
Parameters
At least one of the following parameters (except limit and offset) must be set:
countyoptionalFull name of the county to search.
zipcodeoptional5-digit ZIP code to search.
stateoptional2-letter state code (case-insensitive).
limitoptional premium onlyNumber of results to return. Must be between
1and30. Default is1.offsetoptional premium onlyNumber of results to offset for pagination. Default is
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
Returns an array of county objects, each containing:
county_nameName of the county.
county_fipsFIPS (Federal Information Processing Standards) code for the county.
state_code2-letter state code.
state_nameFull name of the state.
latitudeLatitude coordinate of the county.
longitudeLongitude coordinate of the county.
timezoneTimezone of the county (e.g., "America/Los_Angeles").
zip_codesArray of ZIP codes within the county.
populationCounty population count.
median_ageMedian age of the county population.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/county?county=Multnomah CountyHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[
{
"county_name": "Multnomah County",
"county_fips": "41051",
"state_code": "OR",
"state_name": "Oregon",
"latitude": "45.5468",
"longitude": "-122.4149",
"timezone": "America/Los_Angeles",
"zip_codes": [
"97009",
"97010",
"97014",
"97019",
"97024",
"97030",
"97034",
"..."
],
"population": 803863,
"median_age": 38.5
}
]Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/county?name=Los%20Angeles" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.