---
title: categories Query
seo:
  title: categories Query
  description: 'Query: categories Query'
slug: api-reference/products/queries/categories
sidebar:
  label: categories
search:
  tags:
    - API reference
    - Products
lastModified: '2026-04-13'
---

List of the shop's categories.



```graphql
categories(filter: CategoryFilterInput, where: CategoryWhereInput, sortBy: CategorySortingInput, level: Int, before: String, after: String, first: Int, last: Int): CategoryCountableConnection
```

## Returns

[`CategoryCountableConnection`](/api-reference/products/objects/category-countable-connection)

<details>
<summary>Show return type</summary>


```graphql
type CategoryCountableConnection {
  pageInfo: PageInfo!
  edges: [CategoryCountableEdge!]!
  totalCount: Int
}
```


</details>

## Arguments

### filter [#filter]

**`filter`** · [`CategoryFilterInput`](/api-reference/products/inputs/category-filter-input)

Filtering options for categories.

### where [#where]

**`where`** · [`CategoryWhereInput`](/api-reference/products/inputs/category-where-input)

Where filtering options for categories.

### sortBy [#sort-by]

**`sortBy`** · [`CategorySortingInput`](/api-reference/products/inputs/category-sorting-input)

Sort categories.

### level [#level]

**`level`** · [`Int`](/api-reference/miscellaneous/scalars/int)

Filter categories by the nesting level in the category tree.

### before [#before]

**`before`** · [`String`](/api-reference/miscellaneous/scalars/string)

Return the elements in the list that come before the specified cursor.

### after [#after]

**`after`** · [`String`](/api-reference/miscellaneous/scalars/string)

Return the elements in the list that come after the specified cursor.

### first [#first]

**`first`** · [`Int`](/api-reference/miscellaneous/scalars/int)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

### last [#last]

**`last`** · [`Int`](/api-reference/miscellaneous/scalars/int)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

---

Schema: **Saleor 3.23.43**. [Download SDL](/schema/saleor.graphql).
