> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webless.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get suggestions

> Returns follow-up suggestions related to the current query and recent session context.

<Note>
  Pass `previous_suggestions` when you want to avoid repeating prompts already
  shown to the user.
</Note>


## OpenAPI

````yaml api-reference/openapi-latest.json POST /api/v1/suggestions
openapi: 3.1.0
info:
  title: Webless API
  description: >-
    Reference for the latest Webless API surface. New integrations should use
    the /api/v1 endpoints.
  version: v1
servers:
  - url: https://api.webless.ai
    description: Production Search API
security: []
paths:
  /api/v1/suggestions:
    post:
      tags:
        - Search API
      summary: Get suggestions
      description: >-
        Returns follow-up suggestions related to the current query and recent
        session context.
      operationId: getSuggestionsV1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1SuggestionsRequest'
            examples:
              default:
                value:
                  query: What does Webless do?
                  company: YOUR_COMPANY
                  requestId: 1f7c5f74-7b9e-4a0a-9b7d-4e3e2a5e3b60
                  sessionId: a1c2d3e4-1111-2222-3333-444455556666
                  'n': 3
                  previous_suggestions:
                    - How does Webless work?
                  version: published
      responses:
        '200':
          description: Suggested follow-up prompts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSuggestionsResponse'
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
components:
  schemas:
    V1SuggestionsRequest:
      type: object
      required:
        - sessionId
      properties:
        sessionId:
          type: string
          example: a1c2d3e4-1111-2222-3333-444455556666
        company:
          type: string
          default: sigma
          example: YOUR_COMPANY
        version:
          $ref: '#/components/schemas/V1RuntimeVersion'
        'n':
          type: integer
          default: 5
          description: Number of suggestions to generate.
          example: 3
        previous_suggestions:
          type: array
          items:
            type: string
          nullable: true
          example:
            - How does Webless work?
        query:
          type: string
          nullable: true
          description: Current query context.
          example: What does Webless do?
        requestId:
          type: string
          example: 1f7c5f74-7b9e-4a0a-9b7d-4e3e2a5e3b60
        is_private_session:
          type: boolean
          default: false
    GetSuggestionsResponse:
      type: object
      properties:
        suggestions:
          type: array
          items:
            type: string
    ValidationErrorResponse:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            additionalProperties: true
    V1RuntimeVersion:
      type: string
      enum:
        - published
        - unpublished
      default: published
      description: >-
        Runtime package pointer. Omit this field or use `published` for
        production traffic. Use `unpublished` only when testing an unpublished
        runtime package.

````