# Method: stats.getSearchapplication

- [HTTP request](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#body.request_body)
- [Response body](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#body.GetCustomerSearchApplicationStatsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#body.aspect)
- [CustomerSearchApplicationStats](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#CustomerSearchApplicationStats)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#CustomerSearchApplicationStats.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#try-it)

Get search application stats for customer. **Note:** This API requires a standard end user account to execute.

### HTTP request

`GET https://cloudsearch.googleapis.com/v1/stats/searchapplication`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `startDate` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Date`)`` All available stats from startDate to endDate are returned. endDate - startDate \<= 6 months. |
| `endDate` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Date`)`` End date upto which stats are going to be returned. |

### Request body

The request body must be empty.

### Response body

Response format for search application stats for a customer.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "stats": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#CustomerSearchApplicationStats`) } ], "averageSearchApplicationCount": string } ``` |

| Fields ||
|---|---|
| `stats[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication#CustomerSearchApplicationStats`)`` Search application stats by date. |
| `averageSearchApplicationCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Average search application count for the given date range. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud_search.stats.indexing`
- `https://www.googleapis.com/auth/cloud_search.stats`
- `https://www.googleapis.com/auth/cloud_search`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).

## CustomerSearchApplicationStats

Search application stats for a customer for the given date.

| JSON representation |
|---|
| ``` { "date": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Date`) }, "count": string } ``` |

| Fields ||
|---|---|
| `date` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Date`)`` The date for which search application stats were calculated. |
| `count` | `string (https://developers.google.com/discovery/v1/type-format format)` The count of search applications for the date. |