Static Maps API Reference
Base URL
https://staticmap.maptoolkit.net
Endpoints
GET /
Render a static map image
Renders a static map image from query parameters. At minimum size and either center+zoom or bounds/bbox (or at least one overlay feature) must be provided.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
api_key | query | string | Yes | API key for authentication. |
size | query | string | Yes | Output image dimensions as {width}x{height}. Maximum 4096x4096 pixels. |
center | query | string | No | Map center as {lat},{lng}. |
zoom | query | number | No | Zoom level (0–20). |
bounds | query | string | No | Bounding box as {minlat},{minlng},{maxlat},{maxlng}. |
bbox | query | string | No | Bounding box as {minlng},{minlat},{maxlng},{maxlat} (GeoJSON order). |
style | query | string | No | Style ID or inline Mapbox GL style JSON. Defaults to maptoolkit-maptoolkit.summer. |
maptype | query | string | No | Deprecated. Use style instead. |
format | query | string | No | Output image format. Default: png. One of: png, jpeg, webp. |
ratio | query | integer | No | Pixel density multiplier (1 = standard, 2 = retina, 4 = ultra-high-DPI). Default: 1. One of: 1, 2, 4. |
factor | query | integer | No | Deprecated. Use ratio instead. One of: 1, 2, 4. |
credits | query | string | No | Attribution overlay name. Default: osm. |
attribution | query | string | No | Set to false to suppress the attribution overlay. One of: false. |
exptime | query | integer | No | Cache TTL in seconds. -1 bypasses the cache. Default: 7200. |
delta_zoom | query | integer | No | Integer offset added to the resolved zoom level. |
states | query | string | No | State filter forwarded to the style URL template. |
marker | query | No | Marker overlay. Pipe-delimited: center:{lat},{lng}|icon:{url}|anchor:{center|bottom}. Repeat for multiple markers. | |
path | query | No | Polyline overlay. Pipe-delimited: points:{lng1},{lat1}|{lng2},{lat2}|...|width:{px}|color:{RRGGBBAA}. Repeat for multiple paths. | |
geojson | query | No | GeoJSON geometry overlay. Pipe-delimited: geometry:{GeoJSON}|width:{px}|color:{RRGGBBAA}. Repeat for multiple overlays. | |
kml | query | No | URL of a KML file to overlay. Repeat for multiple files. | |
path_icons | query | string | No | Directional icons along paths. true for defaults, or icon:{name}|size:{scale}|spacing:{px}. |
marker_z_order | query | string | No | Z-order strategy for marker rendering. Default: auto. One of: source, auto. |
debug | query | boolean | No | Enables server-side timing logs. |
| Status | Description |
|---|---|
200 | Successfully rendered map image. |
400 | Bad request. Possible error messages: Parameter validation errors:
Coordinate validation errors:
Feature validation errors:
External resource errors:
Timeout errors:
|
POST /
Render a static map image (POST)
Same rendering logic as GET / but accepts parameters in the request body. Useful when query strings would exceed URL length limits (e.g. large GeoJSON payloads). The api_key must still be passed as a query parameter.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
api_key | query | string | Yes | API key for authentication. |
| Status | Description |
|---|---|
200 | Successfully rendered map image. |
400 | Bad request. Possible error messages: Parameter validation errors:
Coordinate validation errors:
Feature validation errors:
External resource errors:
Timeout errors:
|
Try it
The console below sends live requests against the endpoints above. You can browse it
without an API key; Execute needs one, because every endpoint requires the api_key
query parameter and returns 403 without it. Use Authorize to add your key. See
First Steps if you do not have one yet.