How can I get a list of collections from a store?

Highlighted
New Member
1 0 0

Hi I was wondering if you can tell me if there is an API call to get a list of collections from a store?  

I checked the documentation at the link below, but these call require a collection_id.

https://shopify.dev/docs/admin-api/rest/reference/products/collection#show-2020-10

0 Likes
Highlighted
Shopify Partner
648 46 130

If it doesn't appear to be doable via the REST API then you can always give a crack at the GraphQL API. This example pulls the first 10 collections belonging to the Shopify shop, displaying the internal ID, the title, the description, the handle, and the number of products in the collection.

Hope this helps!

{
  collections(first: 10) {
    edges {
      node {
        id
        title
        description
        handle
        productsCount
      }
    }
  }
}

 

1 Like