Reporting in the Google Maps Platform provides a set of predefined visual
reports of basic API usage, quota, and billing information in the
Google Cloud console. Use these reports to determine the number of API calls
you've made, how close you are to hitting API usage quotas, and monitor your
billing usage over time.

The types of reports include:

- **Usage reports**: Reports the number of requests your project makes to the Google Maps Platform APIs using credentials associated with your project.
- **Quota reports**: Reports quota usage in graphs that can be grouped in requests per minute. The current quota limits for selected APIs are displayed in tables below the quota usage graphs.
- **Billing reports**: Reports costs over time as a stacked line chart. View the current month's quota usage, inclusive of any usage-specific credits applied, as well as the total forecasted cost for the entire current month.

For a complete list of the response statuses and response codes that define
whether a request appears in the **Usage** , **Quota** , and **Billing** reports,
see [Response status and reports](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#codes-reports).

View the reports of Google Maps Platform usage, quota, and billing using the
[Cloud console](https://console.cloud.google.com).

## Usage reports

Usage is based on the number of requests your project makes to the
Google Maps Platform APIs using the credentials associated with your project.
Requests include successful requests, requests that result in server errors, and
requests that result in client errors. Credentials include API keys and client
IDs (for Premium Plan and migrated Premium Plan projects). For details, see the
[Premium Plan Overview](https://developers.google.com/maps/premium/overview.md.txt) and information on using a
[client ID](https://developers.google.com/maps/premium/overview.md.txt#client_id).

Usage metrics are displayed in tables (Requests, Errors, and Latency) and graphs
(Traffic, Errors, and Latency). For tracking purposes:

- **All APIs**: You can filter and group usage metrics for all APIs in these
  ways:

  - Filter by time period and API.
  - See traffic, error, and latency grouped by response code, API, and credential.
- **A specific API**: You can filter and group usage metrics for a specific
  API in these ways:

  - Filter by time period, API versions, credentials, and methods.
  - See traffic, error and latency grouped by response code, API method and version, and credential.

### APIs \& Services Dashboard page

The APIs \& Services [Dashboard](https://console.cloud.google.com/project/_/apis/dashboard) provides an overview
of the usage metrics for all APIs enabled for your project: the
Google Maps Platform APIs as well as other APIs and services.

- The **Dashboard** page features three graphs and a table. You can filter the
  usage displayed in the graphs and tables by selecting a time period from 1
  hour up to the last 30 days.

- The **Traffic** graph shows usage in queries per minute (QPM) per API.

- The **Errors** graph shows percentage of the requests that resulted in
  errors per API.

- The **Latency** graph shows the median latency of the requests per API.

Beneath the graphs, a table lists the enabled APIs and services. Requests are
the number of requests (for the selected time period). Errors are the number of
these requests that resulted in errors. Latency (medium latency and percentile)
is the latency for these requests.

![Example of monitoring APIs](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-api-srvs.png)

To access the APIs \& Services Dashboard page:

1. Open the Project selector page in the Cloud console: [Project selector page](https://console.cloud.google.com/project/_/apis/dashboard)

2. Select your project. The APIs \& Services Dashboard page appears.  

   If the page does not appear, select the menu button ![menu](https://developers.google.com/static/maps/reporting-and-monitoring/images/nav-menu.png) and then select **APIs \& Services**.

For more information, see [Monitoring your API Usage](https://cloud.google.com/apis/docs/monitoring).

### Google Maps Overview page

The Google Maps [Overview](https://console.cloud.google.com/project/_/google/maps-apis/overview) page includes a table listing
enabled APIs and usage requests for the last 30 days. Requests by API are also
shown in graph form. A billing graph shows your current bill and total usage for
the last 3 months.

> [!NOTE]
> **Note:** If you select the name of any enabled API, you are directed to the Google Maps [Metrics](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#google-maps-metrics) page for that API.

![An Overview chart showing a table listing enabled APIs and
API requests for the last 30 days.](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-overview-page.png)

To access Google Maps Platform Overview page:

1. Open the Google Maps Platform page in the Cloud console: [Go to Google Maps Platform page](https://console.cloud.google.com/project/_/google/maps-apis/api-list?utm_source=Docs_EnabledMapsAPIsView)

2. In the left menu, select **Overview**.

### Google Maps Platform APIs \& Services page

The Google Maps [APIs \& Services](https://console.cloud.google.com/project/_/google/maps-apis/api-list?utm_source=Docs_EnabledMapsAPIsView) page contains a grid
of tiles representing the APIs, SDKs, and other services available to your
project. Within each tile, you can enable or disable that service by selecting
**Enable** or **Disable** , and you can access credentials information, [metrics](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#google-maps-metrics), and user guides for enabled APIs. You
can also use the page filters to view enabled or disabled services and other
service categories.

![apis](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-apis-pg.png)

To access Google Maps Platform APIs \& Services page:

1. Open the Google Maps Platform page in the Cloud console: [Go to Google Maps Platform page](https://console.cloud.google.com/project/_/google/maps-apis/api-list?utm_source=Docs_EnabledMapsAPIsView)

2. In the left menu, select **APIs \& Services**.

### Google Maps Metrics page

The Google Maps [Metrics](https://console.cloud.google.com/project/_/google/maps-apis/metrics) page displays three graphs:
Traffic, Errors, and Median Latency. The usage data in the graphs can be grouped
by Response Code class, API, API method, Credential, Platform, and Domain.

Beneath the graphs, the **Metrics** page includes an APIs table that shows
requests, errors, and latency for the APIs you have selected.

Using the API drop-down at the top, and the grouping and filtering options in
the right pane, you can group and filter displayed usage metrics by selecting
specific or multiple APIs, Credentials, Response Code classes, Platform type and
Domain. You can also select a time period (from one hour up to the last 30 days)
and granularity (per second or day) for the displayed usage metrics.

![The metrics page displaying three graphs: Traffic, Errors, and Median Latency.](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-metrics-pg.png)

> [!NOTE]
> **Note:** The **Platform** and **Domain** options in the *Grouped by* drop-down list and the *Platform* and *Domain* filters are not available for the **All Google
> Maps Platform APIs** selection from the *API selection* drop-down list. Use the **All Google Maps Platform APIs** selection for high level analysis: find APIs and methods having a usage, check on error rates and usage by credentials. Select a specific API from the *API selection* drop-down list for deep diving into analysis for one specific API. When selecting a specific API from the *API
> selection* drop-down list, you can do more granular analysis for API usage such as grouping and filtering by *Platform* and *Domain*.

The following images show *Platform* and *Domain* filters for a specific API
when grouping by **Platform** and **Domain** is selected in the *Grouped by*
drop-down list:


![The Platform filter appears only when a single API is selected.](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-metrics-platform.png)
![The Platform filter appears only when a single API is selected.](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-metrics-domain.png)

To access Google Maps Platform API Metrics page:

1. Open the Google Maps Platform page in the Cloud console: [Go to Google Maps Platform page](https://console.cloud.google.com/project/_/google/maps-apis/api-list?utm_source=Docs_EnabledMapsAPIsView)

2. In the left menu, select **Metrics**.

### Credential reporting

You can filter and group metrics by the credential that was used to load the
API.

| Credential format | Meaning |
|---|---|
| **Key name** For example, "Mobile app key" | **An API key was used to load the API** using `?key=...`: You can find the key names on the Maps Platform Console under **Keys \& Credentials**. |
| **Project Number** For example, "project_number:123456", where 123456 is your project number. | There are two possibilities if you see this credential: 1. **For APIs that accept Maps Platform client IDs** : A Maps Platform client ID was used to load the API. For example, using `&client=gme-_mycompany_`. These APIs accept client IDS: Maps JavaScript API, Maps Static API, Street View Static API, Elevation API, Directions API (Legacy), Distance Matrix API (Legacy), Geocoding API, Time Zone API. For more information, see [Premium Plan client ID Management](https://developers.google.com/maps/premium/authentication/overview.md.txt#client-id). 2. **For APIs that accept OAuth**: The API was loaded using OAuth without an API key. |

> [!NOTE]
> **Note:** There are no Maps Platform APIs that support both Maps Platform client IDs and OAuth, so you can tell whether the API was loaded with a client ID or OAuth based on which API was used.

### Response code graphs

The **Traffic by response code** and **Error by response code** graphs split
usage by HTTP response code class. This table shows the mapping between the
Google Maps Platform API response status and HTTP response code class:

| Maps API status | HTTP response code class - Usage report (2xx, 3xx, 4xx, 5xx) | Notes |
|---|---|---|
| OK | 2xx | Successful response. This is a billable request and will consume quota. |
| OK | 3xx | Successful response. This is a billable request and will consume quota. For example, the [Place Photo](https://developers.google.com/maps/documentation/places/web-service/photos#place_photo_requests) successful requests return 302 redirect to the referenced image. |
| DATA_NOT_AVAILABLE | 4xx^([1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#response-code-graphs-fn1))^ | Successful response indicating that there's no available data for the input locations. This is a billable request and will consume quota. |
| ZERO_RESULTS | 4xx^([1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#response-code-graphs-fn1))^ | Successful response returned no result. This is a billable request and will consume quota. |
| NOT_FOUND | 4xx^([1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#response-code-graphs-fn1))^ | For the [Directions API (Legacy)](https://developers.google.com/maps/documentation/directions/responses.md.txt#StatusCodes), this message indicates that at least one of the locations specified in the request's origin, destination, or waypoints couldn't be geocoded. For the [Places API](https://developers.google.com/maps/documentation/places/web-service/details#PlaceDetailsStatusCodes) this message indicates that the referenced location (place_id) was not found in the Places database. This is a billable request and will consume quota. |
| INVALID_REQUEST (invalid parameter value), MAX_WAYPOINTS_EXCEEDED, MAX_ROUTE_LENGTH_EXCEEDED, and others. | 4xx | Error caused by invalid parameter value. Check the API response for more details. This is a billable request and will consume quota. |
| REQUEST_DENIED | 4xx | Client error caused by authentication error, access error, and others. Check the API response for more details. |
| OVER_DAILY_LIMIT, OVER_QUERY_LIMIT, RESOURCE_EXHAUSTED, rateLimitExceeded, dailyLimitExceeded, userRateLimitExceeded | 4xx | Client error caused by too many requests per allowed time period. Retry the request at a later time. Check the API response for more details. |
| INVALID_REQUEST (invalid or missing parameter, request parsing or validation error) | 4xx | Client error caused by invalid request. Check the API response for more details. |
| NOT_FOUND (404) | 4xx | For the [Directions API (Legacy)](https://developers.google.com/maps/documentation/directions/responses.md.txt#StatusCodes), this message indicates that at least one of the locations specified in the request's origin, destination, or waypoints couldn't be geocoded. For the [Geolocation API](https://developers.google.com/maps/documentation/geolocation/intro#errors), this message indicates that the inputs weren't sufficient to produce a location estimate. For the [Roads API](https://developers.google.com/maps/documentation/roads/errors.md.txt), this message indicates that the inputs couldn't be reasonably snapped to roads. This is a billable request and will consume quota. |
| UNKNOWN_ERROR | 5xx | Server error indicating that request cannot be proceeded: internal error, service overloaded, not available, time out, and others. |

^1^
To improve the consistency of error code reporting, Google Maps Platform
APIs are migrating:
1) from HTTP response code class `2xx` to `4xx` for
Maps API statuses: `DATA_NOT_AVAILABLE`, `NOT_FOUND`,
`ZERO_RESULTS` - [status](https://issuetracker.google.com/issues/254811291),
2) from HTTP response code class `2xx` to `4xx` for
Maps API statuses: `REQUEST_DENIED`, `OVER_DAILY_LIMIT`,
`OVER_QUERY_LIMIT`, `dailyLimitExceeded`,
`rateLimitExceeded`, `userRateLimitExceeded`,
3) from HTTP response code class `2xx` to `5xx` for
Maps API status: `UNKNOWN_ERROR`.
You can see both response codes during the transition
period. Response codes returned in Maps API responses are **not** changing.
Confirm that an increase in `4xx` and/or `5xx` in
[Google Maps Platform Metrics](https://console.cloud.google.com/project/_/google/maps-apis/metrics)
is related to this migration by checking which exact response code increases in
the [Metrics Explorer](https://console.cloud.google.com/project/_/monitoring/metrics-explorer?pageState=%7B%22xyChart%22:%7B%22dataSets%22:%5B%7B%22timeSeriesFilter%22:%7B%22filter%22:%22metric.type%3D%5C%22maps.googleapis.com/service/request_count%5C%22+resource.type%3D%5C%22maps.googleapis.com/Api%5C%22%22,%22minAlignmentPeriod%22:%2260s%22,%22aggregations%22:%5B%7B%22perSeriesAligner%22:%22ALIGN_RATE%22,%22crossSeriesReducer%22:%22REDUCE_SUM%22,%22alignmentPeriod%22:%2260s%22,%22groupByFields%22:%5B%22metric.label.%5C%22response_code%5C%22%22,%22metric.label.%5C%22response_code_class%5C%22%22,%22resource.label.%5C%22service%5C%22%22%5D%7D,%7B%22perSeriesAligner%22:%22ALIGN_NONE%22,%22crossSeriesReducer%22:%22REDUCE_NONE%22,%22alignmentPeriod%22:%2260s%22,%22groupByFields%22:%5B%5D%7D%5D%7D,%22targetAxis%22:%22Y1%22,%22plotType%22:%22LINE%22%7D%5D,%22options%22:%7B%22mode%22:%22COLOR%22%7D,%22constantLines%22:%5B%5D,%22timeshiftDuration%22:%220s%22,%22y1Axis%22:%7B%22label%22:%22y1Axis%22,%22scale%22:%22LINEAR%22%7D%7D,%22isAutoRefresh%22:true,%22timeSelection%22:%7B%22timeRange%22:%221w%22%7D%7D)
([learn more](https://developers.google.com/maps/reporting-and-monitoring/monitoring.md.txt) on using
Google Cloud Monitoring for Google Maps Platform).

For more information about status codes and error messages, see the response
documentation for the API you are interested in (for example,
[Geocoding
Responses](https://developers.google.com/maps/documentation/geocoding/overview#GeocodingResponses) or
[Directions Responses](https://developers.google.com/maps/documentation/directions/responses.md.txt#DirectionsResponses)).

### Google Maps Platform usage attribution parameter

Google Maps Platform provides many types of sample code to help you get up
and running quickly. For example, you can use [Quick Builder](https://console.cloud.google.com/google/maps-apis/build?utm_source=Docs_QB) in
Cloud console, follow the industry solutions
[implementation guides](https://developers.google.com/maps/solutions),
and learn from
[codelabs](https://codelabs.developers.google.com/?cat=mapsplatform).

To understand usage and ways to improve our solutions, Google includes the
**internal_usage_attribution_ids** parameter in API calls to gather information
about sample code usage:

- The `internal_usage_attribution_ids` parameter may be included by default in solution sample code.
- The parameter returns analytics on solution adoption to Google to improve solution quality in future iterations.
- You can opt out by deleting the `internal_usage_attribution_ids` parameter and its value from sample code.
- There is no requirement to keep the parameter. Removing the parameter does not affect performance.
- The parameter is only used for sample code usage reporting.
- The parameter is separate from any API-specific analytics and reporting. That means removing the parameter from solution sample code does not disable internal Maps JavaScript API reporting.

> [!NOTE]
> **Note:** The `solution_channel` parameter is still valid and may be found in existing implementations, but is no longer recommended. Use `internal_usage_attribution_ids` instead.

## Quota reports

Quotas set limits on the number of requests your project can make to the
Google Maps Platform APIs. Requests can be limited in three ways: per day,
per minute, and per user per minute. Only successful requests and requests that
cause server errors count against quota. Requests that fail authentication don't
count against quota.

Quota usage is displayed in graphs on the [Quotas](https://console.cloud.google.com/project/_/google/maps-apis/quotas) page in the Cloud console, and can be grouped in requests per minute. The
current quota limits for selected APIs are displayed in tables below the quota
usage graphs.

To get your per-minute quota value for any GMP API product, use this
[calculator](https://mapsplatform.google.com/pricing/).

### Google Maps Quotas page

The Google Maps [Quotas](https://console.cloud.google.com/project/_/google/maps-apis/quotas) page shows quota limits and quota
consumption for the specific API you have selected.

The quota usage chart on the Google Cloud console shows the total traffic for your
API keys and client IDs. Client ID traffic is also available in the Metrics
chart on the Cloud console.

The page shows only requests that consume quota: successful requests (`OK`,
`ZERO_RESULTS`, `DATA_NOT_AVAILABLE`) and requests that cause server errors
(`NOT_FOUND`, `INVALID_REQUEST/INVALID_VALUE` (invalid parameter value), and
`UNKNOWN_ERROR`).

Requests that cause client errors --- authentication, authorization, and
invalid argument errors (`REQUEST_DENIED`, `OVER_QUERY_LIMIT`, `INVALID_REQUEST`
(invalid parameter, request parsing error)) --- don't consume quota and are
not displayed.

The quota unit is a request for most of the Google Maps Platform APIs (
Maps Static API, Street View Static API,
Geocoding API, Directions API (Legacy),
Places API, Time Zone API,
Geolocation API, and Elevation API), but there are
some exceptions:

- For the Distance Matrix API (Legacy), the quota unit is an element which is an origin-destination pair.
- For the Maps JavaScript API, the quota unit is a map load.
- For the Maps SDK for Android and Maps SDK for iOS, the quota unit is a Street View request or Panorama load. Map loads are available at no charge and don't consume quota.

![The Maps' Quotas page in the Google Cloud console that shows
quotas by API using a selector, then shows Map Loads relative to the set quotas
for the API in question.](https://developers.google.com/static/maps/reporting-and-monitoring/images/gmp-rpt-quotas-page.png)

To access Google Maps Platform Quotas page:

1. Open the Google Maps Platform page in the Cloud console: [Go to Google Maps Platform page](https://console.cloud.google.com/project/_/google/maps-apis/api-list?utm_source=Docs_EnabledMapsAPIsView)

2. In the left menu, select **Quotas**.
3. Select an API from the API drop-down list.

### Quota units

This table shows the quota unit for the Google Maps Platform APIs.

| Google Maps Platform API | Quota Unit |
|---|---|
| **Maps** |   |
| Maps SDK for Android | 1 Panorama |
| Maps SDK for iOS | 1 Panorama |
| Map Tiles API | 1 Request |
| Maps Aerial View API | 1 Request |
| Maps Static API | 1 Request |
| Maps JavaScript API | 1 Map Load |
| Street View Static API | 1 Request |
| Maps Embed API | 1 Map Load |
| **Routes** |   |
| Routes API (Compute Routes) | 1 Request |
| Routes API (Compute Route Matrix) | 1 Element (origin-destination pair) |
| Directions API (Legacy) | 1 Request |
| Distance Matrix API (Legacy) | 1 Element (origin-destination pair) |
| Roads API | 1 Request |
| Route Optimization API | 1 Request |
| Navigation SDK for Android | 1 Destination |
| Navigation SDK for iOS | 1 Destination |
| **Places** |   |
| Places API | 1 Request |
| Places Aggregate API | 1 Request |
| Address Validation API | 1 Request |
| Geocoding API | 1 Request |
| Geolocation API | 1 Request |
| Time Zone API | 1 Request |
| Maps Experience Agent Tools | 1 Request |
| **Environment** |   |
| Air Quality API (CurrentConditions and HeatmapTile) | 1 Request |
| Air Quality API (History) | 1 page |
| Pollen API | 1 Request |
| Solar API | 1 Request |
| Weather API | 1 Request |

## Billing reports

### View your billing report

Billing reports for your use of the Google Maps Platform products are
available in the Google Cloud console. For more information, see
[Billing](https://developers.google.com/maps/reporting-and-monitoring/billing).

To access the billing reports:

<br />

1. Open the Project selector page in the Cloud console: [Project selector page](https://console.cloud.google.com/project/_/apis/dashboard)

2. Select a project.
3. Select the menu button ![menu](https://developers.google.com/static/maps/reporting-and-monitoring/images/nav-menu.png) and then select **Billing**.
4. If you have multiple billing accounts, select **Go to linked billing account** to open the **Overview** page for the linked billing account.
5. In the left menu, select **Reports** to open the billing **Reports** page for the linked billing account.

<br />

### How to read the billing report chart

Billing reports plot cost over time as a stacked line chart. The default view
displays the current month's daily usage-specific costs grouped by project (for
all products), inclusive of any usage-specific credits applied, as well as the
total forecasted cost for the entire current month. Each line in the chart (and
row in the summary table) corresponds to the project, ranked largest to smallest
by cost.
[Learn more
about interpreting the billing report chart](https://cloud.google.com/billing/docs/how-to/reports).
![Screenshot of the billing report displaying chart and table using the
default preset view](https://cloud.google.com/billing/docs/images/billing-reports1.png) **Figure 1:** The billing report displaying chart and table using the default preset view.

### Tip: Analyze the usage and cost per SKU

To more accurately understand the details of the pay-as-you-go pricing model and
how it impacts your implementation, look at your usage and cost by SKU.
![Billing report grouped by SKU](https://developers.google.com/static/maps/reporting-and-monitoring/images/billing-report-table-by-sku.png) **Figure 2:** The billing table displaying usage and cost line items by SKU. ![Screenshot of the billing report filters](https://developers.google.com/static/maps/reporting-and-monitoring/images/billing-report-filters-sku.png) **Figure 3:** The billing report filters.

##### To change the report view to display line items by SKU:

1. In the panel to the right of the chart, expand the **Group by** filter.
2. Select **SKU**.

Other billing-report filters available include **Time range** , **Projects** ,
**Products** , **SKUs** , and **Locations** which lets you filter by
[where
the API requests are served from](https://cloud.google.com/docs/geography-and-regions).

To categorize the source of your usage in addition to the product, group billing
reports by one of the listed values. The three keys that relate to
Google Maps Platform APIs are **goog-maps-api-key-suffix** (the final four
characters of an API key), **goog-maps-platform-type** (the platform: Android,
iOS, JavaScript or webservice), and **goog-maps-channel** (a set numeric channel
value from an API query).
[More
information on filtering and grouping](https://cloud.google.com/billing/docs/how-to/reports#filtering_and_grouping).

You can change the chart view to exclude usage-specific credits by clearing the
**Include credits in cost** checkbox in the right panel.

### Monitor and restrict consumption

To help you to plan your budget and control costs, you can do the following:

- [Set a budget](https://cloud.google.com/billing/docs/how-to/budgets)

  [](https://cloud.google.com/billing/docs/how-to/budgets)

  [alert](https://cloud.google.com/billing/docs/how-to/budgets), to track how your spend is growing toward a particular amount. A
  budget does not cap API usage, it only alerts you when your spend amount
  gets near the specified amount.
- [Cap your daily API](https://cloud.google.com/apis/docs/capping-api-usage)

  [](https://cloud.google.com/apis/docs/capping-api-usage)

  [usage](https://cloud.google.com/apis/docs/capping-api-usage), to manage your cost of use of billable APIs. By setting caps on
  *requests per day*, you can limit your spend. Use an equation to determine
  your daily cap depending on how much you want to spend. For example:
  (Monthly spend / price per each SKU) / 30 = requests per day cap (for one
  API).

  > [!NOTE]
  > **Note:** Your implementation may use multiple billable APIs that in turn use multiple SKUs, so adjust your equation as needed. Factor into your calculations the amount of no-charge monthly usage that each API provides, shown in the [pricing list](https://developers.google.com/maps/billing-and-pricing/pricing.md.txt).

### Usage tracking per channel

To track your usage using numeric channels, you must add the 'channel' parameter
to your API requests. The only acceptable channel values are numbers from 0-999.
Here are a few examples:

<br />

- Geocoding Web Service API

  ```
  https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY&channel=1
  ```
- Maps JavaScript API

  ```
  <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&channel=2&callback=initMap"
  async defer></script>
  ```

<br />

Monitor your channel usage directly on your Billing Report. Channel usage is
under **Labels** as key **goog-maps-channel**.

> [!NOTE]
> **Note:** Channel data is not available for Maps SDK for Android, Maps SDK for iOS, Places API (New), Places SDK for Android, Places SDK for iOS, Navigation SDK for Android, Navigation SDK for iOS, Places Aggregate API, Address Validation API, Aerial View API, Air Quality API, Map Tiles API, Maps Datasets API, Roads API, Routes API, Pollen API, Solar API, Route Optimization API, and Weather API.

![How to filter by using labels](https://developers.google.com/static/maps/reporting-and-monitoring/images/billing-report-filter-channel.png) **Figure 4:** Filter by SKU and Channels

##### To filter your billing report by SKU and channel

1. Use the **Group by** SKU filter.
2. Select the **Labels** caret.
3. From the **Key** drop-down, select **goog-maps-channel**.
4. From the **Value** drop-down, select the numerical channels you want to filter.

Group by Label key **goog-maps-channel** to see the cost generated by each
channel.

Once you have implemented channel usage data in your requests, there may be a
short delay (up to 24 hours) before the data is reflected in your billing
report.

### Export your billing data with BigQuery

You can also [export your billing data
to
BigQuery](https://cloud.google.com/billing/docs/how-to/export-data-bigquery).

Use BigQuery Export to export detailed Cloud Billing data (such as usage and
cost estimate data) automatically throughout the day to a
[BigQuery dataset](https://cloud.google.com/bigquery/docs/datasets-intro) that you specify. Then you can access your billing data
from BigQuery for detailed analysis. This gives an extra layer of granularity in
understanding the source of your Google Maps Platform usage.

If you'd like to get started with BigQuery exports and querying the data, you
can try the sample query below. Prior to running this query, you must:

<br />

- Enable billing and [BigQuery billing export](https://cloud.google.com/billing/docs/how-to/export-data-bigquery) on your account.
- The table format is <var translate="no">PROJECT_ID</var>.<var translate="no">DATASET_NAME</var>.gcp_billing_export*v1* <var translate="no">BILLING_ACCOUNT_ID</var> where:
  - <var translate="no">PROJECT_ID</var> is your actual project ID (e.g. "my-project-123456").
  - <var translate="no">DATASET_NAME</var> is the name of the dataset you created (e.g. "SampleDataSet").
  - <var translate="no">BILLING_ACCOUNT_ID</var> is a reference of your Billing Account ID, prefixed with "gcp_billing_export*v1* ", and changing dashes (-) to underscores (_). For example, billing account ID <var translate="no">123456-7890AB-CDEF01</var> would become `gcp_billing_export_v1_123456_789AB_CDEF01`.

> [!NOTE]
> **Note:**When you create a new DataSet it will appear in the interface right away, but the Table to query will not yet appear. The table will be automatically generated after a few hours. It will then take around 24 hours to see your data. Your BigQuery dataset only reflects usage and cost data incurred from the date you set up the billing export, and after. In other words, billing data is not added retroactively, so you won't see billing data from before you enable BigQuery export.

<br />

<br />

```sql
  #standardSQL
  SELECT   Date(usage_start_time, "America/Los_Angeles") AS billing_day,
           invoice.month                                 AS invoice_month,
           service.description                           AS service,
           sku.description                               AS sku,
           (
                  SELECT l.value
                  FROM   Unnest(labels) AS l
                  WHERE  l.KEY = 'goog-maps-channel' ) AS goog_maps_channel,
           Round(Sum(usage.amount), 2)                 AS usage_amount,
           usage.unit                                  AS usage_unit,
           Round(Sum(cost), 2)                         AS cost,
           cost_type,
           currency
  FROM     PROJECT_ID.DATASET_NAME.gcp_billing_export_v1_BILLING_ACCOUNT_ID
  WHERE    invoice.month = '202002' -- Change the invoice month with the same format as the example.
  GROUP BY billing_day,
           invoice_month,
           service,
           sku,
           goog_maps_channel,
           usage_unit,
           cost_type,
           currency
  ORDER BY billing_day,
           service,
           sku
  
```

<br />

<br />

### Related resources

<br />

Cloud Billing:

- [Create, modify, or close your Cloud Billing account](https://cloud.google.com/billing/docs/how-to/manage-billing-account)
- [Modify a project's billing settings](https://cloud.google.com/billing/docs/how-to/modify-project)
- [View Your Billing Reports and Cost Trends](https://cloud.google.com/billing/docs/how-to/reports)
- [Set budgets and budget alerts](https://cloud.google.com/billing/docs/how-to/budgets)
- [Capping API Usage](https://cloud.google.com/apis/docs/capping-api-usage)

Google Maps Platform:

<!-- -->

- [Google Maps Platform Billing](https://developers.google.com/maps/billing/gmp-billing)
- [Optimization Guide](https://developers.google.com/maps/optimization-guide.md.txt)
- [API Key Best Practices](https://developers.google.com/maps/api-security-best-practices.md.txt)

<br />

<br />

<br />

## Response status and reports

The table below shows mapping between the Maps API status, HTTP response code
returned in Maps API responses and HTTP response code class in Usage Report, and
indicates if the corresponding request appears in the Usage, Quota, and Billing
reports.

> [!NOTE]
> **Note:** For historical reasons, the HTTP response code returned in response to Google Maps Platform API requests can be different from the HTTP response code in Usage reports ([Google Maps Platform Metrics](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#google-maps-metrics)). The Usage Reports metrics use a set of response code values that are consistent with those used in newer APIs. This improves the observability of APIs usage in [Google Maps Platform Metrics](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#google-maps-metrics) and [Google Maps Platform Monitoring](https://developers.google.com/maps/reporting-and-monitoring/monitoring.md.txt).

The Usage Report in [Google Maps Platform Metrics](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#google-maps-metrics)

provide `HTTP response code class` granularity. If you need a higher level of
granularity see [Response status codes](https://developers.google.com/maps/reporting-and-monitoring/monitoring.md.txt#monitoring-codes-reports)

available in
[Google Maps Platform Usage monitoring](https://developers.google.com/maps/reporting-and-monitoring/monitoring.md.txt#monitoring-usage-metrics).

| Response codes available in Maps API responses || Available in Usage Report | Reported to |||
| Maps API status | HTTP response code | HTTP response code class | Usage | Quota | Billing |
|---|---|---|---|---|---|
| OK | 200, 204, 302 | 2xx, 3xx | Yes | Yes | Yes |
| DATA_NOT_AVAILABLE, NOT_FOUND, ZERO_RESULTS | 200, 404 | 4xx^[1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#codes-reports-fn1)^ | Yes | Yes | Yes |
| INVALID_REQUEST (invalid parameter value), MAX_ROUTE_LENGTH_EXCEEDED, MAX_WAYPOINTS_EXCEEDED, etc. | 200, 400 | 4xx | Yes | Yes | Yes |
| INVALID_REQUEST (invalid/missing parameter, request parsing error) | 200, 400 | 4xx | Yes | No | No |
| REQUEST_DENIED | 200, 400, 403 | 4xx^[1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#codes-reports-fn1)^ | Yes | No | No |
| OVER_DAILY_LIMIT, OVER_QUERY_LIMIT, RESOURCE_EXHAUSTED, dailyLimitExceeded, rateLimitExceeded, userRateLimitExceeded | 200, 403, 429 | 4xx^[1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#codes-reports-fn1)^ | Yes | No | No |
| UNKNOWN_ERROR | 200, 500, 503 | 5xx^[1](https://developers.google.com/maps/reporting-and-monitoring/reporting.md.txt#codes-reports-fn1)^ | Yes | Yes | No |