Wikimedia Commons - Safe search?

416 Views Asked by At

We're currently displaying images from Wikimedia Commons (among other APIs) for various searchterms. However, we sometimes run into the "problem" that not all images are 100% appropriate for the setting (e.g. half-naked women), even for harmless searchterms like "Griechenland" (Greece in german).

Is there any flag for such images so that we can ignore them? This is the query we currently use:

http://de.wikipedia.org/w/api.php?action=query&format=xml&prop=imageinfo&generator=search&gsrnamespace=6&iiprop=url|size&gsrsearch=<searchterm>
1

There are 1 best solutions below

0
On

There is no such a flag. It was discussed but never implemented. However, you could check which category the image is in on Wikimedia Commons and hide it in case it is categorized with one or more categories that are themselves in blacklisted categories; which can, for example, be achieved utilizing -incategory: (c.f. How to perform category intersections?).

This is, however not a failsafe method and note that this would require some XHRs for traversing up the category tree unless you have direct database access or access to database dumps.

OTOH, there are other ways, even paid services.