Wikipedia has pages for containing a list of towns and cities with 100,000 or more inhabitants. I'd like this same data in machine readable format, with country and city names.
Geonames has a tsv with data of the cities with more than 15k inhabitants. You only need to filter the ones you are interested in. The tsv has a column with the population (the 15th one) so it should be quite easy to get them.
You can download it here
I have a compiled list of all the cities of the world which I collated from the USGS GNIS database (US) and the NGA GNS Server (other countries) into CSV file. I've made the list available FREE as a public domain dataset.
Column 1: ISO 3166-1 alpha-2 country code.
Freebase will have this data.
is an example query that looks like this:
I'm limiting it to 2 here, you can change that to get more results.
In this case I'm also pulling in longitude and latitude, just to show that you can get a lot of stuff from freebase!
The population data is annoyingly broken down by year, so this is actually getting every city that has ever had more than 100k people living there, rather than ones that do now.
I'm not sure how to deal with that.
Clicking on the link button on the top right gives you an option for an MQLRead Link - that is the endpoint you'd query normally.
This is the extend of my knowledge - hopefully it's enough to pique your interest though - Freebase looks like it could be absolutely incredible once you've got your head round how to query it.
Your own link includes a reference to the UN-stats office (population density and urbanization). The link was dead but I was able to remove the final extension and then re-find it.
I put together a quick SPARQL query to query DBpedia:
Alas, the data in DBpedia is dodgy. I've reported the issue to DBpedia.
If the data wasn't broken, you could use this SPARQL query against the DBpedia endpoint to retrieve data (modifying the limit and offset as you would to page through SQL results).
Wikidata may have this data in the near future. It'd be nice if there were also a public SPARQL endpoint...