I'm looking for an api that says the available counties for each states.... Like for Nebraska, it should return Douglas, Sarpy, Fremont, etc...
Any answer would be appreciated.
Open Data Stack Exchange is a question and answer site for developers and researchers interested in open data. It only takes a minute to sign up.
Sign up to join this communityEven I do not have API, but these two resources can help a lot.
NACo County Explorer which is interactive map based county explorer which gives information like population, area, economy, county contact.
List of counties by U.S. state and territory , it is Wikipedia page which contains list of counties by USA State.
This is a very detailed database with data about all the counties in the USA. The USA counties database is accessible via API and developers can perform queries and consume the data using the API playground.
The list of US counties dataset provides the following information for each county of the US
- County Name
- County State
- County State Code
- County MSA Code
- County FIPS Code
- County Township Code
const fetch = require('node-fetch');
(async () => {
const response = await fetch(
'https://parseapi.back4app.com/classes/Area?limit=50&order=state,countyName&keys=countyName,state',
{
headers: {
'X-Parse-Application-Id': 'VWAH9UbFty9tuCJVHIJPjYvH8OGcNyUTMkHH3UvL', // This is the fake app's application id
'X-Parse-Master-Key': 'UsYwiuputxOcEcYTZqWKshopMgEjElqA4U4Mcy9V', // This is the fake app's readonly master key
}
}
);
const data = await response.json(); // Here you have the data that you need
console.log(JSON.stringify(data, null, 2));
})();
Would give the following result:
{
"results": [
{
"objectId": "rEqDvFeLMA",
"state": "Alabama",
"countyName": "Autauga County",
"createdAt": "2019-12-17T15:23:19.860Z",
"updatedAt": "2019-12-17T15:23:19.860Z"
},
{
"objectId": "NNYekTy0dA",
"state": "Alabama",
"countyName": "Baldwin County",
"createdAt": "2019-12-17T15:23:19.860Z",
"updatedAt": "2019-12-17T15:23:19.860Z"
},
...