Hello Shopify community,
hope you all are doing well! ![]()
I’m currently working on our EasyBoost app, and I’m trying to build a dynamic tag-based product filtering feature.
Here’s the goal:
The merchant can select one or more product tags (e.g. “smartphone”, “screen protector”, “charger”, “usb cable” etc.).
On the frontend, I want to dynamically load and display products that match those selected tags.
I don’t want to manually create or manage any Shopify collections for this — the app should handle it automatically.
So far, I experimented with:
{% for product in collections.all.products %}
{% if product.tags contains ‘summer’ %}
{{ product.title }}
{% endif %}
{% endfor %}
But this approach is inefficient — it loops through all products (which can be thousands), just to find a few with the right tag. It’s not scalable and may hit Liquid memory limits.
What I want to achieve
I’m looking for the best possible way to:
Fetch products by specific tag(s)
Do it dynamically from the frontend
Avoid needing to create collections manually
Keep it performant and scalable
This works great, but I’d like to confirm if this is the recommended approach for production apps.
/search/suggest.json endpoint
Example:
fetch("/search/suggest.json?q=tag:summer&type=product")
It’s public and doesn’t need an API token — but returns limited data and seems less flexible.
What’s the recommended and reliable method to dynamically load products by tag from the frontend or app side — without relying on pre-made collections?
Should I go with the Storefront API, or is there a better pattern within Shopify’s ecosystem (for embedded apps or custom storefronts)?
Any official best practices or examples would be super helpful
Thanks in advance!
– Mahfuz, EasyBoost team