Get Matrix response format

The API response contains the matrix encoded in gzip format. It must be decoded before use. After decoding, the matrix will be presented in the JSON format described below.

Response headers

Header Value
Content-Encoding gzip
Content-Type application/json

Response params

cells

The cells of the matrix.

Rows of the cells matrix correspond to the origin points.

Columns of the cells matrix correspond to the destination points.

Each cell of the matrix will contain a pair of integer numbers in the format: [distance, duration].

distance is in meters.

duration is in seconds.

In case there is no route between two points, the corresponding matrix cell will contain [-1, -1].

HTTP Error messages

Code Description
400 One or more required parameters are missing in the request.
401 The request doesn't contain the apikey parameter or an invalid key was specified.
404 The matrix with the provided ID was not found.
429 Too many requests.
500 or 504 System server error. Retry the request later.

If an error occurs while processing a request, API returns a message with the error description in the errors field:

{"errors": ["Error with parameter \"id\": Required"]}
{"errors": ["Key not found"]}
{"errors": ["parameter 'apikey' is missing"]}