Filter by tag using Assets API

Hi, I want to get a lot of pictures from Media Library, and I’m thinking about to use Assets API instead of add every photo to a group field (which is a very tedious task, I hope yo add the Gallery field soon).

Every photo has a tag to split them into categories, so I want to retrieve any picture with a tag, in a category page.

Great idea, but I see there is no way to filter by tag field with this API, and for example, you can filter by “title“, a field that I think it doesn’t even exist, maybe something from the old media item model or so.

So my question is: is there any way to filter by tag but it’s not in the documentation yet? Do you think there is a better solution than using this API?

Thank you!

Hey @cerrutti,

Thanks for raising this! The tags are strictly for organising inside the Media Library, and unfortunately aren't being reflected in the API. We have a feature request for this, I'll be adding your post to it to make sure the team knows there's still a user need for this.

Unfortunately I think there's not quite anything that'll replace this feature for your use case, though you could try utilizing the media title if you're not using it otherwise. I believe this is the field it's referring to:

Sorry I couldn't do more to help!

1 Like