Get all metafields for products

Topic summary

Main issue: Developers need a way to fetch all product metafields in bulk. The REST API only supports per-product metafield retrieval (/admin/products/{id}/metafields.json); attempts to filter via /admin/metafields.json?metafield[owner_resource]=product return empty or are discouraged.

Impact: Per-product calls are slow and hit rate limits (2 req/s), making large catalogs (e.g., 100k products) take many hours. Caching helps, but isn’t reliable when stores change frequently; using product updated_at can reduce unnecessary metafield fetches.

Requests: Add a bulk endpoint (e.g., /admin/products/metafields.json), allow filtering by owner_resource/namespace, or accept an ids list to return metafields for specified products. Some also want products.json to include metafields.

Updates/Workarounds: Shopify staff acknowledged interest but provided no REST solution or timeline. Later, the GraphQL Admin API was cited as a workaround: fetch products and their metafields together using admin_graphql_api_id; example cost suggests ~10 products/second. However, GraphQL has query cost limits, lacks straightforward ID filtering, and may still be inefficient for many metafields per product.

Extras: A community script was shared to export all product metafields to JSONL. Status: Unresolved for REST bulk access; discussion remains open with continued requests and mixed opinions.

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

I think you’re better off getting a product, and asking for all it’s metafields. Asking for metafields that have an owner is kind of chaotic. I think that only works if you also provide an ID.