Create a static map

The Static API is a great way to get an image of your map or even a specific zoom level of your map. You can get a static image of your Mapbox Studio style, Mapbox Editor or Mapbox Studio Classic style.

Want to learn about other ways to export your map as an image? Check out our Map image export options guide.

Heads up! You must add attribution whenever you use the Static API.

Mapbox Studio

You can create a static map from your Mapbox Studio style or a Mapbox template style using Mapbox Studio’s image export tool or by writing the API call manually.

Use the image export tool

Mapbox Studio has an interactive image export tool to help you generate a Static API call. From your Styles page, open the menu next to your desired style and click Generate static image.

Click generate static image from style's menu

Use the map to zoom in and out of the area you want to capture. You can also use the fields on the left to manually adjust the settings.

demonstration of image export tool

Once you have framed the area you want, copy the URL or HTML from the left-side panel. See Add static map to your website for next steps.

Use the Static API

You can get a static image of your map by formatting a URL with your specific values to make the request.

Here’s a breakdown of what the URL looks like and what the parameters mean:

See the Static API documentation for more information about available parameters and values.

Add static map to your website

You can use the Static API call that you wrote or copied from Mapbox Studio’s image export tool directly in your HTML:

<img src='https://api.mapbox.com/styles/v1/mapbox/streets-v9/static/-73.7638,42.6564,13/700x250?access_token=<your access token here>' width='700' alt='Map of Albany, NY'>

Here is what the result will look like:

Map of Albany, NY

Enable Retina

To enable a Retina static map, add @2x to your API call. If you’re using a Retina-enabled device, you should notice that the Retina example below is sharper than the example above:

<img src='https://api.mapbox.com/styles/v1/mapbox/streets-v9/static/-73.7638,42.6564,13/700x250@2x?access_token=<your access token here>' width='700' alt='Map of Albany, NY'>

Map of Albany, NY

When you request a Retina map with @2x, you will receive an image that’s twice the width and height that you’ve specified in your API call. For example, the Retina example above actually has a width of 1400px and a height of 500px. To take advantage of the sharp Retina image, we used a width attribute that’s half the size of the Retina image’s actual size (700px) in the example above.

Mapbox Studio Classic + Mapbox Editor

Note: Mapbox Editor has been deprecated. Your existing projects can be found here. For more information, see our announcement and guide to migrating a Mapbox Editor project.

You can create a static map from a map designed in Mapbox Studio Classic, Mapbox Editor, or a Mapbox map.

Check out the classic static API documentation to learn more about the API’s options including how to add GeoJSON data and markers.

Use the classic static API

You can get a static image of your map by formatting a URL with your specific values to make the request.

Here’s a breakdown of what the URL looks like and what the parameters mean:

See the classic static API documentation for more information about available parameters and values.

Add static map to your website

You can use your classic static API call directly in your HTML:

<img src='https://api.mapbox.com/v4/mapbox.streets/-73.7638,42.6564,13/700x250.png?access_token=<your access token here>' width='700' alt='Map of Albany, NY'>

Here is what the result will look like:

Map of Albany, NY

Enable Retina

To enable a Retina static map use @2x.png as the image extension in your API call. If you’re using a Retina-enabled device, you should notice that the Retina example below is sharper than the example above:

<img src='https://api.mapbox.com/v4/mapbox.streets/-73.7638,42.6564,13/700x250@2x.png?access_token=<your access token here>' width='700' alt='Map of Albany, NY'>

Map of Albany, NY

When you request a Retina map with @2x.png, you will receive an image that’s twice the width and height that you’ve specified in your API call. For example, the Retina example above actually has a width of 1400px and a height of 500px. To take advantage of the sharp Retina image, we used a width attribute that’s half the size of the Retina image’s actual size (700px) in the example above.

Additional questions? Ask our support team or learn more about How Mapbox Works.