NEWSLayers closes first external funding round led by LOI VentureRead more
← Back to Changelog

Dev: Enhanced Attribute Selection & Filtering on API

Attribute selection and filtering for the Layers Storefront API

You can now pass an attributes array to scope search and browse responses to exactly the fields you need.

Field paths support dot-notation, array slicing, and sub-field selection:

"attributes": [
  "title",
  "handle",
  "images[:2].src",
  "variants[:1].sku",
  "metafields.fabric_type"
]

images[:2].src returns the first two images with only the src field. variants[:1].sku returns the first variant's SKU. Any indexed field, including metafields, variant metafields, and computed attributes, is eligible.

You can also filter results by any indexed attribute at request time, without pre-configuring a facet in the dashboard. Works across search, browse, and visual discovery endpoints.

Learn more

ImprovementPlatformDevelopersStorefront API