Are there any websites that have basic City and County information for the U.S.?

  • 8
    Can you further clarify what you mean by city and county information? Do you mean a list of cities and counties, or are you referring to information about cities and counties? Do you want geographical information or demographic information?
    – Beau
    Commented May 8, 2013 at 19:20

6 Answers 6


Using the Census Bureau's API, you can retrieve quite a bit of information about counties, but you need to learn where it's stored. You can request up to 50 different variables in a single call, and you can ask for all counties in the US with one call.

To the census, "cities" are "places," and that includes things that you and I might think of as a city but which are not exactly cities legally.

For example, this URL would return the total population from the 2010 Decennial Census for all US counties, as a list of lists (in JSON format). The first row is a header, followed by 3221 rows, one per county. The county name and state and county FIPS codes are included in addition to the variables requested.

http://api.census.gov/data/2010/sf1?key=[your API key here]&get=P0010001,NAME&for=county:*

And this is for all the "places" in the US (almost 30K): http://api.census.gov/data/2010/sf1?key=[your API key here]&get=P0010001,NAME&for=place:*

There's more info about the API at http://www.census.gov/developers/ and you can request a key here.

Update: The Census Bureau is developing a CitySDK project which is specifically intended to make it easier for developers to pull together city-level data, including, eventually, data from sources other than the US Census. The project is also an effort to experiment with agile development methodologies and community involvement, so if you're at all interested, they invite suggestions of user stories and other participation. See also the Github project and Waffle.io project board.

  • "as a list of lists" - It might help to specify JSON here to make searching a bit easier, since JSON is a popular format, but "list of lists" might not be as visible. Commented May 9, 2013 at 13:02
  • Thanks, John. I made a minor edit to clarify that the data is JSON, although part of the point was that people usually think of JSON as being dicts, not lists... Commented May 9, 2013 at 15:29
  • You're right. The census format actually seems a little strange to me, since it's not a dictionary at all but rather a CSV file wrapped in list notation. Commented May 9, 2013 at 15:40
  • 1
    I'll plug that some packages provide very friendly interfaces to the census API, like tidycensus in R. Also check the 500 cities project from Robert Wood Johnson Foundation and the CDC PLACES project for large cities and county data on health, etc. cdc.gov/places/index.html Commented Mar 2, 2021 at 23:01

The U.S. Small Business Administration has an API that provides U.S. City and County Data.

This geographic names data set provides a "mashup" of URLs for official city and county government web sites and city and county location data from the USGS Geographic Names Information System (GNIS). GNIS data includes incorporated places, census designated areas, unincorporated places, counties, and populated places.

It is available at http://www.sba.gov/about-sba-services/7617.

  • 1
    This source seems to be incomprehensive. As an example, I searched for Huntington, NY in the results from this API call and it wasn't present. api.sba.gov/geodata/city_county_data_for_state_of/NY.json Neither were a number of other major towns in NY. However, Huntington did turn up in a search at GNIS, which SBA says is part of their data source. So while this SBA API is a useful data source for city and county URLs, I wouldn't expect it to provide a very comprehensive list of city or place names. It may be fine on the county level, however-- that would take further digging to verify.
    – Alison R.
    Commented May 21, 2013 at 20:44

I've been building an API for this called DemocracyMap. Probably the most relevant data resource for the basic details of city and county government is the Census of Governments: Government Integrated Directory which provides city/county name, address of gov office, phone number, etc. This in combination with Census Tiger boundary data will get you pretty far and served as the basis for the DemocracyMap API. Tiger data is available via API from Tigerweb, but I haven't found any APIs serving the GID directly from the Census. All other sources for the more comprehensive DemocracyMap API can be found at http://api.democracymap.org


If you just want an API to get the County that encompasses a given Latitude and Longitude, the FCC's Census Block Conversions API is helpful.


If you're looking for demographic information, the U.S. Census Bureau data could be helpful, especially the American Communities Survey. The QuickFacts section states that:

State and County QuickFacts provides frequently requested Census Bureau information at the national, state, county, and city level.

The primary long form Census data are only collected every 10 years; the American Community Survey is taken monthly, but data releases are made annually. For the 40% of US counties that have less than 20K people, data for them is found in the ACS 5-year release. See this page for more information about the 1, 3, and 5 year releases. Thanks for Joe for the reminder about the ACS.

  • 2
    Clarification: data for the American Community Survey is gathered continuously; data releases are made annually. However, about 40% of US counties have less than 20K people, which means data for them can only be found in the ACS 5-year release. (for a little more about the 1,3 and 5-year releases, see census.gov/acs/www/guidance_for_data_users/estimates) Commented May 8, 2013 at 21:40
  • @JoeGermuska Good point; I'll add that into my answer (if you don't mind). Commented May 8, 2013 at 21:48
  • please, go right ahead Commented May 8, 2013 at 22:05

I've found the most complete information of this information internationally (not just the U.S.) at statoids.com. One aspect of completeness is that Statoids explains the ambiguous issues.

For instance, your question seems straightforward enough, but Statoids notes: "The secondary administrative divisions of the United States are of several types. There are counties, parishes, independent cities, boroughs, census areas, city-and-boroughs, city-and-counties, a district, a municipality, and a town-and-county. The general term for all these types is 'county-equivalent units'."

The Statistics Division of the United Nations also provides considerable information about municipalities world-wide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.