Using the image_colour facet

73 views
Skip to first unread message

Robert Schurig

unread,
Nov 30, 2022, 9:16:05 AM11/30/22
to Europeana API forum

Hello, I am a beginner in programming. I want to use the search API for an art discovery app. I tried out this API call:

https://api.europeana.eu/record/v2/search.json?media=true&profile=minimal&query=Painting&qf=Art&reusability=open&rows=12&start=1&image_colour=true&wskey=[

I wonder if the image_colour facet is applied correctly because the results do not seem to change if I add or remove it. If it is not applied correctly how is it done otherwise? Thanks for your help.

Best,

Robert Schurig

Jolan Wuyts

unread,
Dec 1, 2022, 5:07:44 AM12/1/22
to Europeana API forum
Hi Robert!

Thanks for your message. You're on the right track, but the formatting of your query needs a little correction. Since Image_colour is a query facet, it should be used inside of a query facet (qf) parameter. Checking the facets for your query, from the 64019 objects, 61240 have image_colour set to true: https://api.europeana.eu/record/v2/search.json?media=true&profile=facets&query=Painting&qf=Art&reusability=open&facet=IMAGE_COLOUR&wskey=APIKEYHERE&rows=0
To only return those 61240 objects, you need to use the parameter qf=IMAGE_COLOUR:"TRUE" (the exact phrasing here is important: query facets are in all caps, and TRUE needs to be all caps and in between parentheses). So the final query would be https://api.europeana.eu/record/v2/search.json?media=true&profile=minimal&query=Painting&qf=Art&reusability=open&qf=IMAGE_COLOUR:%22TRUE%22&wskey=APIKEYHERE

It seems like you're looking for art paintings in your query. I'd like to propose to use the theme filter for Art, which can drastically improve the quality of items you get returned by the API: https://api.europeana.eu/record/v2/search.json?media=true&profile=minimal&query=Painting&theme=art&reusability=open&qf=IMAGE_COLOUR:%22TRUE%22&wskey=APIKEYHERE

Hope this helps!

best

Jolan

Robert Schurig

unread,
Dec 2, 2022, 3:29:42 AM12/2/22
to Europeana API forum
Hi Jolan,

Thanks for your answer. That helped. It only appears to me that some of the results are not really in colour despite the included facet. Does that have something to do with the facet?

Best, 

Robert

Jolan Wuyts

unread,
Dec 2, 2022, 8:58:36 AM12/2/22
to Europeana API forum
Hi again Robert,

the facet is working as intended, but the issue you're experiencing is most likely a result of an imperfect implementation of the colour detection system. During ingestion of the objects into Europeana, the imagemagick library detects colour in images and extracts colour information as well as labelling an image as being in colour or being in grayscale. We've identified some issues with this process over the past year, but I'm afraid I can't give you a current timeline for the resolution of those issues. 

Best

Jolan

Robert Schurig

unread,
Dec 5, 2022, 4:58:04 AM12/5/22
to Europeana API forum
Hi Jolan, Thank you for this explanation. I will see how to deal with this issue.

Best!

Robert Schurig

Reply all
Reply to author
Forward
0 new messages