How to get all collection title by using an API with ajax?

Hi ,

I want to get all the collection list by using an ajax but i didn’t find any documentation about that .

Is it possible to fetch collection list via API or Graphql ?

Please help me how I achieve this .

Thanks !

You can use this query to fetch first 20 collections alongwith associated product count and description.

{
shop {
collections(first:20){
edges{
node{
description
productsCount

}
}
}

}
}

Thanks @hashiromer , That’s great ! It’s working .

I have another question how I get a special character title by using this query ?

For example - Getränke

@DSLR

Glad to know my solution helped :slightly_smiling_face: