NC 19: How to download all files with a certain tag?

I’m running NextCloud 19.0.1 and I added a certain tag to some images (a few hundred). In the left side bar I can select “favorites” and display all images with that tag. Now I want to download all these images efficiently but unfortunately I did not find a way to do that. Is that possible?

As a matter of last resort I’d be willing to use the WebDAV API (I know a bit about coding) but some pointers to the relevant querying+download API would be nice.