Raster Tiles API
The Mapbox Raster Tiles API serves raster tiles generated from satellite imagery tilesets and tilesets generated from raster data uploaded to Mapbox.com.
Retrieve raster tiles
get
https://api.mapbox.com/v4/{tileset_id}/{zoom}/{x}/{y}{@2x}.{format}
Required parameters | Type | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tileset_id | string | Unique identifier for the raster tileset in the format username.id . To composite multiple tilesets, use a comma-separated list of up to 15 tileset IDs. | ||||||||||||||||||||||
zoom | integer | Specifies the tile's zoom level, as described in the Slippy Map Tilenames specification. | ||||||||||||||||||||||
{x}/{y} | integer | Specifies the tile's column {x} and row {y} , as described in the Slippy Map Tilenames specification. | ||||||||||||||||||||||
format | string | Specifies the format of the returned tiles:
format of any image request can be replaced by any of these formats to adjust image quality for different bandwidth requirements. Higher-compression formats like jpg70 or png32 can be useful to favor performance over image quality.Note: Tiles that include mapbox.satellite are always delivered as JPEGs, even if the URL specifies PNG. The PNG format can't efficiently encode photographic images like those used by mapbox.satellite .Note: Some tilesets may display a black background in older browser versions but not in newer browser versions. This is because many modern browsers support the WebP image format. For more information see Troubleshoot raster image with black background. |
Optional parameters | Type | Description |
---|---|---|
@2x | string | Request a higher DPI version of the image. |
Example request: Retrieve raster tiles
# Retrieve a 2x tile; this 512x512 tile is appropriate for high-density displays
$curl "https://api.mapbox.com/v4/mapbox.satellite/1/0/0@2x.jpg90?access_token=YOUR_MAPBOX_ACCESS_TOKEN"
Response: Retrieve raster tiles
The response is a raster image tile in the specified format. For performance, image tiles are delivered with a max-age
header value set 12 hours in the future.
Raster Tiles API errors
Response body message | HTTP status code | Description |
---|---|---|
Not Authorized - No Token | 401 | No token was used in the query. |
Not Authorized - Invalid Token | 401 | Check the access token you used in the query. |
Forbidden | 403 | There may be an issue with your account. Check your Account page for more details. In some cases, using an access tokens with URL restrictions can also result in a 403 error. For more information, see our Token management guide. |
Tileset {tileset name} does not exist | 404 | Check the name of the tileset you used in the query. |
Tile not found | 404 | Check the column and row of the tile requested in the query. |
Zoom level must be between 0-30. | 422 | The zoom level specified in the query is larger than 30 or contains non-numeric characters. |
Invalid quality value {value} for raster format {jpg/png} | 422 | The format specified in the query must be one of the formats listed in the Retrieve raster tiles section of this documentation. |
Raster Tiles API restrictions and limits
- The default rate limit for the Mapbox Raster Tiles API endpoint is 100,000 requests per minute. もし、レート制限をの数を高くしたい場合は、お問い合わせください。.
- If you exceed the rate limit, you will receive an
HTTP 429 Too Many Requests
response. For information on rate limit headers, see the Rate limit headers section. - Responses from the Raster Tiles API set default Cache-Control headers to
max-age=43200,s-maxage=300
, or a device cache TTL of 12 hours and a CDN cache TTL of 5 minutes. New tileset data is cached for up to a further 5 minutes on the backend as well. - If you composite multiple tileset IDs, the API request will have the cache time of the tileset with the highest
s-maxage
value. - For general information on caching, see the Maps APIs caching troubleshooting guide.
Raster Tiles API pricing
- requests ごとに請求されます
- 料金ページの Maps セクションで、tile requests ごとの料金と割引をご確認ください。
Usage of the Raster Tiles API is measured in tile requests. Details about the number of tile requests included in the free tier and the cost per request beyond what is included in the free tier are available on the pricing page.
このpageは役に立ちましたか?