API rate limits

API rate limits define the number of requests that can be made to the Compute Engine API. API rate limits apply on a per-project basis. When you use gcloud compute or the Google Cloud Console, you are also making requests to the API and these requests count towards your API rate limit. If you use service accounts to access the API, that also counts towards your rate limit.

Rate limits are enforced and automatically refilled at intervals of every 100 seconds. For example, a rate limit of 20 requests/second would translate to 2000 requests within 100 seconds. That means that if you reach a specific limit anytime within 100 seconds, you need to wait for your quota bucket to refresh to make more requests. If you exceed the rate limit for an interval, you receive a 403 error with the error message rateLimitExceeded. To resolve this error, wait a minute and try your request again—your request should succeed once you have passed that interval.

Currently, projects are limited to the following API rate limit categories. Each limit category is counted separately, so you can achieve the maximum limit in each category simultaneously.

  • Queries - Default limits for any unlisted methods:
    • Rate per project: 20 requests/second
    • Rate per user: 20 requests/second
  • Read requests - Limits for *.get methods:
    • Rate per project: 20 requests/second
    • Rate per user: 20 requests/second
  • List requests - Limits for *.list methods:
    • Rate per project: 20 requests/second
    • Rate per user: 20 requests/second
  • Operation read requests - Limits for globalOperations.get, globalOrganizationOperations.get, regionOperations.get, and zonalOperations.get methods:
    • Rate per project: 20 requests/second
    • Rate per user: 20 requests/second
  • Heavy-weight read requests - Limits for *.aggregatedList methods:
    • Rate per project: 10 requests/second
    • Rate per user: 10 requests/second
  • Heavy-weight mutation requests Limits for patch, delete, and insert methods for the interconnects and interconnectAttachments resources:
    • Rate per project: 10 requests/second
    • Rate per user: 10 requests/second
  • Instance SimulateMaintenanceEvent requests - Limits for *.simulateMaintenanceEvent methods:
    • Rate per project: 2 requests/second
    • Rate per user: 2 requests/second
    • Rate per day per project: 30 requests/day
  • License insert requests - Limits for licenses.insert method:
    • Rate per project: 2 requests/second
    • Rate per user: 2 requests/second
  • Global resource mutation requests - Limits for disks.createSnapshot, snapshots.delete, snapshots.setLabels, images.insert, images.delete, images.deprecate, images.setLabels, machineImages.insert, and machineImages.delete methods:
    • Rate per project: 5 requests/second
    • Rate per user: 5 requests/second
  • Project set common instance metadata requests - Limits for projects.setCommonInstanceMetadata method:
    • Rate per project: 0.5 requests/second
    • Rate per user: 0.5 requests/second

Follow the Compute Engine API best practices for preserving API rate limits to mitigate the effects of API rate limits.

If you need a higher rate limit for API requests, you can review the current use and request an increase via the Compute Engine API Quotas page in the Google Cloud Console. Learn more about quotas.