Could someone let me know how I add a API key to QGIS 2.14.10. The diagonal API key required is still on my map layer. Bit of a novice on QGIS.


I guess you are using the QOSM plugin to display the OpenCycleMap, since the standard OSM map does not have API keys.

You can obtain an API key from the map producer Thunderforest. They provide details here, including a sample tile request URL. You can add that to the properties of the QOSM layer, inserting the line


and clicking on Add Custom Type. Take care of the grammar for the variables that differs from the linked site.


Alternatively, you can use the QuickMapServices plugin, go to Settings, Add/Edit/Remove, My services, upper right icon (Create service from existing) , select OSM TF Landscape, go to the TMS panel, and edit the URL as above.

  • QuickMapServices works like a charm! Find the menu under "Web" the same as "OpenLayersPlugin". May 19 '17 at 4:41
  • @AndreJ, please, can you specify where exactly to insert the line with my API key "http://.."? When I open Properties of OSM layer (left click on the layer in the Layer Panel), there is no option to insert the specified line. Thank you!
    – maycca
    May 1 '18 at 18:15
  • 1
    @maycca in the QOSM plugin, go to the settings, Custom Tile Types. With QMS, you have to create a new custom tile provider.
    – AndreJ
    May 2 '18 at 5:56
  • I recently went through this again and I found I had to remove the a. at the start of the url before it would work. The urls I got from thunderforest were https://{s}.title... QGIS did not cope with https (unknown protocol!) and until I removed the {s}. they seemed to load an empty layer. what I have now is tile.thunderforest.com/landscape/${z}/${x}/${y}.png?apikey=<insert-your-apikey-here> Oct 31 '18 at 23:56
  • @AndreJ there is no such option in the plug in setting. I have an API key from the Thunderforest website but is not clear to me where to enter it. Jan 5 '20 at 19:29

A very similar question was also answered here.

Again, if you are using the OpenLayers Plugin, this should work:

  1. If necessary, update OpenLayers Plugin to at least version 1.4.2
  2. Web > OpenLayer plugin > OSM/Thunderforest > Set API Key
  3. Enter API Key and confirm with OK
  4. Add the OSM layer from the OSM/Thunderforest menu again (previous layer(s) will not update even with API key entered)

PS: As already mentioned earlier, API keys are available for free from http://www.thunderforest.com/docs/apikeys/

  • 1
    OpenLayers doesn't seem to be a plugin in QGIS3. I think it's functionality was rolled into the QuickMapServices plugin, which has different configuration menus than explained above. See gis.stackexchange.com/questions/272778/…
    – Dave X
    Mar 11 '19 at 14:54
  • Indeed, it was replaced by core functions or QuickMapServices. Even better, I would say (this thing with the API key is imo kinda annoying, as the OSM layers are anyway public property). Still, on my QGIS 3.10.5-A Coruña the functionality is still there; looks like it just remained there with the last updates and I didn't even notice any change. :) May 11 '20 at 17:34

It isn't the QuickOSM plugin in QGIS3, or the Web/QuickMap Services/OSM/... menu, but with base QGIS3, under the Browser panel, you can add the apikey services as XYZ Tiles raster maps:

1) Right click Browser/XYZ Tiles 2) Choose "New Connection" 3) Add a descriptive name. E.g.: "OSM Landscape" 4) Add a URL with api key E.g.: https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=3333333e97ba38423f5bef103f39bdb3

Then you can add your new layer to your projects by working through the Layer Browser / XYZ Tiles/ Add Layer To Project.

If you are getting diagonal 'API Key Required' watermarks on your OSM layer with a 'TF ...' prefix, it's likely an add-on to a raster layer as delivered by the OSM's tileservice delivered by ThunderForest. See http://www.thunderforest.com/docs/apikeys/ for some details. I'm not sure how to reconfigure QGIS3's Web/QuickMapServices/OSM to use a Thunderforest API Key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.