Skip to content

Street Route

Overview

The Street Route Cloud API provides a convenient online solution for retrieving the distance (measured in miles or kilometers) and estimated driving duration between two sets of latitude and longitude coordinates.

You can use Street Route to:

  • Find the distance and general drive time between two points
  • Create a ‘Find the Nearest Location’ tool.
    • Using a database of ‘known / owner destinations’, Street Route can be used to compare a starting point location to the database to return all the route distances and drive times to the possible destinations, which can be queried by the user to present the shortest distance or travel time to the end user.
  • Determine geolocations which our data sources tell us cannot be reached by vehicle travel.
    • This differentiates Street Route from other distance solutions which return ‘As the crow flies’ distances. Examples are geo points to islands, or rural off road residences.

Documentation

Useful Resources

Product Page

Support Center

Download OpenAPI description
Languages
Servers
Street Route Server
https://streetroute.melissadata.net/v1/WEB/StreetRoute/

Distance Retriever

Use this endpoint to find the distance and general drive time between two points.

Operations

Multipoint Distance Retriever

Use this endpoint to find the distance and general drive time between a start point and destination point with one or more waypoints. getDistanceMultipoint is currently available only as a GET request.

Operations

Get distance with one or more points

Request

Uses HTTP GET to accept one input record and returns the response in JSON format.

Query
idstring(password)required

License Key - The License Key issued by Melissa.

Example: id={REPLACE-WITH-YOUR-LICENSE-KEY}
optstring

Options - List options in the following format, with multiple options delimited with a ,. For example: optionName:parameter,optionName:parameter. These options are case-sensitive and camel case.

  • arriveAt:< yyyy-mm-ddThh:mm:ss.mmmZ > - Specify the arrival time ISO 8601 UTC.

  • avoid:< borderCrossings | ferries | tollRoads | tunnels | unpavedRoads > - Specify the types of transport obstacles to avoid.

  • departAt:< yyyy-mm-ddThh:mm:ss.mmmZ | now > - Specify the departure date and time in ISO 8601 UTC. Default is now - departs immediately.

  • routeType:< eco | fastest | shortest | thrilling > - Specify the type of route.

    • eco - Balances travel time and fuel efficiency.
    • fastest - Optimizes for fastest travel time.
    • shortest - Optimizes for shortest travel distance.
    • thrilling - Optimized for challenging, hilly, or winding routes.
  • traffic:< false | true > - Considers current traffic conditions. Default is true.

  • travelMode:< bicycle | car | pedestrian > - Specify the type of vehicle used for the travel mode. Default is car.

  • vehicleCommercial:< false | true > - Indicates if the vehicle is a commercial vehicle. Default is false.

  • vehicleHeight:< [float] | 0 > - Specifies the vehicle height in meters. There are no height restrictions. Default is 0.

  • vehicleLength:< [float] | 0 > - Specifies the vehicle length in meters. Default is 0.

  • vehicleMaxSpeed:< [integer] | 0 > - Specifies the maximum vehicle speed in km/hr. Default is 0.

  • vehicleWeight:< [integer] | 0 > - Specifies the vehicle weight in kilograms. Minimum value is 1.

Example: opt=avoid:tunnels,routeType:shortest
tstring

Transmission Reference - Serves as a unique request identifier. It is returned as sent.

Example: t=Test
unitsstring

Units - This specifies the returned distance unit scale. Use mi for miles and km for kilometers.

Enum"mi""km"
Example: units=mi
pointsstringrequired

Required. Points are a series of Latitude,Longitude sets. Each Latitude is separated from its Longitude by the standard comma. Each set is delimited by a colon :, for example: lat1,long1:lat2,long2:lat3,long3:lat4,long4 calculated the time and distance between starting point 1 and destination 4 with stops 2 and 3 in between.

Example: points=42.211479,-70.999908:42.201926,-71.007090:42.211848,-71.019438:42.214976,-71.0045472
curl -i -X GET \
  'https://streetroute.melissadata.net/v1/WEB/StreetRoute/getDistanceMultipoint?id={REPLACE-WITH-YOUR-LICENSE-KEY}&points=42.211479%2C-70.999908%3A42.201926%2C-71.007090%3A42.211848%2C-71.019438%3A42.214976%2C-71.0045472'

Responses

Default response from a multipoint GET request

Bodyapplication/json
Resultsstring

Comma delimited status, error codes, and change codes for the record. For more information, see Street Route Result Codes.

Unitsstring

This is a string value that is the set unit of measurement for the TotalDrivingDistance field.

TransmissionResultsstring

Lists error codes from any errors caused by the most recent request as a whole. For more information, see Street Route Result Codes.

TravelTimestring

This is a string value of the travel time for the record in the format hh:mm:ss.

TotalDrivingDistancestring

This is a string value with the total driving distance. Refer to the Units field to know what unit of measurement it is.

TransmissionReferencestring

A pass-through of the input TransmissionReference field.

Versionstring

The current service version number.

Response
application/json
{ "Results": "SR01", "Units": "mi", "TransmissionResults": "", "TravelTime": "00:20:17", "TotalDrivingDistance": "2.8844", "TransmissionReference": "Test", "Version": "8.2.1.0" }