Page tree
Skip to end of metadata
Go to start of metadata

Use your API Key to authenticate with all Nearmap's HTTP-based services: WMSWMTSTMS and Image API. The API Key must be sent with every request to the service. 

The API key can be sent with the request using the apikey URL parameter or an HTTP Authorization header.

Using API Key in a URL

Include the apikey=YOUR_API_KEY name/value pair in the URL (replacing "YOUR_API_KEY" with the sequence of characters that make up your API Key).

Here are example URL formats using API Key for our WMS and TMS services, both for Australia and the US:

WMS

  • Australia & New Zealand: https://wms.nearmap.com/wms?REQUEST=GetCapabilities&apikey=YOUR_API_KEY
  • US: https://wmsus.nearmap.com/wms?REQUEST=GetCapabilities&apikey=YOUR_API_KEY

Tile API

  • All areas: https://api.nearmap.com/tiles/v3/Vert/21/1855981/1265938.jpg?apikey=YOUR_API_KEY

TMS

  • Australia & New Zealand: https://au0.nearmap.com/maps?x=120591&y=78650&z=17&nml=Vert&version=2&httpauth=false&apikey=YOUR_API_KEY 
  • US: http://us0.nearmap.com/maps?x=59899&y=107922&z=18&nml=Vert&version=2&httpauth=false&apikey=YOUR_API_KEY

See our Tile APIWMS, and TMS documentation for further examples for each of our APIs.

See our GIS and CAD Integration pages for specific instructions for various third-party GIS applications.


WMS Links

The Manage API Keys page of your Nearmap profile contains handy links to our WMS services containing your API Key. Click on the WMS links icon. The following screen will pop up:


Click on the Australia or United States button to copy the WMS link, including your API Key, to the clipboard. Paste it into your GIS application when prompted.

Note: New Zealand uses Australia WMS link.

Using API Key in an HTTP Authorization Header

The API Key can be presented in an HTTP Authorization header. The format of the header is as follows:


Authorization: Apikey YOUR_API_KEY


The case of the authorization type is significant: the string must be "Apikey" with a capital A and all other characters lowercase.

Here are example cURL commands for our TMS API:

  • Australia & New Zealand: 
    curl -vvv -H'Authorization:Apikey YOUR_API_KEY' 'http://au0.nearmap.com/maps?x=120591&y=78650&z=17&nml=Vert&version=2&httpauth=false'
  • US: 
    curl -vvv -H'Authorization:Apikey YOUR_API_KEY' 'http://us0.nearmap.com/maps?x=59899&y=107922&z=18&nml=Vert&version=2&httpauth=false'
  • No labels