Google Maps Elevation API: Excel Example

When working with geospatial data on Google Earth (for example, from our AEREarth tool), you might need the elevations for some coordinates. If it’s only a handful, they’re easily found with Google Earth’s interface. But let’s say you want elevations for dozens, hundreds, or even thousands of locations.

Requesting the data directly from Google Maps’ Application Programming Interface (API) is an enormous shortcut. Google Maps lets you query elevations at up to 512 point locations at a time. Before you can get started though, you will need to set up an API key.

The next step is formatting your coordinates and placing that API key into a web address (or URL). Building a URL of that length can be maddening, so we made an Excel workbook for formatting it. Here’s a how-to for using this tool:

  1. Download the Air Sciences .xlsx file.
  2. Insert your own API key in the workbook (cell C12).
  3. Paste your latitude coordinates (in column C starting at cell C19) and longitude coordinates (in column D starting at cell D19). 
  4. View the web address populated by the formula in cell A1.
  5. Copy the web address from cell A1 into your browser’s address bar. Firefox works best as you can save the output as JSON
  6. Wait for the data to load and receive your elevation dataset in a JSON format. Then, save as a JSON file from Firefox, which you may import directly into Excel.

If you prefer to flex your coding skills, please see our post about using Python with the Google Maps Elevation API. There you’ll find blocks of reusable code to get you started!

Leave a Reply

Learn more, experience the Air Sciences difference:

Download the Tool

To download the Google Maps Elevation Tool, please use the form: