Filter collection by metafield value in storefront API or Admin API

Topic summary

Main issue: Whether Shopify’s Storefront API or Admin API can filter products within a collection by a specific metafield value.

Context/terms: “Metafield” refers to custom key–value data attached to resources (e.g., products). The Storefront API serves storefront queries, while the Admin API manages store data.

Status: No solutions or confirmations are provided in the thread; the question remains open with no indicated workarounds or outcomes.

Summarized with AI on February 1. AI used: gpt-5.

Is there a way to filter a collection by a metafield value through Storefront API or Admin API?