{"id":42790,"date":"2026-10-03T14:27:51","date_gmt":"2026-10-03T12:27:51","guid":{"rendered":"https:\/\/www.graviton.at\/letterswaplibrary\/dataset-255-countries-4314-states-provinces-and-1-67m-cities-with-coordinates-cc0-free-json-api-with-no-key\/"},"modified":"2026-10-03T14:27:51","modified_gmt":"2026-10-03T12:27:51","slug":"dataset-255-countries-4314-states-provinces-and-1-67m-cities-with-coordinates-cc0-free-json-api-with-no-key","status":"publish","type":"post","link":"https:\/\/www.graviton.at\/letterswaplibrary\/dataset-255-countries-4314-states-provinces-and-1-67m-cities-with-coordinates-cc0-free-json-api-with-no-key\/","title":{"rendered":"[Dataset] 255 Countries, 4,314 States\/provinces And 1.67M Cities With Coordinates, CC0, Free JSON API With No Key"},"content":{"rendered":"<p><!-- SC_OFF --><\/p>\n<div class=\"md\">\n<p>Hi all,<\/p>\n<p>I needed a country \/ state \/ city list for ShopClass, our open source classifieds app. Sounds easy but every option I found had a catch. Either the licence needed attribution or was share-alike, or it was a paid API with keys and rate limits, or the data was old and half the cities had no coordinates. <\/p>\n<p>Why no other share-alike database considered?<br \/> See, I am happy to give attribution, buty anyone using my CMS for there website they need to give it too, which I think is a limitation. So I created this no-attribution dataset.<\/p>\n<p>So I built our own dataset from Wikidata and released it as CC0. Public domain, no attribution needed, use it in anything including commercial stuff.<\/p>\n<p>What&#8217;s in it:<\/p>\n<p>\u2022 255 countries and territories, 4,314 administrative divisions (states, provinces, regions) and 1,671,395 cities and towns<\/p>\n<p>\u2022 every single place has latitude and longitude, if wikidata has no position for it we don&#8217;t ship it<\/p>\n<p>\u2022 Wikidata QID as the id, so when you re-import a later release a renamed place stays the same row<\/p>\n<p>\u2022 population, timezone, GeoNames id where known<\/p>\n<p>\u2022 countries have capital, currency, calling code, ISO alpha-2\/3 and numeric, flag emoji etc<\/p>\n<p>How to get it:<\/p>\n<p>\u2022 plain JSON, one file per country, with sha256 checksums for every file<\/p>\n<p>\u2022 or call it from the browser or your server, no API key, no account, CORS is open: <a href=\"https:\/\/api.placedb.org\/v1\/countries.json\">https:\/\/api.placedb.org\/v1\/countries.json<\/a><\/p>\n<p>\u2022 there are prefix files for autocomplete too, so a city search box can work without a backend<\/p>\n<p>\u2022 the pipeline that builds it is GPLv3 and the output is deterministic, same wikidata dump gives byte-identical files<\/p>\n<p>Also, it&#8217;s not perfect and here is where:<\/p>\n<p>\u2022 about 883k settlements are dropped because wikidata has no coordinates for them, mostly villages in China, India, Russia, Uganda and Myanmar<\/p>\n<p>\u2022 names that exist only in Arabic script (and some other scripts) are not transliterated yet, so those places are missing a usable name<\/p>\n<p>\u2022 Vietnam is undercounted<\/p>\n<p>All of it is in the LIMITATIONS doc in the repo, with numbers.<\/p>\n<p>Site: <a href=\"https:\/\/placedb.org\/\">https:\/\/placedb.org<\/a><\/p>\n<p>Repo and the full limits doc: <a href=\"https:\/\/github.com\/mindstellar\/location-data\">https:\/\/github.com\/mindstellar\/location-data<\/a><\/p>\n<p>If you spot a wrong place, a missing country division or something silly, please tell me. Happy to take PRs too.<\/p>\n<\/div>\n<p><!-- SC_ON -->   submitted by   <a href=\"https:\/\/www.reddit.com\/user\/IamTheForth\"> \/u\/IamTheForth <\/a> <br \/> <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1wwlnnx\/dataset_255_countries_4314_statesprovinces_and\/\">[link]<\/a><\/span>   <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1wwlnnx\/dataset_255_countries_4314_statesprovinces_and\/\">[comments]<\/a><\/span><\/p><div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-42790 jlk' href='javascript:void(0)' data-task='like' data-post_id='42790' data-nonce='e5fa155cd1' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.graviton.at\/letterswaplibrary\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-42790 lc'>0<\/span><\/a><\/div><\/div> <div class='status-42790 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Hi all, I needed a country \/ state \/ city list for ShopClass, our open source classifieds&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-42790","post","type-post","status-publish","format-standard","hentry","category-datatards","wpcat-85-id"],"_links":{"self":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/42790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/comments?post=42790"}],"version-history":[{"count":0,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/42790\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/media?parent=42790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/categories?post=42790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/tags?post=42790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}