Hello Shopify community,
is there a way to get a list of all variant metafields and not only the metafields of a single product variant ?
Currently i’m requesting a list of all products what happens very fast, but after that i have to loop through every product and variant to GET request each variants metafields and that takes some time.
I`m using
/admin/metafields.json?metafield[owner_id]=85675678&metafield[owner_resource]=variants
and tried leaving the owner_id blank so id get all metafields of the owner_resource variants, but that didn
t work. 
Thanks for your help!
Hi @JasonP99 ,
It’s not possible to get the complete list of all variants’ metafields via the REST API. The endpoints here are built in the way that requires a separate request to retrieve the data for each product variant. You may want to use the GraphQL API instead.
1 Like
Okay, that helped me a lot. Thanks for your answer!
How can I retrieve a metafield of each product variant using variant id?
Hi @kaye_tee ,
You can retrieve a Product Variant’s metafields with the variant ID on both the REST and GraphQL Admin API with the following endpoints and queries as described in our Shopify.dev documentation:
{> productVariant(id: "gid://shopify/ProductVariant/
I hope this helps, and I hope you have a great day 