- [HTTP request](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.HTTP_TEMPLATE)
- [Path parameters](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.PATH_PARAMETERS)
- [Query parameters](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.QUERY_PARAMETERS)
- [Request body](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.request_body)
- [Response body](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.response_body)
  - [JSON representation](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.QueryItemMetricsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#body.aspect)
- [TimeSpec](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#TimeSpec)
  - [JSON representation](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#TimeSpec.SCHEMA_REPRESENTATION)
- [Date](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date)
  - [JSON representation](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date.SCHEMA_REPRESENTATION)
- [MetricRow](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricRow)
  - [JSON representation](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricRow.SCHEMA_REPRESENTATION)
- [MetricValue](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricValue)
  - [JSON representation](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricValue.SCHEMA_REPRESENTATION)
- [Try it!](https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#try-it)

Query the metrics for an item.

### HTTP request

`GET https://chromewebstore.googleapis.com/v2/{name=publishers/*/items/*}:queryMetrics`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the item to query the metrics for. Format: publishers/{publisher}/items/{item} |

### Query parameters

| Parameters ||
|---|---|
| `timeSpec` | ``object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#TimeSpec`)`` Required. The time spec to query the metric set for. |
| `metrics[]` | `string` Required. The metrics to query the metric set for. **Supported metrics:** - installs: Count of item installs. - installs-7d: Count of item installs in the last 7 days. - uninstalls: Count of item uninstalls. - users: Count of daily active users of the item. - users-7d: Count of 7-day active users of the item. - impressions: Count of item impressions across the entire store front. - page-views: Count of individual views of the item's detail page. |
| `dimensions[]` | `string` Optional. Dimensions to slice the metrics by. At most one dimension can be specified. **Supported dimensions:** - os: The operating system of the user. - app-version: The version of the item. - country: The country of the user. - install-source: The source of the install. - install-type: The type of install (from webstore, inline, or other). - language: The language of the user. - enabled: If the item is enabled or disabled. - utm-campaign: The UTM campaign of the user. - utm-content: The UTM content of the user. - utm-medium: The UTM medium of the user. - utm-source: The UTM source of the user. - utm-term: The UTM term of the user. |
| `pageSize` | `integer` Optional. The maximum number of rows to return. If unspecified, at most 100 rows will be returned. The maximum value is 1000; Values above 1000 will be coerced to 1000. |
| `pageToken` | `string` Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

Response message for items.queryMetrics.

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

| JSON representation |
|---|
| ``` { "metricRows": [ { object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricRow`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `metricRows[]` | ``object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricRow`)`` The metric rows. |
| `nextPageToken` | `string` A token that can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/chromewebstore`
- `
  https://www.googleapis.com/auth/chromewebstore.readonly`

## TimeSpec

A date range for querying metrics.

| JSON representation |
|---|
| ``` { "firstDate": { object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date`) }, "lastDate": { object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date`) } } ``` |

| Fields ||
|---|---|
| `firstDate` | ``object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date`)`` Optional. The first date (inclusive) of the time spec. If unset, no lower bound will be applied. |
| `lastDate` | ``object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date`)`` Optional. The last date (inclusive) of the time spec. If unset, no upper bound will be applied. |

## Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).

Related types:

- `google.type.TimeOfDay`
- `google.type.DateTime`
- `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp`

| JSON representation |
|---|
| ``` { "year": integer, "month": integer, "day": integer } ``` |

| Fields ||
|---|---|
| `year` | `integer` Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| `month` | `integer` Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| `day` | `integer` Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |

## MetricRow

A single row of metrics and dimension values.

| JSON representation |
|---|
| ``` { "date": { object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date`) }, "dimensionValues": [ string ], "metricValues": [ { object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricValue`) } ] } ``` |

| Fields ||
|---|---|
| `date` | ``object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#Date`)`` The date of the record. |
| `dimensionValues[]` | `string` Dimension value columns for the row. |
| `metricValues[]` | ``object (`https://developer.chrome.com/docs/webstore/api/reference/rest/v2/publishers.items/queryMetrics#MetricValue`)`` Metric columns for the row. |

## MetricValue

Represents the value of a single metric

| JSON representation |
|---|
| ``` { "metric": string, "value": string, "uniqueUserCount": string } ``` |

| Fields ||
|---|---|
| `metric` | `string` The name of the metric |
| `value` | `string (https://developers.google.com/discovery/v1/type-format format)` The value of the metric. |
| `uniqueUserCount` | `string (https://developers.google.com/discovery/v1/type-format format)` The unique user count associated with the metric (if applicable). |