I am using API below
If you browse through some pages you will notice pdf files.
I tried using filetype:bitmap parameter but in case of these API calls the order of images is not the same
Without bitmap parameter - https://commons.wikimedia.org/w/api.php?action=query&generator=search&gsrnamespace=0%7C6&gsrsearch=chase+%26+status&gsrlimit=10&prop=imageinfo&format=xml&gsroffset=0
With bitmap parameter - https://commons.wikimedia.org/w/api.php?action=query&generator=search&gsrnamespace=0%7C6&gsrsearch=chase+%26+status+filetype:bitmap&gsrlimit=10&prop=imageinfo&format=xml&gsroffset=0
As you can see in both API calls order of results is not same.
I want to fetch only png and jpg files from API and also maintain the order of relevance. If not in this API kindly let me know if there is similar API.
Thanks in advance