A quota system has been implemented for the Home APIs to ensure service
reliability and help developers effectively manage traffic volume. Quotas in the
Home APIs are at a Google Cloud project-level.

The rate limit for the Home APIs is 30,000 QPM (queries per minute) per
project. This limit encompasses all queries sent through the Home APIs.

## Quota exceeded

When the Home APIs rate limit is exceeded, a
[`resourceExhaused`](https://developers.home.google.com/reference/kotlin/com/google/home/HomeException.md.txt#resourceExhausted(kotlin.String,java.lang.Exception,kotlin.Array))
`HomeException`
is thrown. Subsequent requests will be rejected
immediately with a "Quota exceeded" message.

In the event that quota is exceeded, apps should feature an exponential backoff
and notify users if actions are temporarily restricted.

## Monitoring

Use the Google Cloud Console to monitor usage in real-time and
configure proactive alerts for when you get close to a Home APIs quota.

To view current metrics, go to the [**Metrics** section of the
Home API service](https://console.cloud.google.com/apis/api/home.googleapis.com/metrics)
in the Google Cloud project associated with your app's registration
in Google Home Developer Console.

### Set up alerts

We recommend that partners set up alerts for passing a threshold (such as 80%)
of your allocated quota. Alert support in Google Cloud is very
extensive and highly configurable.

When creating an alert for quota, you'll want to use the following metrics under
**Consumer Quota \> Quota** in the policy builder.

- Allocation quota usage --- serviceruntime.googleapis.com/quota/allocation/usage
- Quota limit --- serviceruntime.googleapis.com/quota/limit

Partners should also set up notifications channels (such as email) for receiving
quota alerts.

See the following resources to learn more about alerting and notifications, and
how to configure them in Google Cloud:

- [Create metric-threshold alerting
  policies](https://docs.cloud.google.com/monitoring/alerts/using-alerting-ui)
- [Create and manage notification
  channels](https://docs.cloud.google.com/monitoring/support/notification-options)

## Request a quota increase

If your app's has legitimate traffic that requires higher limits than the
default rate limit, you can request an increase.

To view usage and limits, go to the [**Quotas \& System Limits** section of the
Home API service](https://console.cloud.google.com/apis/api/home.googleapis.com/quotas)
in the Google Cloud project associated with your app's registration
in Developer Console.

To request an increase, edit a specific quota. See [Request a quota
adjustment](https://docs.cloud.google.com/docs/quotas/view-manage#requesting_higher_quota)
in the Google Cloud documentation for instructions.