Wikipedia API for geolocations
UPDATED ANSWER:
Wikilocation has been retired and now there is an OFFICIAL WIKIPEDIA API
? action=query
& list=geosearch
& gsradius=<radius-in-meters>
& gscoord=<lat>|<lon>
HTML example | JSON Example
Don't reinvent the wheel, use DBpedia.
Sample page with "lat" and "lon" data extracted.
And it can be queried with SPARQL.