Amazon Kendra Query Suggestions API

Operations for query autocompletion

GitHub OpenAPI

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /#GetQuerySuggestions Get query suggestions for a search · Get Query Suggestions #
Ask an LLM
“What queries are suggested to users typing a search?”
“Can I limit how many suggestions come back for a query?”
Tell an agent
Get query suggestions for {QueryText} in index {IndexId}.
Suggest up to {MaxSuggestionsCount} queries matching {QueryText} in {IndexId}.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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.1.0
info:
  title: AWSKendraFrontendService Query Suggestions API
  version: '2019-02-03'
  description: Generated from AWS's published Smithy model for AWSKendraFrontendService. 1 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://kendra.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#GetQuerySuggestions:
    post:
      operationId: 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
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: kendra
  schemas:
    AccessDeniedException:
      type: object
      properties:
        Message:
          type: string
    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'
    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'
    ConflictException:
      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
    DocumentAttribute:
      type: object
      properties:
        Key:
          type: string
          description: The identifier for the attribute.
        Value:
          $ref: '#/components/schemas/DocumentAttributeValue'
      required:
      - Key
      - Value
    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.
    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
    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.
    InternalServerException:
      type: object
      properties:
        Message:
          type: string
    ResourceNotFoundException:
      type: object
      properties:
        Message:
          type: string
    ServiceQuotaExceededException:
      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.
    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.
    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.
    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.
    SuggestionValue:
      type: object
      properties:
        Text:
          $ref: '#/components/schemas/SuggestionTextWithHighlights'
    ThrottlingException:
      type: object
      properties:
        Message:
          type: string
    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.
    ValidationException:
      type: object
      properties:
        Message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/kendra/service/2019-02-03/kendra-2019-02-03.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)