Home

Introduction

Distance & Time API

version 3

Distance & Time is web application, which allows to calculate distances and transit time between two points using different modes of transport.

OpenAPI Specification

Start designing your API in minutes. The OpenAPI specification file enables you to learn and interact with API elements, including all available endpoints, input and output representations.

General information

Distance & Time API is organized around REST.
Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

API endpoint#

1https://distanceandtime.searates.com

All endpoints are only accessible via HTTPS and are located at distanceandtime.searates.com

Distance and transit time calculator.

get/v3/api

Get the best route and estimated time delivery.

Headers

Content-Typeapplication/json

Query Parameters
  • api_keyREQUIREDstring

    Your api key. If you do not have an api key - contact us to purchase a subscription.

  • fromREQUIREDstring

    Route start location data - coordinates in format latitude,longitude or UN/LOCODE.

    Examples:CNSHG

  • toREQUIREDstring

    Route end location data - coordinates in format latitude,longitude or UN/LOCODE.

    Examples:USLGB

  • transport_modesOptionalstring

    Modes of transportation that are allowed to be used in route finding. Multiple modes of transportation can be specified separated by a comma.

    SEA - by sea

    ROAD - by road

    RAIL - by rail

    AIR - by air

    Examples:SEA,ROAD,RAIL,AIR

  • alternative_routesOptionalboolean

    Whether alternative routes should also be provided in the response.

    Examples:false

  • routing_modeOptionalstring

    This parameter specifies which mode should be used when calculating the route. By default it takes the value short - the shortest route from the point of departure to the point of arrival; it can also take the value safe - a route that is built taking into account the current geopolitical situation in the world.

    Allowed values:shortsafe

    Examples:short

Response example
1{
2  "success": true,
3  "status_code": "OK",
4  "metadata": {
5    "request_parameters": {
6      "from": "CNSHG",
7      "to": "USLGB",
8      "transport_modes": "SEA",
9      "alternative_routes": false,
10      "routing_mode": "short"
11    }
12  },
13  "data": {
14    "route": {
15      "summary": {
16        "duration": 1543323,
17        "distance": 11115355,
18        "speed": 25.93
19      },
20      "from": {
21        "description": "Shanghai, Shanghai Shi, China",
22        "name": "Shanghai",
23        "state": "Shanghai Shi",
24        "country": "China",
25        "country_code": "CN",
26        "locode": "CNSHG",
27        "lat": 31.366365,
28        "lng": 121.61475
29      },
30      "to": {
31        "description": "Long Beach, California, United States",
32        "name": "Long Beach",
33        "state": "California",
34        "country": "United States",
35        "country_code": "US",
36        "locode": "USLGB",
37        "lat": 33.76696,
38        "lng": -118.18923
39      },
40      "sections": [
41        {
42          "summary": {
43            "duration": 1543323,
44            "distance": 11115355,
45            "speed": 25.93
46          },
47          "from": {
48            "description": "Shanghai, Shanghai Shi, China",
49            "name": "Shanghai",
50            "state": "Shanghai Shi",
51            "country": "China",
52            "country_code": "CN",
53            "locode": "CNSHG",
54            "lat": 31.366365,
55            "lng": 121.61475
56          },
57          "to": {
58            "description": "Long Beach, California, United States",
59            "name": "Long Beach",
60            "state": "California",
61            "country": "United States",
62            "country_code": "US",
63            "locode": "USLGB",
64            "lat": 33.76696,
65            "lng": -118.18923
66          },
67          "transport_mode": "SEA",
68          "path": [
69            [
70              31.3664,
71              121.6148
72            ],
73            [
74              31.6524,
75              122.3746
76            ],
77            [
78              31.6549,
79              122.3891
80            ],
81            [
82              31.6499,
83              122.4003
84            ],
85            [
86              31.6377,
87              122.4082
88            ],
89            [
90              31.5663,
91              122.435
92            ],
93            [
94              31.5494,
95              122.4448
96            ],
97            [
98              31.5385,
99              122.4591
100            ],
101            [
102              31.5336,
103              122.4779
104            ],
105            [
106              30.889,
107              130.6455
108            ],
109            [
110              30.8879,
111              130.6667
112            ],
113            [
114              30.8881,
115              130.6879
116            ],
117            [
118              30.8895,
119              130.7091
120            ],
121            [
122              30.9403,
123              131.2332
124            ],
125            [
126              30.9418,
127              131.2509
128            ],
129            [
130              30.9428,
131              131.2686
132            ],
133            [
134              30.9433,
135              131.2864
136            ],
137            [
138              32.6026,
139              -118.5049
140            ],
141            [
142              32.6038,
143              -118.4892
144            ],
145            [
146              32.607,
147              -118.4739
148            ],
149            [
150              32.6121,
151              -118.459
152            ],
153            [
154              32.7422,
155              -118.1471
156            ],
157            [
158              32.7499,
159              -118.1346
160            ],
161            [
162              32.7609,
163              -118.1264
164            ],
165            [
166              32.775,
167              -118.1226
168            ],
169            [
170              33.3204,
171              -118.0696
172            ],
173            [
174              33.3382,
175              -118.069
176            ],
177            [
178              33.3559,
179              -118.0706
180            ],
181            [
182              33.3733,
183              -118.0744
184            ],
185            [
186              33.767,
187              -118.1892
188            ]
189          ],
190          "stats": [
191            {
192              "carrier_name": "Orient Overseas Container Line (OOCL)",
193              "carrier_code": "oolu",
194              "duration": 1379475,
195              "speed": 29.01,
196              "popularity": 19.15
197            },
198            {
199              "carrier_name": "Mediterranean Shipping Company (MSC)",
200              "carrier_code": "mscu",
201              "duration": 1998366,
202              "speed": 20.02,
203              "popularity": 16.22
204            },
205            {
206              "carrier_name": "Hyundai Merchant Marine (HMM)",
207              "carrier_code": "hdmu",
208              "duration": 1801539,
209              "speed": 22.21,
210              "popularity": 14.49
211            },
212            {
213              "carrier_name": "COSCO",
214              "carrier_code": "cosu",
215              "duration": 1367411,
216              "speed": 29.26,
217              "popularity": 11.09
218            },
219            {
220              "carrier_name": "Matson Navigation Company Inc (MATS)",
221              "carrier_code": "mats",
222              "duration": 1188170,
223              "speed": 33.68,
224              "popularity": 8.03
225            },
226            {
227              "carrier_name": "Maersk",
228              "carrier_code": "maeu",
229              "duration": 2155495,
230              "speed": 18.56,
231              "popularity": 7.7
232            },
233            {
234              "carrier_name": "Ocean Network Express (ONE)",
235              "carrier_code": "oney",
236              "duration": 1623799,
237              "speed": 24.64,
238              "popularity": 6.11
239            },
240            {
241              "carrier_name": "CMA CGM",
242              "carrier_code": "cmdu",
243              "duration": 1700022,
244              "speed": 23.54,
245              "popularity": 3.99
246            },
247            {
248              "carrier_name": "SM Line (SML)",
249              "carrier_code": "smlm",
250              "duration": 2022121,
251              "speed": 19.79,
252              "popularity": 3.66
253            },
254            {
255              "carrier_name": "Yang Ming",
256              "carrier_code": "ymlu",
257              "duration": 1494193,
258              "speed": 26.78,
259              "popularity": 2.36
260            },
261            {
262              "carrier_name": "Evergreen",
263              "carrier_code": "eglv",
264              "duration": 1394293,
265              "speed": 28.7,
266              "popularity": 2.32
267            },
268            {
269              "carrier_name": "Hapag-Lloyd",
270              "carrier_code": "hlcu",
271              "duration": 1942294,
272              "speed": 20.6,
273              "popularity": 2.15
274            },
275            {
276              "carrier_name": "Wan Hai",
277              "carrier_code": "whlc",
278              "duration": 1508921,
279              "speed": 26.52,
280              "popularity": 1.25
281            },
282            {
283              "carrier_name": "Sealand",
284              "carrier_code": "sejj",
285              "duration": 2045810,
286              "speed": 19.56,
287              "popularity": 0.46
288            },
289            {
290              "carrier_name": "DB Schenker",
291              "carrier_code": "shkk",
292              "duration": 1379593,
293              "speed": 29.01,
294              "popularity": 0.3
295            },
296            {
297              "carrier_name": "Blue Anchor America Line",
298              "carrier_code": "banq",
299              "duration": 1877036,
300              "speed": 21.32,
301              "popularity": 0.23
302            },
303            {
304              "carrier_name": "Shipco Transport",
305              "carrier_code": "shpt",
306              "duration": 2120125,
307              "speed": 18.87,
308              "popularity": 0.17
309            },
310            {
311              "carrier_name": "American President Lines (APL)",
312              "carrier_code": "aplu",
313              "duration": 1611972,
314              "speed": 24.82,
315              "popularity": 0.11
316            },
317            {
318              "carrier_name": "Australia National Line (ANL)",
319              "carrier_code": "annu",
320              "duration": 1655673,
321              "speed": 24.17,
322              "popularity": 0.04
323            },
324            {
325              "carrier_name": "Kuehne + Nagel (KN)",
326              "carrier_code": "khnn",
327              "duration": 1334820,
328              "speed": 29.98,
329              "popularity": 0.04
330            },
331            {
332              "carrier_name": "Mitsui O.S.K. Lines (MOL)",
333              "carrier_code": "molu",
334              "duration": 1562580,
335              "speed": 25.61,
336              "popularity": 0.02
337            },
338            {
339              "carrier_name": "Maersk Line Limited (MLL)",
340              "carrier_code": "maei",
341              "duration": 1793544,
342              "speed": 22.31,
343              "popularity": 0.02
344            },
345            {
346              "carrier_name": "CNC (Cheng Lie Navigation)",
347              "carrier_code": "11dx",
348              "duration": 1761024,
349              "speed": 22.72,
350              "popularity": 0.02
351            },
352            {
353              "carrier_name": "Nile Dutch Africa Line",
354              "carrier_code": "nidu",
355              "duration": 2165490,
356              "speed": 18.48,
357              "popularity": 0.01
358            },
359            {
360              "carrier_name": "Orient Star",
361              "carrier_code": "osti",
362              "duration": 1654780,
363              "speed": 24.18,
364              "popularity": 0.01
365            },
366            {
367              "carrier_name": "Dsv Ocean Transport",
368              "carrier_code": "dsvf",
369              "duration": 2691460,
370              "speed": 14.87,
371              "popularity": 0.01
372            },
373            {
374              "carrier_name": "Damco",
375              "carrier_code": "dmcq",
376              "duration": 2203200,
377              "speed": 18.16,
378              "popularity": 0.01
379            },
380            {
381              "carrier_name": "Yusen Logistics",
382              "carrier_code": "yasv",
383              "duration": 1350240,
384              "speed": 29.64,
385              "popularity": 0.01
386            },
387            {
388              "carrier_name": "Hamburg Sud",
389              "carrier_code": "sudu",
390              "duration": 2544960,
391              "speed": 15.72,
392              "popularity": 0
393            }
394          ]
395        }
396      ]
397    },
398    "alternative_routes": []
399  }
400}