I would like a free API, possibly that comes with nice documentation and tutorial, on city data and statistics worldwide. These stats include:
I would like to use JSON or XML. Is there any API to do this?
Your US tax dollars at work: The CIA World Factbook
You can download all the data as a tab-deliminated file and either include with your app or host on your site. The data is in the public domain, but there is some copyright notice requirements. See FAQ.