# productGroups Search for product groups in the catalog ## Authentication > **Public Access**: Accessible with the public API key ## Query Structure ```graphql { productGroups( query: String parentId: Int first: Int after: String last: Int before: String sortKey: ProductGroupSortKey reverse: Boolean ) { edges { node { id name } cursor } nodes { id name } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } totalCount } } ``` ## Arguments | Argument | Type | Required | Description | |----------|------|----------|-------------| | query | String | No | Search query string to filter product groups | | parentId | Int | No | Filter by parent category ID | | first | Int | No | Returns the first n elements | | after | String | No | Returns elements after cursor for pagination | | last | Int | No | Returns the last n elements | | before | String | No | Returns elements before cursor for pagination | | sortKey | [ProductGroupSortKey](/reference/storefront/1.3.0/inputs/product-group-sort-key) | No | The key to sort product groups by | | reverse | Boolean | No | Reverse the order of the underlying list | ## Return Type [ProductGroupConnection](/reference/storefront/1.3.0/connections/product-group-connection) - A connection to a list of ProductGroup items with pagination support. ## Example ```graphql query { productGroups( query: "electronics" first: 10 sortKey: NAME ) { edges { node { id name } cursor } pageInfo { hasNextPage endCursor } totalCount } } ``` ## Related Types - [ProductGroupConnection](/reference/storefront/1.3.0/connections/product-group-connection) - [ProductGroupSortKey](/reference/storefront/1.3.0/inputs/product-group-sort-key)