---
title: "Returns a paged list of content categories and provides search functionality."
url: "https://developer.migros.ch/apis/content-categories-8/versions/e6c77d0d-643c-404c-9120-ba8e77ac25d6/operations/get-content-categories"
---

> Full API specification: https://developer.migros.ch/apis/content-categories-8/versions/e6c77d0d-643c-404c-9120-ba8e77ac25d6.md

# Returns a paged list of content categories and provides search functionality.

`GET` `/migros/products/v8/content-categories`

Operation ID: `get-content-categories`

Returns a paged list of content categories and provides search functionality.

## Query parameters

- `search` (string, optional) - Simple search string which is fault-tolerant for user-entered text.
- `limit` (integer, optional) - Maximum number of results (max 2000).
- `offset` (integer, optional) - Result set offset.
- `sort` (string, optional) - The sorting criteria.
- `order` (string, optional) - The ordering direction.
- `ids` (string, optional) - A comma separated list or an array of ids defining the instances and the order in which they should be returned. If the ids parameter is provided all other filtering parameters are ignored.
- `path` (string, optional) - Show content categories whose paths begin with the given path, for example '/organisationseinheit/genossenschaft'.
- `lang` (string, optional) - Defines the language (de/fr/it/en) for this request as query parameter. Either use the query param "lang" or header "Accept-Language", not both.

## Header parameters

- `Accept-Language` (string, optional) - Defines the language (de/fr/it/en) for this request as request header. Either use the query param "lang" or header "Accept-Language", not both.

## Responses

- `200` - Returned when successful
- `400` - If the request parameters are invalid.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Content Categories
  version: "8"
servers:
  - description: Public Kong Gateway URL
    url: https://api.migros.ch
paths:
  /migros/products/v8/content-categories:
    get:
      description: Returns a paged list of content categories and provides search
        functionality.
      operationId: get-content-categories
      parameters:
        - $ref: "#/components/parameters/search"
        - $ref: "#/components/parameters/limit"
        - $ref: "#/components/parameters/offset"
        - description: The sorting criteria.
          in: query
          name: sort
          schema:
            default: score
            enum:
              - score
              - id
              - name
            type: string
        - $ref: "#/components/parameters/order"
        - description: A comma separated list or an array of ids defining the instances
            and the order in which they should be returned. If the ids parameter
            is provided all other filtering parameters are ignored.
          in: query
          name: ids
          schema:
            type: string
        - description: Show content categories whose paths begin with the given path, for
            example '/organisationseinheit/genossenschaft'.
          in: query
          name: path
          schema:
            type: string
        - $ref: "#/components/parameters/lang"
        - $ref: "#/components/parameters/Accept-Language"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContentCategoryCollection"
          description: Returned when successful
        "400":
          $ref: "#/components/responses/400"
      summary: Returns a paged list of content categories and provides search
        functionality.
      tags:
        - Content Categories
security:
  - Kong-Api-Key: []
    basicAuth: []
components:
  parameters:
    search:
      description: Simple search string which is fault-tolerant for user-entered text.
      in: query
      name: search
      required: false
      schema:
        type: string
    limit:
      description: Maximum number of results (max 2000).
      in: query
      name: limit
      required: false
      schema:
        default: 10
        maximum: 2000
        minimum: 0
        type: integer
    offset:
      description: Result set offset.
      in: query
      name: offset
      required: false
      schema:
        default: 0
        minimum: 0
        type: integer
    order:
      description: The ordering direction.
      in: query
      name: order
      schema:
        default: asc
        enum:
          - asc
          - desc
        type: string
    lang:
      description: Defines the language (de/fr/it/en) for this request as query
        parameter. Either use the query param "lang" or header
        "Accept-Language", not both.
      in: query
      name: lang
      schema:
        default: de
        enum:
          - de
          - fr
          - it
          - en
        type: string
    Accept-Language:
      description: Defines the language (de/fr/it/en) for this request as request
        header. Either use the query param "lang" or header "Accept-Language",
        not both.
      in: header
      name: Accept-Language
      schema:
        default: de
        enum:
          - de
          - fr
          - it
          - en
        type: string
  schemas:
    ContentCategoryCollection:
      allOf:
        - $ref: "#/components/schemas/AbstractSearchResultCollection"
        - properties:
            content_categories:
              items:
                $ref: "#/components/schemas/ContentCategory"
              type: array
          type: object
      description: A collection of content category instances.
      type: object
    AbstractSearchResultCollection:
      allOf:
        - $ref: "#/components/schemas/AbstractCollection"
        - properties:
            ids:
              description: >-
                Ids only.


                Is filled instead of the usual property for content, with only
                the ids when a call is made with verbosity=id on a

                route that supports it.
              items:
                type: string
              type: array
            total_hits:
              description: >-
                The total hits may exceed the actual count of results in the
                collection.


                It represents the total number of results of a search and not
                only the

                potentially paginated subset.
              nullable: true
              type: integer
          type: object
      description: A collection of search result instances.
      type: object
    ContentCategory:
      description: Represents a content category from Magnolia.
      properties:
        display_name:
          nullable: true
          type: string
        id:
          type: string
        name:
          type: string
        parent_id:
          type: string
        path:
          type: string
      required:
        - id
        - name
      type: object
    AbstractCollection:
      description: A generic collection of elements.
  responses:
    "400":
      description: If the request parameters are invalid.
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
    basicAuth:
      scheme: basic
      type: http
```
