Getting the totalhits value when using geosearch on Wikimedia Commons API

15 Views Asked by At

I am making geosearch calls to the Wikimedia Commons API to fetch images around a specific lat lon point. A typical call is https://commons.wikimedia.org/w/api.php?action=query&generator=geosearch&ggsprimary=all&ggsnamespace=6&ggsradius=1000&ggscoord=51.18428339|-3.44434152&ggslimit=25&prop=imageinfo&iilimit=1&iiprop=timestamp|user|userid|comment|canonicaltitle|url|size|dimensions|extmetadata&iiurlheight=300&format=json

I am limiting the returned results to 25 but would like to know how many total results fall within that radius.

With other generators it appears to be possible to have a 'totalhits' parameter returned but I cannot find anything in the documentation https://www.mediawiki.org/wiki/API:Geosearch

0

There are 0 best solutions below