---
title: "ListStoriesPreview returns stories from production and those that are not published yet."
url: "https://developer-qual.migros.ch/apis/content-search-api-qual-v1/versions/169d9ab2-7072-4f6f-811a-fff1e6bc0086/operations/ContentSearch_ListStoriesPreview"
---

> Full API specification: https://developer-qual.migros.ch/apis/content-search-api-qual-v1/versions/169d9ab2-7072-4f6f-811a-fff1e6bc0086.md

# ListStoriesPreview returns stories from production and those that are not published yet.

`GET` `/migros/contentsearch/v1/preview/stories`

Operation ID: `ContentSearch_ListStoriesPreview`

## Query parameters

- `contentfulAppId` (string, required) - Required. The contentful app ID to list news for, e.g. corporate.migros.ch test-corporate.migros.ch. This is needed in the backend so we can identify which news tags (e.g. Warenrückruf und Medienmitteilungen) apply; articles with those news tags are then excluded from the response.
- `language` (string, optional) - Optional. If set, only stories matching this language will be returned. By default, german stories are returned.
- `topicTagIds` (array, optional) - The service does not verify/validate that the passed tag IDs are indeed topic tags or category tags. Optional. If empty, stories matching any topic tags are returned. If at least one topic tag is given, each returned story must have at least one of these tags present in order to be returned. Tag ordering within this list does not matter. Duplicates are ignored.
- `categoryTagIds` (array, optional) - Optional. If empty, stories of any category (e.g. "Interview", "Podcast") will be returned. If at least one category tag is given, each returned story must have at least one of these tags present in order to be returned. Tag ordering within this list does not matter. Duplicates are ignored.
- `mustNotTagIds` (array, optional) - Optional. Specifies disallowed category tags (e.g., 'Interview', 'Podcast'). Tags matching any tag in this set will not be returned in the response. Tag ordering within this list does not matter. Duplicates are ignored.
- `pageSize` (string, int64, optional) - Optional. The maximum number of stories to return in the response.
- `nextPageFrom` (string, int64, optional) - Optional. A pagination token returned from a previous call to `ListStories` that indicates where this listing should continue from.
- `sortBy` (array, optional) - Optional. Multiple sort parameters to determine the order of the results. Example: ['releaseDate:desc', '_score:desc']. Valid Fields are releaseDate and _score. Each entry specifies a field and its sort direction (asc/desc).

## Responses

- `200` - A successful response.
- `default` - An unexpected error response.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: ContentSearch API QUAL
  version: v1.114.1
servers:
  - url: https://api-qual.migros.ch
paths:
  /migros/contentsearch/v1/preview/stories:
    get:
      operationId: ContentSearch_ListStoriesPreview
      parameters:
        - description: >-
            Required. The contentful app ID to list news for, e.g.
            corporate.migros.ch

            test-corporate.migros.ch.

            This is needed in the backend so we can identify which news tags
            (e.g.

            Warenrückruf und Medienmitteilungen) apply; articles with those news

            tags are then excluded from the response.
          in: query
          name: contentfulAppId
          required: true
          schema:
            type: string
        - description: >-
            Optional. If set, only stories matching this language will be
            returned. By

            default, german stories are returned.
          in: query
          name: language
          required: false
          schema:
            default: DE
            enum:
              - DE
              - FR
              - IT
              - EN
            type: string
        - description: >-
            The service does not verify/validate that the passed tag IDs are
            indeed

            topic tags or category tags.


            Optional. If empty, stories matching any topic tags are returned. If
            at

            least one topic tag is given, each returned story must have at least
            one

            of these tags present in order to be returned.

            Tag ordering within this list does not matter. Duplicates are
            ignored.
          explode: true
          in: query
          name: topicTagIds
          required: false
          schema:
            items:
              type: string
            type: array
        - description: >-
            Optional. If empty, stories of any category (e.g. "Interview",
            "Podcast")

            will be returned. If at least one category tag is given, each
            returned

            story must have at least one of these tags present in order to be
            returned.

            Tag ordering within this list does not matter. Duplicates are
            ignored.
          explode: true
          in: query
          name: categoryTagIds
          required: false
          schema:
            items:
              type: string
            type: array
        - description: Optional. Specifies disallowed category tags (e.g., 'Interview',
            'Podcast'). Tags matching any tag in this set will not be returned
            in the response. Tag ordering within this list does not matter.
            Duplicates are ignored.
          explode: true
          in: query
          name: mustNotTagIds
          required: false
          schema:
            items:
              type: string
            type: array
        - description: Optional. The maximum number of stories to return in the response.
          in: query
          name: pageSize
          required: false
          schema:
            format: int64
            type: string
        - description: >-
            Optional. A pagination token returned from a previous call to
            `ListStories`

            that indicates where this listing should continue from.
          in: query
          name: nextPageFrom
          required: false
          schema:
            format: int64
            type: string
        - description: "Optional. Multiple sort parameters to determine the order of the
            results. Example: ['releaseDate:desc', '_score:desc']. Valid Fields
            are releaseDate and _score. Each entry specifies a field and its
            sort direction (asc/desc). "
          explode: true
          in: query
          name: sortBy
          required: false
          schema:
            items:
              type: string
            type: array
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/contentsearchListStoriesResponse"
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/googlerpcStatus"
          description: An unexpected error response.
      security:
        - apiKeyAuth: []
      summary: >-
        ListStoriesPreview returns stories from production and those that are
        not

        published yet.
      tags:
        - ContentSearch
security:
  - apiKeyAuth: []
components:
  schemas:
    contentsearchListStoriesResponse:
      properties:
        stories:
          description: >-
            Optional. If new items matching the requested criteria were found,
            they're

            in here. The returned order is arbitrary.
          items:
            allOf:
              - $ref: "#/components/schemas/contentsearchStory"
            type: object
          type: array
        totalHits:
          description: |-
            Total number of stories for this request, not taking page_size into
            account.
          format: int64
          type: string
      type: object
    googlerpcStatus:
      properties:
        code:
          format: int32
          type: integer
        details:
          items:
            allOf:
              - $ref: "#/components/schemas/protobufAny"
            type: object
          type: array
        message:
          type: string
      type: object
    contentsearchStory:
      description: Story represents a story published to Migros corporate websites.
      properties:
        content:
          description: Required. The content (teaser text) of this news item.
          type: string
        id:
          description: Required. An opaque system ID.
          type: string
        images:
          description: Optional. Any images that are part of this content.
          items:
            allOf:
              - $ref: "#/components/schemas/contentsearchImage"
            type: object
          type: array
        published:
          description: Required. True if the content has been published already, false
            otherwise.
          type: boolean
        releaseTimestamp:
          description: >-
            Optional. The time the content was published. Disregard if published
            =

            false.
          format: date-time
          type: string
        slug:
          description: Required. The 'slug' or internal short ID of this news item.
          type: string
        tags:
          description: Optional. Tags for this story, regardless of semantics
            (topic/category).
          items:
            allOf:
              - $ref: "#/components/schemas/consolcontentsearchTag"
            type: object
          type: array
        title:
          description: Required. The title of this news item.
          type: string
        topic:
          description: Required. A topic tag "title" or "name".
          type: string
      type: object
    protobufAny:
      additionalProperties: {}
      properties:
        "@type":
          type: string
      type: object
    contentsearchImage:
      properties:
        altText:
          type: string
        caption:
          type: string
        credits:
          type: string
        focalPoint:
          allOf:
            - $ref: "#/components/schemas/ImagePoint"
        height:
          format: int64
          type: string
        id:
          type: string
        mimeType:
          type: string
        shortCaption:
          type: string
        url:
          type: string
        width:
          format: int64
          type: string
      type: object
    consolcontentsearchTag:
      properties:
        id:
          type: string
        title:
          type: string
      type: object
    ImagePoint:
      properties:
        x:
          format: int64
          type: string
        y:
          format: int64
          type: string
      type: object
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-Api-Key
      type: apiKey
```
