Azure AI Search Query Keys API

The QueryKeys API from Azure AI Search — 3 operation(s) for querykeys.

GitHub OpenAPI

Operations 3

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 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name} Create a query key for a search service · Query keys create #
Ask an LLM
“How do I generate a new query key for my Azure AI Search service?”
“How many query keys can I create per service?”
Tell an agent
Create a query key named {name} for search service {searchServiceName}.
Generate a new query API key {name} in resource group {resourceGroupName}.
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key} Delete a query key · Query keys delete #
Ask an LLM
“How do I revoke a leaked query key?”
“Can I regenerate a query key by deleting it?”
Tell an agent destructive · confirm first
Delete query key {key} from search service {searchServiceName}.
Revoke the leaked query key {key}.
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys List query keys for a search service · Query keys list by search service #
Ask an LLM
“Which query keys exist on my search service?”
“Can I see all query API keys for a service?”
Tell an agent
List the query keys of search service {searchServiceName}.
Show every query API key on {searchServiceName}.

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/azure-ai-search:azure-ai-search-querykeys-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

azure-ai-search-querykeys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SearchManagementClient Query Keys API
  version: '2026-11-01'
  description: Client that can be used to manage Azure AI Search services and API keys.
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: QueryKeys
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}
  : post:
      operationId: QueryKeys_Create
      tags:
      - QueryKeys
      description: Generates a new query key for the specified search service. You can create up to 50 query keys per service.
      externalDocs:
        url: https://aka.ms/search-manage
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: searchServiceName
        in: path
        description: The name of the Azure AI Search service associated with the specified resource group.
        required: true
        schema:
          type: string
          pattern: ^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$
      - name: name
        in: path
        description: The name of the new query API key.
        required: true
        schema:
          type: string
      - name: x-ms-client-request-id
        in: header
        description: A client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.
        required: false
        x-ms-client-name: clientRequestId
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryKey'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Query keys create
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}
  : delete:
      operationId: QueryKeys_Delete
      tags:
      - QueryKeys
      description: 'Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it.

        Returns 200 (OK) on successful deletion, 204 (No Content) if the service exists but the query keys not found, or 404 (Not Found) if the service is not found.

        NOTE: The behavior of returning 404 is inconsistent with ARM guidelines. Clients should expect a 204 response in future versions and avoid new dependencies on the 404 response.'
      externalDocs:
        url: https://aka.ms/search-manage
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: searchServiceName
        in: path
        description: The name of the Azure AI Search service associated with the specified resource group.
        required: true
        schema:
          type: string
          pattern: ^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$
      - name: key
        in: path
        description: The query key to be deleted. Query keys are identified by value, not by name.
        required: true
        schema:
          type: string
      - name: x-ms-client-request-id
        in: header
        description: A client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.
        required: false
        x-ms-client-name: clientRequestId
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The request has succeeded.
        '204':
          description: There is no content to send for this request, but the headers may be useful.
        '404':
          description: The server cannot find the requested resource.
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Query keys delete
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys
  : post:
      operationId: QueryKeys_ListBySearchService
      tags:
      - QueryKeys
      description: Returns the list of query API keys for the given Azure AI Search service.
      externalDocs:
        url: https://aka.ms/search-manage
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: searchServiceName
        in: path
        description: The name of the Azure AI Search service associated with the specified resource group.
        required: true
        schema:
          type: string
          pattern: ^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$
      - name: x-ms-client-request-id
        in: header
        description: A client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.
        required: false
        x-ms-client-name: clientRequestId
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQueryKeysResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Query keys list by search service
      x-summary-source: derived
components:
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The name of the resource group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription. The value must be an UUID.
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ListQueryKeysResult:
      type: object
      description: Response containing the query API keys for a given Azure AI Search service.
      properties:
        value:
          type: array
          description: The query keys for the Azure AI Search service.
          items:
            $ref: '#/components/schemas/QueryKey'
          readOnly: true
        nextLink:
          type: string
          description: Request URL that can be used to query next page of query keys. Returned when the total number of requested query keys exceed maximum page size.
          readOnly: true
      x-ms-external: true
    CloudErrorBody:
      type: object
      description: Describes a particular API error with an error code and a message.
      properties:
        code:
          type: string
          description: An error code that describes the error condition more precisely than an HTTP status code. Can be used to programmatically handle specific error cases.
        message:
          type: string
          description: A message that describes the error in detail and provides debugging information.
        target:
          type: string
          description: The target of the particular error (for example, the name of the property in error).
        details:
          type: array
          description: Contains nested errors that are related to this error.
          items:
            $ref: '#/components/schemas/CloudErrorBody'
      x-ms-external: true
    CloudError:
      type: object
      description: Contains information about an API error.
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: Describes a particular API error with an error code and a message.
        message:
          type: string
          description: A brief description of the error that hints at what went wrong (for details/debugging information refer to the 'error.message' property).
      x-ms-external: true
    QueryKey:
      type: object
      description: Describes an API key for a given Azure AI Search service that conveys read-only permissions on the docs collection of an index.
      properties:
        name:
          type: string
          description: The name of the query API key. Query names are optional, but assigning a name can help you remember how it's used.
          readOnly: true
        key:
          type: string
          description: The value of the query API key.
          readOnly: true
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.