Filter collection by metafield value in storefront API or Admin API

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