digiKam - Bash Script

I want to ask a question, maybe someone can help.

When I want to do something with a picture, I start filtering the database. I end up with a thumbnails screen showing just few pictures. I need to do exactly that but, instead of using digiKam’s searching capabilities, I need filtering the database using a script. Maybe a Bash script. I don’t have the knowledge to modify digiKam’s code.

Is possible to use a script to do the filtering?

Thank you.

What is the result of the filtering? To shoe thumbnails in digiKam?

If you just need to return a list of images, you can query the database directly.

Yes, to show thumbnails in digiKam

A little more information just in case there is someone doing this in a very different way.
I want to use XMP Darwin Core tags. As far as I know, there is no way to write Darwin Core tags using digiKam, but that is not the problem. I can use ExifTools to write them and it works very well. Once I have the tags in NEF files, I can see the tags names and its content using digiKam. What I can’t do is a search using those tags. That’s why I thought about using a script.
So, does anyone know a way of searching using tags not considered in digiKam’s Tools → Advanced Search?