Get Index Statistics (Azure Search Service REST API)

The Get Index Statistics operation returns from Azure Search a document count for the current index, plus storage usage. You can also get this information from the portal.

GET https://[service name][index name]/stats?api-version=[api-version]  
api-key: [admin key]  


Statistics on document count and storage size are collected every few minutes, not in real time. Therefore, the statistics returned by this API may not reflect changes caused by recent indexing operations.


HTTPS is required for all services requests. The Get Index Statistics request can be constructed using the GET method.

The [index name] in the request URI tells the service to return index statistics for the specified index.

The api-version parameter is required. The current version is api-version=2017-11-11. See API versions in Azure Search for a list of available versions.

Request Headers

The following table describes the required and optional request headers.

Request Header Description
api-key: The api-key is used to authenticate the request to your Search service. It is a string value, unique to your service. The Get Index Statistics request must include an api-key set to an admin key (as opposed to a query key).

You will also need the service name to construct the request URL. You can get the service name and api-key from your service dashboard in the Azure Preview Portal. See Create an Azure Search service in the portal for page navigation help.

Request Body



Status Code: "200 OK" is returned for a successful response.The response body is in the following format:

  "documentCount": number,  
  "storageSize": number (size of the index in bytes)  

See also

Azure Search Service REST
API versions in Azure Search