Tiles docs

Keys and limits

API keys and allowed origins for tiles, the monthly tile allowance per plan, the per-visitor tile rate limit, and the error codes of the tile API.

By · Updated

Tiles use the same keys, plans and errors as the geocoding API. Tile requests count against their own monthly allowance (India tile set today; planet tiles in development), separate from geocoding.

Keys

KindPrefixUse for tiles
Publishablegc_pk_Web maps. Answers only the origins listed on the key
Secretgc_sk_Servers and scripts, for example a tile cache or a print renderer

A browser sends the Origin (or Referer) header on tile requests, so a publishable key in a TileJSON or tile URL works with no extra code. A publishable key with no allowed origins answers nothing. Details: API keys.

Monthly allowances

PlanPriceMap tiles a monthGeocoding requests a month
Free$0200,00050,000
Starter$19/month2,000,000500,000
Growth$99/month10,000,0002,500,000
Scale$299/month30,000,0007,500,000

Each tile response counts once. TileJSON requests are not counted. Over the allowance, tile requests stop with 429 quota_exceeded and error.product tiles until the month (UTC) ends or you upgrade; there are no overage charges. Every tile answer carries X-Quota-Product: tiles, X-Quota-Limit and X-Quota-Remaining.

The allowance is per account: all projects and keys of the account share it. Free accounts together also share a daily ceiling; when it is used up, free tile requests stop for the rest of the UTC day with quota_exceeded and error.reason free_daily_ceiling.

Rate limits

RequestsLimit
Tiles and TileJSON with a publishable key20 a second per visitor (the key and the visitor's IP address)
Tiles and TileJSON with a secret key or OAuth tokenThe plan's rate per key: Free 10, Starter 25, Growth 50, Scale 100 a second

Every visitor of a web page shares its publishable key, so tile requests from a publishable key are limited per visitor, not per key. A map view asks for about 30 tiles at once; 20 a second holds two of the largest map sessions measured. Over the limit, the answer is 429 rate_limited with Retry-After: 1.

Errors

Errors are JSON with a stable code:

{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded (20 tile requests per second per visitor)."
  }
}
StatusCodeWhen
400tile_errorx or y is out of range for z
401missing_api_keyNo key or token
401invalid_api_keyMalformed, unknown or revoked key
403origin_not_allowedPublishable key from an origin it does not list
404not_foundUnknown tile set
429rate_limitedOver the per-second rate
429quota_exceededThe monthly tile allowance is used up (error.product is tiles)

An empty tile is not an error: it answers 204 No Content.