API reference/Core Maps, Search & Routing
GETstatelesslegacy-source evidence

Routing API

/{REST_KEY}/{resources}/{profile}/{geopositions}

Routing and displaying driving directions on map, including instructions for navigation, distance to destination, traffic etc. are few of the most important parts of developing a map based application. This REST API calculates driving routes between specified locations including via points based on route calculation type(optimal or shortest). Please note that maximum number of points are limited to 100 only including source and secondary positions. Live Demo | Download Sample Code

Legacy contract evidence

This operation was normalized from a MapmyIndia-generation specification. Validate its current Mappls host, path, package entitlement, authentication generation, and commercial availability before production use.

Call the operation

GEThttps://apis.mapmyindia.com/advancedmaps/v1/YOUR_REST_KEY/route_eta/driving/28.612964%2C77.229463
Base URLhttps://apis.mapmyindia.com/advancedmaps/v1
Authenticationnot declared
Journey rolerequest response
Content typesNo request body

Parameters

NameLocationTypeDescriptionExample
REST_KEYrequired
pathstring

The REST API licence key allocated to you by signing into our services and registering yourself as a developer.

YOUR_REST_KEY
resourcesrequired
pathstring

The different resources available within MapmyIndia Routing API. These resources have their own individual allocations and not all are allocated for evalulations be default. For allocating particular resource on your API credentials, please contact apisupport@mapmyindia.com Table 1. Resources Element Value Description Resources routeadv to calculate a route & its duration without considering traffic conditions. routeeta to get the updated duration of a route considering live traffic; Applicable for India only “region=ind” and “rtype=1” is not supported. This is different from routetraffic ; this resource balances between a preferred path and aggressive traffic congestion avoidance. routetrafAllowed: route_adv · route_eta · route_traffic

route_eta
profilerequired
pathstring

The different profiles available within MapmyIndia Routing API. These profiles have their own individual transport modes and not all are allocated for evalulations be default. For allocating particular profiles on your API credentials, please contact apisupport@mapmyindia.com Table 2. Profiles Element Value Description Profiles driving Meant for 4-wheeler/passenger car routing. biking Meant for two-wheeler routing. Routing with this profile is restricted to routeadv only. region & rtype request parameters are not supported in two-wheeler routing. walking Meant for pedestrian routing. Routing with this profile is restricted to routeadv only. region & rtype request parameters are not supportedAllowed: driving · biking · walking · trucking

driving
geopositionsrequired
pathstring

geopositions(part of URL) are either: pair of comma separated longitude & latitude values OR eLoc(s). First geoposition will be consider as start point (mandatory); a last geoposition will be considered as end point (mandatory) and those in between are via points (optional). {longitude1},{latitude1};{longitude2},{latitude2};eLoc1;eLoc2; ... (part of URL).

28.612964,77.229463
geometries
querystring

This parameter used to change the route geometry format/density (influences overview and per step).Allowed: polyline · polyline6 · geojson

polyline
rtype
queryinteger

type of route (integer) required for navigation, where values mean: 0 optimal (default) 1 shortest (it will calculate route by excluding access penalties like private roads, etc.)Allowed: 0 · 1

0
steps
queryboolean

Return route steps for each route leg. Possible values are true/false. By default it will be used as false.Allowed: true · false

true
exclude
querystring

Additive list of road classes to avoid, order does not matter. Possible values are toll, motorway & ferry. Multiple values can be sent separated by comma.

ferry
region
querystring

This parameter is optional for India; for other countries (such as Sri Lanka, Nepal, Bangladesh, Bhutan + many more) this parameter is mandatory. Possible values are listed in a table here.

IND
bearings
queryinteger

Limits the search to segments with given bearing in degrees. The referencing will be to the true north and in clockwise direction. (Part of premium offering)

180
alternatives
queryinteger

Search for alternative routes. Passing a number: e.g. alternatives=n searches for up to n alternative routes. Please note that even if alternative routes are requested, a result cannot be guaranteed.

2
radiuses
querystring

Limits the search to given radius in meters. For all way-points including start and end points. {radius};{radius}[;{radius} ...]. (Part of premium offering)

100;100
overview
querystring

Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all. Possible values are simplified (default), full , false . (Part of premium offering)Allowed: simplified · full · false

simplified

Build your request in eight languages

Change source-backed examples once, validate required inputs, and copy the synchronized cURL, JavaScript, Python, Java, C#, Go, PHP, or Ruby request. Credentials remain environment references, and this page never sends a provider request.

Local request composerCode stays local · fixtures are explicit
GETRequest inputs
12 editable · 1 protected
Generated in eight languages
Environment-backed credentials
GEThttps://apis.mapmyindia.com/advancedmaps/v1/${MAPPLS_REST_KEY}/route_eta/driving/28.612964%2C77.229463?geometries=polyline&rtype=0&steps=true&exclude=ferry&region=IND&bearings=180&alternatives=2&radiuses=100%3B100&overview=simplified
Credential-free sandboxExecute this contract without a provider call
How fixtures work
Generated from your inputs
curl --request GET \
  --url "https://apis.mapmyindia.com/advancedmaps/v1/${MAPPLS_REST_KEY}/route_eta/driving/28.612964%2C77.229463?geometries=polyline&rtype=0&steps=true&exclude=ferry&region=IND&bearings=180&alternatives=2&radiuses=100%3B100&overview=simplified" \
  --header "Accept: application/json"

Credential-safe by constructionSet MAPPLS_REST_KEY only in your trusted runtime. Code generation stays local. Sandbox execution sends only bounded fixture inputs to this developer platform and never reads a credential or calls Mappls.

Send a production-shaped request

Examples use environment-backed access tokens, explicit timeouts where supported, status checks, and JSON bodies derived from the source schema. Replace sample identifiers and coordinates with values from your application.

GET /{REST_KEY}/{resources}/{profile}/{geopositions}
curl --request GET \
  --url 'https://apis.mapmyindia.com/advancedmaps/v1/YOUR_REST_KEY/route_eta/driving/28.612964%2C77.229463'

Responses

200

OK

204

Not found

400

Bad request

401

API access denied

403

Forbidden

500

Something went wrong

503

Internal server error

200 response fields

FieldTypeDescriptionExample
routesrequired
array<object>

No field description in the source contract.

example
routes[].legsrequired
array<object>

No field description in the source contract.

example
routes[].legs[].stepsrequired
array<object>

No field description in the source contract.

example
routes[].legs[].steps[].weightrequired
number

Parameter for internal purpose only.

2282.2
routes[].legs[].steps[].distancerequired
number

The distance of travel in the leg, in float meters.

2282.2
routes[].legs[].steps[].durationrequired
number

The estimated travel time in the leg, in float number of seconds.

252.4
routes[].legs[].steps[].geometryrequired
number

The un-simplified geometry of the step segment, depends on the given geometries request parameter. Geometry information is NOT available in most use-case driven response; and is RESTRICTED.

28.612964,77.229463
routes[].legs[].steps[].intersectionsrequired
array<object>

A list of Intersection objects(1) that are passed along the segment, the very first belonging to the StepManeuver(2). Note: An intersection gives a full representation of any cross-way the path passes bay. For every step, the very first intersection (intersections[0]) corresponds to the location of the StepManeuver. Further intersections are listed for every cross-way until the next turn instruction. An object type representing maneuver.

example
routes[].legs[].steps[].intersections[].locationrequired
array<string>

longitude, latitude pair describing the location of the intersection.

28.612964,77.229463
routes[].legs[].steps[].intersections[].classesrequired
array<string>

Categorised types of road segments e.g. Motorway

["motorway"]
routes[].legs[].steps[].intersections[].bearingsrequired
array<integer>

A list of bearing values (e.g. [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection.

[60,210,240]
routes[].legs[].steps[].intersections[].entryrequired
array<boolean>

A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction.

[false,true,true]
routes[].legs[].steps[].intersections[].inrequired
integer

index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the direction of travel immediately before the maneuver/passing the intersection. Bearings are given relative to the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for depart maneuvers.

0
routes[].legs[].steps[].intersections[].outrequired
integer

index into the bearings/entry array. Used to extract the bearing just after the turn. Namely, The clockwise angle from true north to the direction of travel immediately after the maneuver/passing the intersection. The value is not supplied for arrive maneuvers.

2
routes[].legs[].steps[].intersections[].lanesrequired
array<object>

Array of Lane objects that denote the available turn lanes at the intersection. If no lane information is available for an intersection, the lanes property will not be present.

example
routes[].legs[].steps[].driving_siderequired
number

“Left” (default) for India, Sri Lanka, Nepal, Bangladesh & Bhutan.

left
routes[].legs[].steps[].namerequired
string

The name of the way along which travel proceeds.

Safdar Hashmi Marg
routes[].legs[].steps[].moderequired
string

signifies the mode of transportation; driving as default.

driving
routes[].legs[].steps[].maneuverrequired
object

No field description in the source contract.

example
routes[].legs[].steps[].maneuver.locationrequired
array<string>

A [longitude, latitude] pair describing the location of the turn.

28.612964,77.229463
routes[].legs[].steps[].maneuver.bearing_beforerequired
integer

The clockwise angle from true north to the direction of travel immediately before the maneuver.

357
routes[].legs[].steps[].maneuver.bearing_afterrequired
integer

The clockwise angle from true north to the direction of travel immediately after the maneuver.

254
routes[].legs[].steps[].maneuver.modifierrequired
string

An optional string indicating the direction change of the maneuver. To see the complete list of modifiers, please see article in wiki.

left
routes[].legs[].steps[].maneuver.typerequired
string

A string indicating the type of maneuver. New identifiers might be introduced without API change. Types unknown to the client should be handled like the ‘turn’ type, the existence of correct modifier values is guaranteed. To see the complete list of types, please see article in wiki.

turn
routes[].legs[].summaryrequired
number

Parameter for internal purpose only.

Patel Road, Bhagwan Mahavir Marg
routes[].legs[].weightrequired
number

Parameter for internal purpose only.

2282.2
routes[].legs[].distancerequired
number

The distance of travel in the leg, in float meters.

2282.2
routes[].legs[].durationrequired
number

The estimated travel time in the leg, in float number of seconds.

252.4
routes[].weight_namerequired
number

Parameter for internal purpose only.

routability
routes[].geometryrequired
number

Returns the whole geometry of the route as per given geometries request parameter. Default is encoded polyline with 5 digit accuracy (1e5) for positional coordinates. Geometry information is NOT available in most use-case driven response; and is RESTRICTED.

28.612964,77.229463
routes[].weightrequired
number

Parameter for internal purpose only.

2282.2
routes[].distancerequired
number

The distance of travel, in float meters.

2282.2
routes[].durationrequired
number

The estimated travel time, in float number of seconds.

252.4
waypointsrequired
array<object>

No field description in the source contract.

example
waypoints[].hintrequired
string

Unique internal identifier of the segment (ephemeral, not constant over data updates) This can be used on subsequent request to significantly speed up the query and to connect multiple services. E.g. you can use the hint value obtained by the nearest query as hint values for route inputs.

bEADgP___39tAAAA6QAAAChAAAB4CAAASdEuQaohRUHInMxEeg6MQwYAAAANAAAArAMAAHwAAADoAAAAiu2YBNCsswFz7ZgE3ayzAQ8AXw3Mm4K5
waypoints[].namerequired
string

Name of the street the coordinate snapped to.

Delhi Gurgaon Expressway
waypoints[].distancerequired
number

distance to snapped location from actual location.

4.033839
waypoints[].locationrequired
array<string>

longitude, latitude pair describing the snapped location of the waypoint.

28.612964,77.229463
coderequired
string

if request is successful, response is ‘ok’. Else, see the service dependent and general status codes as available in the enum. In case of error, “NoRoute” code is supported (in addition to the general ones) which means “no route found”. Ok : Request could be processed as expected. InvalidUrl : URL string is invalid. InvalidService: Service name is invalid. InvalidVersion : Version is not found. InvalidOptions : Options are invalid. InvalidQuery : The query string is synctactically malformed. InvAllowed: Ok · InvalidUrl · InvalidService · InvalidVersion · InvalidOptions · InvalidQuery · InvalidValue · NoSegment · TooBig · NoRoute

Ok
Serverrequired
string

Gives Information on active service's server.

ETA-5100
Response example
{
  "routes": [
    {
      "legs": [
        {
          "steps": "example",
          "summary": "Patel Road, Bhagwan Mahavir Marg",
          "weight": 2282.2,
          "distance": 2282.2,
          "duration": 252.4
        }
      ],
      "weight_name": "routability",
      "geometry": "osgmDutwuMjA~@vEfGx@X~RlXLnAhGbJfHjQzBxDb@jEpAj@nAFt@`A?fAQn@aDbBcAhBmChQ",
      "weight": 2282.2,
      "distance": 2282.2,
      "duration": 252.4
    }
  ],
  "waypoints": [
    {
      "hint": "bEADgP___39tAAAA6QAAAChAAAB4CAAASdEuQaohRUHInMxEeg6MQwYAAAANAAAArAMAAHwAAADoAAAAiu2YBNCsswFz7ZgE3ayzAQ8AXw3Mm4K5",
      "name": "Delhi Gurgaon Expressway",
      "distance": 4.033839,
      "location": [
        77.113089,
        28.544643
      ]
    }
  ],
  "code": "Ok",
  "Server": "ETA-5100"
}

Operate it safely

request-response

This operation is evaluated independently from the request. Cache and retry according to its documented semantics.

Keep credentials and raw tokens out of source, client bundles, prompts, and logs.Record the operation ID, status, latency, retry count, and source contract version in traces.Classify 4xx responses before retrying; back off and add jitter for retryable 5xx or transport failures.Cache only when request inputs, authorization scope, and freshness requirements permit it.

Contract provenance

Source file
contenthub/dochub/mapmyindia-rest-api/docs/custom/routing.yml
SHA-256
efefba560f229b668f0c6025b18c9d37b34e1e4582023b2e9d1149c6f3e34bfa
Normalization
Fields are parsed from OpenAPI. Operational guidance and language samples are generated and labeled separately.