Shopify collections and products have IDs that never change. Things like url, title, and description can change – but the ID is a sure way to reference the product/collection as long as it exists.
We’ll show you 2 ways to find these IDs. One way is easy and quick, the other is more advanced but can help you find other useful information if you ever need to.
Option #1: Look At The Backend URL
- Log In to your Shopify Admin and navigate to the All Products (for collection IDs navigate to Collections)
- Pick a product (or collection) for which you want to find the ID of.
- Look at the URL, it should look something like this https://your-store.myshopify.com/products/XXX
- The number where the “XXX” is will be the ID of the product or collection you are viewing.
Option #2: See The Raw Data
This is semi-advanced but will give you some cool insights about your products, collections, and basically any other type of post/object in Shopify.
We will be looking at the raw data that is associated with your product or collection.
For this example, we highly recommended downloading JSONView for chrome. This add on will allow you to see the raw data in an easy to read format.
- Navigate to a product or collection you would like to see raw data for.
- In the URL, enter “.json” right after the end, it will look something like this: https://your-domain.myshopify.com/admin/products/1419669831753.json
- If you have the JSONView add-on installed, you’ll see something like this:
The json file will show you a bunch of data points, including:
- “product -> id” = The Product ID!
- “product -> created_at” = Date when the product was created
- “product -> tags” = A list of all tags for that product/collection
That’s it! Two ways to find IDs for products and collections. Browse more Shopify Tips & Tricks here