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

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