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 cache the retrieved data once it’s received so the call doesn’t go out often. However should the shop owner wish to resync their product data manually then it’s a 10 minute wait while everything is re-cached.

For now to get around this long wait time I’m just storing all custom meta data on my end and skipping Shopify’s metafields.

I can see HunkyBill’s point that should the feature be introduced it could have a negative impact on Shopify as people might cram all their misc data into metafields.