A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

Wikimedia API’s geosearch doesn’t return coordinates?

Ivoras

I’m trying to get coordinates of interesting places around me, and I’ve found the API and parameters to do it:

https://en.wikipedia.org/w/api.php?ggsradius=1000&exlimit=2&generator=geosearch&pithumbsize=1000&ggslimit=50&action=query&ggscoord=45.8114707%7C15.977402&inprop=url&prop=coordinates%7Cpageimages%7Cdescription%7Cinfo%7Cextracts&exintro=True

For example, pageid 4634220.

However, many of the places do not have the coordinates field returned - which is strange since they are found by the query, so the coordinates are known.

Any clues why the coordinates are not returned?

Tgr

Generators don’t typically return extra data. prop=coordinates would, but you have to set its limit separately.