Limits on Shopify metafields
I was wondering what the limits were on the number of metafields that an entity in Shopify could have. For instance, under a given namespace for a product object, could you have 1000 unique key value pairs? Is there a hard limit?
Please note I have consulted the documentation on Shopify's Metafield API page (http://api.shopify.com/metafield.html (http://api.shopify.com/metafield.html)) but it only states the following limits:
The namespace has a maximum of 20 characters, and the key has a maximum of 30 characters.
Thanks for help!
There's no hard limit, but if you're storing that much info you might want to consider doing it locally as retrieving it will become a pain.
The most metafields that we've applied to any given element to date is 5434. We have a collection that currently contains that many metafields, and it seems to be working fine!
I wouldn't advise doing this, as it's a nightmare to find and remove any via Postman if manual intervention is required. But it's certainly possible!
If you had the following MyNS.Key1 = 1 MyNS.Key2 = 2 ... MyNS.Key1000 = 1000
You should be able to access it like products.metafields.MyNS[someKey]
So not too difficult to retrieve, or am i missing something else
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.