FROM CACHE - en_header

Get all metafields for products

ReloadSEO
Shopify Partner
48 0 14

This has been posted before, but the Shopify support hasn't answered it yet... And it is a good and reasonable question. 

 

I want to get all the metafields for all the products.

My understanding is that there is no API like:

/admin/products/metafields.json

The only one is like this:

/admin/products/#productid#/metafields.json

Therefore, the only way is to get all the metafields for all the products is to make one API call per product!

It is also impossible to cache the data, because it takes one API call per product just to check if the metafields for that product have been updated!  For large stores, it is handicapping API applications and forcing one call per product, resulting in extremely time-consuming fetches for tiny amounts of data.

Can you please add an API call that works like this?  /admin/products/metafields.json

It would return all the metafields for all the products, 250 at a time.  We can then page through in a reasonable amount of time.

Or, does anyone know some other workaround to get all the product metafields at once?

Replies 63 (63)
SigProdGroup
Tourist
11 1 3

+1.

Lazy developers trying to push Shopify to bend to their system? This is demeaning, and oblivious to the state of the global economy.

 

Shopify currently lives in the ecomm sector, a whopping 8% of the retail market. Shopify wants to be the platform we use to drive a movement of the remaining 92% of the market, that is big business retail, from brick and mortar to ecommerce. Wal-Mart, Target, etc. these are the kings, not Shopify. To capture that business, Shopify must accommodate big business ERP databases and the breadth of complexity that retail chains demand. That means keeping item data in sync as much as keeping orders in sync. This metafield API issue is one pain point that Shopify has simply failed to accommodate so far.

 

The industry is moving this way. If you view us as pushing Shopify around, that's because we are. If Shopify doesn't oblige, they will simply not be relevant in this small piece of the market. Massive API pulls against metadata fields is not abuse. It's use in this case. And I expect we'll see similar "abuse" against other endpoints before the push is over. It's up to Shopify to figure out how to manage that without folding to performance issues.

 

I hope to see Shopify manage this quickly so that I can rely on Shopify as more business moves onto this platform.

sipsynthemesc
Shopify Partner
7 0 1

Just here to credit SigProdGroup. 

Shopify is the wordpress of e-commerce and has been that since Tobi left as CTO. I only ever find myself stumbling across these posts when trying to get more from the platform. Quite frankly, Shopify nowadays is a f*cking mess, constantly publishing unfinished features to the system or as we bare witnessed with "Shopify Mail" an overhyped pile of trash. Fear not my fellow engineers for the blue haired genderless support team is on your side who have zero f*cking clue.

Anyway, if any of you stumble across this thread and read this post, take a look at Centra which is what I believe to be the future of e-commerce. It flaunts a real headless e-commerce solution, none of this bitchery you get from the Shopify cretins. 

shul
Tourist
6 0 2

And its 2021 and the "research" continues.. Such a strait forward  feature..

ScreenStaring
Shopify Partner
56 2 10

While still time-consuming here is a script to download the metafields of all products in a store to a JSONL file: https://gist.github.com/sshaw/dea140dd7a6afc1a4de77e7158605ee7. It requires 2 supplementary programs. See the script for more information. 

ScreenStaring
Software Development & Consulting