Search code examples
apiwikimedia

WikiMedia API: How to GET a List of Articles by Category and Location?


Assuming I would like to get a list of 5 articles that are belonging to the "Cathedrals in Paris" category AND are nearby my location (Lat=48.8,Lon=2.3).

Is there a way to achieve both at the same GET?

If not, what is considered the best practice for achieving this goal? I know I can use the geosearch (or the categorymembers) generator, but then what? loop through each article?

Thanks.


Solution

  • I checked at https://www.mediawiki.org/ and well, the simple answer is no. The best option is to search by location OR by category (preferably the option that returns LESS results), and then loop through each article.