In some cases, you may need to export the Shopify Variant IDs for your products - for example, when filling out a migration document or when completing a bulk update to modify your products. This guide will highlight how to find the variant IDs for your products in Shopify.
Before you begin
- It is recommended to add the JSON View Extension if using Chrome. This will display the JSON data in Shopify in a readable format.
- If you do not feel comfortable working with JSON, you can try using an app like Product & Variant IDs from the Shopify App Store.
Using the JSON URL in Shopify to find variant IDs
Start by adding
/admin/variants in your Address Bar following your Shopify URL when logged into your Shopify Dashboard. It should look like this:
Add .json to the end of the URL following variants:
Once the URL is loaded, you should see variant data populated in JSON format on the next screen.
Modifying JSON URL for more options
You can modify it by adding
?fields=id,product-id,title to show you only the variant ID, product ID, and variant title:
You can modify it further by adding
&limit=250 to make sure the view presents all products in your catalog:
If you have more than 250 variants, you will need to append page designations such as
&page=2until all products are accounted for in the JSON view.
Copying and exporting JSON data
Once all variant information is in view, you can copy and paste the JSON data into a free online JSON to CSV converter tool such as JSON to CSV Converter. This will aggregate the data and provide a CSV file with the information organized in columns. You'll need to get the product titles separately and map them to the correct row in the CSV file using the product ID column.