Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Howdy,
What is the maximum number of characters in a metafield?
I've read previously that the limit was 65,535 characters.
Can we get some verification of this from Shopify?
Hey Zac -
Yes, that is the limit for a single metafields value. You can push a string larger than this but it will be truncated. If you need to store much more than this you might need to look at splitting it among multiple metafields.
Curious - what data are you storing that would need more than 65535 chars?
Heya Jason, got this all working in an alternative method.
But product data, funnily enough. Loading information via Shopify directly didn't give us the specific information we needed without doing multiple calls to get a complete record - and that started getting large.
We ended up throwing our cut down data into a JSON array and storing it in the theme's assets.
For massive slabs of JSON that's a far more sensible idea.
Glad to hear you've got a working model.