The ePO Web API does support building custom queries. However, I've found it much easier to write and run queries directly against the database.
In fact, I just have a Powershell function that I've placed in my profile script, "Invoke-ePOQuery", that lets me run arbitrary queries against the database from Powershell.
Do you know if there is some kind of documentation to it?
Check the ePO Web API guide:
Look at the core.executeQuery command, it should do what you want. That said, I never really got it to work and was much happier running SQL queries.
A workaround in the mean time. Create two separate queries, one for each criteria. Create a new tag, create a query to reports the fields you want in your final filtering on that tag.
Run query 1, apply tag, run query 2, apply tag, run query 3 that reports on both tag. Automate this with a server task.
That worked form me.
It´s a little tricky and could be much more comfy, but I can live with that for now.