---
title: "/height"
method: POST
path: "/height"
---

# /height

`POST /height`

Elevation at points or along a path

## Request body

- HeightRequest
  - `id` string
  - `shape` Location[] — Points at which to query elevation. Mutually exclusive with encoded_polyline.
    - `lat` number, required
    - `lon` number, required
    - `type` 'break' | 'through' | 'via' | 'break_through' — First and last location are always forced to `break`.
    - `name` string — Label echoed in the response.
    - `street` string — Street address hint for snapping.
    - `date_time` string — Per-location ISO 8601 datetime override, in the format `YYYY-MM-DDTHH:MM`, e.g. `2016-07-03T08:06`.
    - `heading` integer — Preferred approach heading in degrees.
    - `heading_tolerance` integer — How close in degrees a given street's angle must be in order for it to be considered as in the same direction of the `heading` parameter. The default value is service configuration dependent (60 by default).
    - `preferred_layer` integer — If set, edges whose layer does not match this value are discarded from candidate search. Note that this is a "soft" filter, meaning if no other candidates are found, Valhalla will fall back to including edges that did not match this filter.
    - `node_snap_tolerance` number — Snap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
    - `minimum_reachability` integer — Minimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively).
    - `radius` integer — Candidate search radius in meters: all viable edge candidates within the radius are correlated. If none are found, the best one outside the radius is correlated. The default is service dependent, and defaults to 0 (only the closest edge is considered as candidate). The max value is service configuration dependent (200 by default).
    - `search_cutoff` integer — Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
    - `rank_candidates` boolean — Rank snap candidates by distance to input.
    - `preferred_side` 'same' | 'opposite' | 'either' — Preferred side of road to snap to.
    - `display_lat` number — Latitude of the map location in degrees. If provided the `lat` and `lon` parameters will be treated as the routing location and the `display_lat` and `display_lon` will be used to determine the side of street. Both `display_lat` and `display_lon` must be provided and valid to achieve the desired effect.
    - `display_lon` number — Latitude of the map location in degrees. If provided the `lat` and `lon` parameters will be treated as the routing location and the `display_lat` and `display_lon` will be used to determine the side of street. Both `display_lat` and `display_lon` must be provided and valid to achieve the desired effect.
    - `street_side_tolerance` integer — If your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel. The default value is service configuration dependent (5 by default).
    - `street_side_max_distance` integer — The max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none. The default value is service configuration dependent (1000 by default).
    - `street_side_cutoff` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other'
    - `waiting` number — Waiting time in seconds at this stop (break/break_through only, not origin/destination).
    - `search_filter` SearchFilter — Optional filters to exclude candidate edges based on their attribution.
      - `min_road_class` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other'
      - `max_road_class` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other'
      - `exclude_tunnel` boolean — Whether to exclude roads marked as tunnels.
      - `exclude_bridge` boolean — Whether to exclude roads marked as bridges.
      - `exclude_toll` boolean — Whether to exclude roads marked as toll roads.
      - `exclude_ramp` boolean — Whether to exclude roads marked as ramps.
      - `exclude_ferry` boolean — Whether to exclude ferry routes.
      - `exclude_closures` boolean — When false, closed roads are allowed for this location.
      - `level` number — If specified, will only consider edges that are on or traverse the passed floor level. Useful for indoor routing. It will set `search_cutoff` to a default value of 300 meters if no cutoff value is passed. Additionally, if a `search_cutoff` is passed, it will be clamped to 1000 meters.
  - `encoded_polyline` string — Polyline6 (default) or polyline5 (with shape_format=polyline5) encoded shape.
  - `shape_format` 'polyline6' | 'polyline5' | 'geojson' | 'no_shape' — Not all formats are supported by all endpoints, e.g. `no_shape` is not valid for isochrone.
  - `range` boolean — Return cumulative distance alongside elevation values.
  - `height_precision` 0 | 1 | 2 — Decimal places in elevation values.
  - `resample_distance` number — Resample the shape at this interval in meters before querying elevation.

## Response `200`

Elevation result

## Other responses

- `400` — Request error
- `429` — Rate limit exceeded. The public service enforces a per-user limit of 1 request per second and a global limit of 100 requests per second. The body is nginx's default 429 HTML page.

---

[API](https://skmtc.dev/valhalla/apis/valhalla-routing-api.md) · [All operations](https://skmtc.dev/valhalla/apis/valhalla-routing-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/valhalla/valhalla-routing-api/revisions/6421ffddcddb/schema)
