mediawiki-apiwikimedia-commons

Mediawiki API: Query picture from Wikimedia Commons with parameter "pageid"


The query below using the file name of the picture works flawlessly: https://www.mediawiki.org/w/api.php?action=query&prop=globalusage&gulimit=20&titles=File:Ferrari%20Roma%20in%20Basel.png

If I want to use the Commons Page ID of this picture (found on the information page) there are no results though: https://www.mediawiki.org/w/api.php?action=query&prop=globalusage&gulimit=20&pageids=88733833

Does anyone know why it doesn't work with pageids as parameter?


Solution

  • You are querying www.wikimedia.org, not commons.wikimedia.org. Page IDs are not shared between wikis.