> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/products/llms.txt)
> Source: https://docs.saleor.io/api-reference/products/queries/category

# category Query

Look up a category by ID or slug.

```graphql
category(
  id: ID
  slug: String
  slugLanguageCode: LanguageCodeEnum
): Category
```

Details

```graphql
type Category implements Node, ObjectWithMetadata {
  id: ID!
  privateMetadata: [MetadataItem!]!
  privateMetafield(
    key: String!
  ): String
  privateMetafields(
    keys: [String!]
  ): Metadata
  metadata: [MetadataItem!]!
  metafield(
    key: String!
  ): String
  metafields(
    keys: [String!]
  ): Metadata
  seoTitle: String
  seoDescription: String
  name: String!
  description: JSONString
  slug: String!
  parent: Category
  level: Int!
  descriptionJson: JSONString @deprecated
  updatedAt: DateTime!
  ancestors(
    before: String
    after: String
    first: Int
    last: Int
  ): CategoryCountableConnection
  products(
    filter: ProductFilterInput
    where: ProductWhereInput
    sortBy: ProductOrder
    search: String
    channel: String
    before: String
    after: String
    first: Int
    last: Int
  ): ProductCountableConnection
  children(
    before: String
    after: String
    first: Int
    last: Int
  ): CategoryCountableConnection
  backgroundImage(
    size: Int
    format: ThumbnailFormatEnum = ORIGINAL
  ): Image
  translation(
    languageCode: LanguageCodeEnum!
  ): CategoryTranslation
}
```

<a id="arguments"></a>

### Arguments

<a id="id"></a>

#### [`id`](#id) ● [`ID`](/api-reference/miscellaneous/scalars/id.md)

ID of the category.

<a id="slug"></a>

#### [`slug`](#slug) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Slug of the category

<a id="slug-language-code"></a>

#### [`slugLanguageCode`](#slug-language-code) ● [`LanguageCodeEnum`](/api-reference/miscellaneous/enums/language-code-enum.md)

Language code of the category slug, omit to use primary slug.

Added in Saleor 3.21

<a id="type"></a>

### Type

<a id="category"></a>

#### [`Category`](/api-reference/products/objects/category.md)

Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront.
