I want to get pages from Wikimedia Commons and it seems, that I have still not understand the usage of the Wikimedia API.
I use the following query
https://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&format=json&iiprop=url|size|mime|mediatype|extmetadata&iiurlwidth=150&generator=search&gsrsearch=transformation&gsrnamespace=6&gsrlimit=9&gsroffset=0&gsrinfo=totalhits
See in API Sandbox
Which works great, except that I don't get the grsinfo / generator metadata. But I need the total amount of results (totalhits).
Any suggestions?