MapTiler API key and where to get it
An API key is one of the authentication methods that enables you to use our maps and access various services via our API. In practice, an API key is a string of letters and numbers in unique combinations, so that it makes clear identification of map and service requests possible.
Example of an API request authenticated with an API key:
https://api.maptiler.com/maps/{{site.map-styles.streets}}/?key=YOUR_MAPTILER_API_KEY_HERE#1.0/0.00000/0.00000
If you replace YOUR_MAPTILER_API_KEY_HERE with a valid API key and paste the URL in your browser’s address bar, you’ll see the map. If you don’t provide a key, the request won’t work because it’s not identified.
Get your API key
To get your MapTiler API key, make sure you’re logged in to your MapTiler account. Then follow these steps:
- Go to page API keys.
- Next to the key you want to use, click Edit. (If there’s no key yet, click New key to create one.)
- Secure the key with one of the available protection methods.
- Save your changes to an existing key, or confirm creation of a new key.
Your key is now protected and you can review or copy it anytime from the API keys page.
Idea
To see how many API keys you can create, go to Account > Settings > section Usage > Keys. If you need more keys, please contact our Sales.
Why secure your key
Newly created API keys have no protection. If you use an unprotected key publicly, it might get stolen and misused. The thief cannot change or break your maps, because the API calls are read-only, but their usage counts towards your API request quota and can lead to extra costs (if you’re on a paid plan) or suspending your maps.
Make sure to only use an unprotected API key for testing or in backend systems where general public can’t access it. For production use on frontend or in mobile apps, always secure the key.
Best practices
- Use a separate key per application. This makes it easy to replace the key if it gets compromised without affecting other apps.
- Create a separate API key per map. This makes it possible to accurately track the map traffic in your analytics.
- If you have access to the application’s code, it’s highly recommended to regularly rotate the keys for extra security.