Elevation API quick reference

The Elevation API is a web service that returns elevation data, in meters relative to local mean sea level, for one or more locations on the earth, or sampled elevation data along a path. Requests are HTTPS URLs and responses are JSON or XML.

Elevation API: key facts

  • Product: Elevation API
  • Category: Maps
  • Platform: Web service (REST)
  • Runs on: Server (backend code)
  • Launch stage: GA
  • Lifecycle: Active
  • Overview: Elevation API overview
  • Regional availability: Global. The Get started page says elevation data is available for all locations on the surface of the earth, including depth locations on the ocean floor, which return negative values. The docset has no coverage page.

Elevation API: when to use it

Use Elevation API when:

  • You need the elevation, in meters relative to local mean sea level, for one or more latitude/longitude points from a server.
  • You need an elevation profile sampled at equidistant points along a path, for example elevation gain and loss for hiking or biking.
  • You need ocean-floor depth or below-sea-level elevation values (returned as negative numbers).

Don't use Elevation API when:

  • You need elevation data client-side in a browser map; the Maps JavaScript API has its own ElevationService. Use Maps JavaScript API instead.

Elevation API: setup

Elevation API: common mistakes

  • Problem: When you pass several coordinates in one request, especially points that are far apart, the API may smooth the data and return less accurate elevations. The only sign is a larger resolution value; the response has no warning field or degraded-accuracy status. Fix: To get the most accurate elevation for a point, query that point by itself, and check the resolution field in each result. See /maps/documentation/elevation/requests-elevation.
  • Problem: More than 512 points or coordinates in the locations or path parameter returns INVALID_REQUEST. Fix: Split large point sets into batches of 512 or fewer. Use encoded polylines to keep URLs short. See /maps/documentation/elevation/requests-elevation.
  • Problem: Request URLs must be properly encoded and are limited to 16384 characters. Browsers, proxies, and servers can have lower limits. Fix: URL-encode parameters and use the enc: encoded polyline format for long coordinate lists. See /maps/documentation/elevation/requests-elevation.
  • Problem: The per-minute request limit is the sum of server-side Elevation API requests and client-side Maps JavaScript API ElevationService requests in the project. Fix: Plan quota for both client-side and server-side traffic, or request a quota increase. See /maps/documentation/elevation/usage-and-billing.

What you can do with Elevation API

See the guides linked below for each task, or compare across products in the Capabilities Explorer.