Amazon Kendra Query Suggestions API

Operations for query autocompletion

Operations 2

POST /indexes/{IndexId}/query-suggestions Amazon Kendra Get Query Suggestions #
POST /#GetQuerySuggestions Get Query Suggestions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-kendra:amazon-kendra-query-suggestions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-kendra-query-suggestions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Kendra Query Suggestions API
  version: '2019-02-03'
  x-refined-note:
  - x-logo differs across the merged source definitions and was not carried
  description: 'Operations tagged Query Suggestions across 2 of this provider''s published API definitions: amazon-kendra-openapi.yml, amazon-kendra-query-suggestions-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://kendra.{region}.amazonaws.com
  description: Amazon Kendra regional endpoint
  variables:
    region:
      default: us-east-1
      description: AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-2
      - eu-west-1
      - ap-southeast-1
      - ap-southeast-2
      - ap-northeast-1
security:
- sigv4: []
tags:
- name: Query Suggestions
  description: Operations for query autocompletion
paths:
  /indexes/{IndexId}/query-suggestions:
    post:
      operationId: GetQuerySuggestions
      summary: Amazon Kendra Get Query Suggestions
      description: Fetches the queries that are suggested to your users based on their query history.
      tags:
      - Query Suggestions
      parameters:
      - name: IndexId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the index.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - QueryText
              properties:
                QueryText:
                  type: string
                  description: The text of a user's query to generate query suggestions.
                  example: example-value
                MaxSuggestionsCount:
                  type: integer
                  description: The maximum number of query suggestions returned.
      responses:
        '200':
          description: Success
        '400':
          description: Bad request - invalid input parameters
        '403':
          description: Access denied - insufficient permissions
        '500':
          description: Internal server error
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: https://kendra.{region}.amazonaws.com
      description: Amazon Kendra regional endpoint
      variables:
        region:
          default: us-east-1
          description: AWS region
          enum:
          - us-east-1
          - us-east-2
          - us-west-2
          - eu-west-1
          - ap-southeast-1
          - ap-southeast-2
          - ap-northeast-1
  /#GetQuerySuggestions:
    post:
      operationId: post#GetQuerySuggestions
      summary: Get Query Suggestions
      description: Fetches the queries that are suggested to your users. GetQuerySuggestions is currently not supported in the Amazon Web Services GovCloud (US-West) region.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetQuerySuggestionsResponse'
        '403':
          description: AccessDeniedException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ServiceQuotaExceededException'
        '429':
          description: ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSKendraFrontendService.GetQuerySuggestions
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetQuerySuggestionsRequest'
      tags:
      - Query Suggestions
      x-operation-id-source: normalized
      x-operation-id-original: GetQuerySuggestions
    servers:
    - url: https://kendra.{region}.amazonaws.com
      variables:
        region:
          default: us-east-1
components:
  schemas:
    DocumentAttribute:
      type: object
      properties:
        Key:
          type: string
          description: The identifier for the attribute.
        Value:
          $ref: '#/components/schemas/DocumentAttributeValue'
      required:
      - Key
      - Value
    SuggestionTextWithHighlights:
      type: object
      properties:
        Text:
          type: string
          description: The query suggestion text to display to the user.
        Highlights:
          type: array
          items:
            $ref: '#/components/schemas/SuggestionHighlight'
          description: The beginning and end of the query suggestion text that should be highlighted.
    AttributeFilter:
      type: object
      properties:
        AndAllFilters:
          type: array
          items:
            $ref: '#/components/schemas/AttributeFilter'
          description: Performs a logical AND operation on all filters that you specify.
        OrAllFilters:
          type: array
          items:
            $ref: '#/components/schemas/AttributeFilter'
          description: Performs a logical OR operation on all filters that you specify.
        NotFilter:
          $ref: '#/components/schemas/AttributeFilter'
        EqualsTo:
          $ref: '#/components/schemas/DocumentAttribute'
        ContainsAll:
          $ref: '#/components/schemas/DocumentAttribute'
        ContainsAny:
          $ref: '#/components/schemas/DocumentAttribute'
        GreaterThan:
          $ref: '#/components/schemas/DocumentAttribute'
        GreaterThanOrEquals:
          $ref: '#/components/schemas/DocumentAttribute'
        LessThan:
          $ref: '#/components/schemas/DocumentAttribute'
        LessThanOrEquals:
          $ref: '#/components/schemas/DocumentAttribute'
    Suggestion:
      type: object
      properties:
        Id:
          type: string
          description: The UUID (universally unique identifier) of a single query suggestion.
        Value:
          $ref: '#/components/schemas/SuggestionValue'
        SourceDocuments:
          type: array
          items:
            $ref: '#/components/schemas/SourceDocument'
          description: The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.
    AttributeSuggestionsGetConfig:
      type: object
      properties:
        SuggestionAttributes:
          type: array
          items:
            type: string
          description: The list of document field/attribute keys or field names to use for query suggestions. If the content within any of the fields match what your user starts typing as their query, then the field content is returned as a query suggestion.
        AdditionalResponseAttributes:
          type: array
          items:
            type: string
          description: The list of additional document field/attribute keys or field names to include in the response. You can use additional fields to provide extra information in the response. Additional fields are not used to based suggestions on.
        AttributeFilter:
          $ref: '#/components/schemas/AttributeFilter'
        UserContext:
          $ref: '#/components/schemas/UserContext'
    InternalServerException:
      type: object
      properties:
        Message:
          type: string
    SuggestionValue:
      type: object
      properties:
        Text:
          $ref: '#/components/schemas/SuggestionTextWithHighlights'
    GetQuerySuggestionsRequest:
      type: object
      properties:
        IndexId:
          type: string
          description: The identifier of the index you want to get query suggestions from.
        QueryText:
          type: string
          description: The text of a user's query to generate query suggestions. A query is suggested if the query prefix matches what a user starts to type as their query. Amazon Kendra does not show any suggestions if a user types fewer than two characters or more than 60 characters. A query must also have at least one search result and contain at least one word of more than four characters.
        MaxSuggestionsCount:
          type: integer
          description: The maximum number of query suggestions you want to show to your users.
        SuggestionTypes:
          type: array
          items:
            type: string
            enum:
            - QUERY
            - DOCUMENT_ATTRIBUTES
          description: The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other. If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history. If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.
        AttributeSuggestionsConfig:
          $ref: '#/components/schemas/AttributeSuggestionsGetConfig'
      required:
      - IndexId
      - QueryText
    ValidationException:
      type: object
      properties:
        Message:
          type: string
    SourceDocument:
      type: object
      properties:
        DocumentId:
          type: string
          description: The identifier of the document used for a query suggestion.
        SuggestionAttributes:
          type: array
          items:
            type: string
          description: The document fields/attributes used for a query suggestion.
        AdditionalAttributes:
          type: array
          items:
            $ref: '#/components/schemas/DocumentAttribute'
          description: The additional fields/attributes to include in the response. You can use additional fields to provide extra information in the response. Additional fields are not used to based suggestions on.
    GetQuerySuggestionsResponse:
      type: object
      properties:
        QuerySuggestionsId:
          type: string
          description: The identifier for a list of query suggestions for an index.
        Suggestions:
          type: array
          items:
            $ref: '#/components/schemas/Suggestion'
          description: A list of query suggestions for an index.
    UserContext:
      type: object
      properties:
        Token:
          type: string
          description: The user context token for filtering search results for a user. It must be a JWT or a JSON token.
        UserId:
          type: string
          description: The identifier of the user you want to filter search results based on their access to documents.
        Groups:
          type: array
          items:
            type: string
          description: The list of groups you want to filter search results based on the groups' access to documents.
        DataSourceGroups:
          type: array
          items:
            $ref: '#/components/schemas/DataSourceGroup'
          description: The list of data source groups you want to filter search results based on groups' access to documents in that data source.
    AccessDeniedException:
      type: object
      properties:
        Message:
          type: string
    ThrottlingException:
      type: object
      properties:
        Message:
          type: string
    DocumentAttributeValue:
      type: object
      properties:
        StringValue:
          type: string
          description: A string, such as "department".
        StringListValue:
          type: array
          items:
            type: string
          description: A list of strings. The default maximum length or number of strings is 10.
        LongValue:
          type: integer
          description: A long integer value.
        DateValue:
          type: string
          format: date-time
          description: A date expressed as an ISO 8601 string. It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
    ConflictException:
      type: object
      properties:
        Message:
          type: string
    ServiceQuotaExceededException:
      type: object
      properties:
        Message:
          type: string
    DataSourceGroup:
      type: object
      properties:
        GroupId:
          type: string
          description: The identifier of the group you want to add to your list of groups. This is for filtering search results based on the groups' access to documents.
        DataSourceId:
          type: string
          description: The identifier of the data source group you want to add to your list of data source groups. This is for filtering search results based on the groups' access to documents in that data source.
      required:
      - GroupId
      - DataSourceId
    ResourceNotFoundException:
      type: object
      properties:
        Message:
          type: string
    SuggestionHighlight:
      type: object
      properties:
        BeginOffset:
          type: integer
          description: The zero-based location in the response string where the highlight starts.
        EndOffset:
          type: integer
          description: The zero-based location in the response string where the highlight ends.
  securitySchemes:
    sigv4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication
x-refined-from:
- amazon-kendra-openapi.yml
- amazon-kendra-query-suggestions-api-openapi.yml