Indexes - Get Statistics

Returns statistics for the given index, including a document count and storage usage.

GET {endpoint}/indexes('{indexName}')/search.stats?api-version=2026-04-01

URI Parameters

Name In Required Type Description
endpoint
path True

string (uri)

The endpoint URL of the search service.

indexName
path True

string

The name of the index.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

Name Required Type Description
Accept

Accept

The Accept header.

x-ms-client-request-id

string (uuid)

An opaque, globally-unique, client-generated string identifier for the request.

Responses

Name Type Description
200 OK

GetIndexStatisticsResult

The request has succeeded.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

api-key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scopes

Name Description
https://search.azure.com/.default

Examples

SearchServiceGetIndexStatistics

Sample request

GET https://exampleservice.search.windows.net/indexes('example-index')/search.stats?api-version=2026-04-01

Sample response

{
  "documentCount": 12,
  "storageSize": 123456,
  "vectorIndexSize": 123456
}

Definitions

Name Description
Accept

The Accept header.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

GetIndexStatisticsResult

Statistics for a given index. Statistics are collected periodically and are not guaranteed to always be up-to-date.

Accept

The Accept header.

Value Description
application/json;odata.metadata=minimal

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Name Type Description
error

ErrorDetail

The error object.

GetIndexStatisticsResult

Statistics for a given index. Statistics are collected periodically and are not guaranteed to always be up-to-date.

Name Type Description
documentCount

integer (int64)

The number of documents in the index.

storageSize

integer (int64)

The amount of storage in bytes consumed by the index.

vectorIndexSize

integer (int64)

The amount of memory in bytes consumed by vectors in the index.