Distance & Time API

API Entry Point https://sirius.searates.com/port/api-distanceandtime?parameters
HTTP Method GET

Parámetros de solicitud

Parameter name Required Type Description
apiKey yes string API key: hexadecimal number
lat_from yes float number The latitude value specifying the location for which you wish to obtain the closest point of loading.
lng_from yes float number The longitude value specifying the location for which you wish to obtain the closest point of loading.
lat_to yes float number The latitude value specifying the location for which you wish to obtain the closest point of discharge.
lng_to yes float number The longitude value specifying the location for which you wish to obtain the closest point of discharge.
type yes string The available values for this parameter are: sea | air | road | rail
Default value: sea

Example URL

https://sirius.searates.com/port/api-distanceandtime?type=air&lat_from=31.2303904&lng_from=121.47370209999997&lat_to=46.482526&lng_to=30.723309500000028&apiKey=XXXXXX

The above query returns the following result:

Example JSON response

{
   "road_from":{
      "path":[
         [
            31.230343,
            121.473732
         ],
         [
            31.230427,
            121.473877
         ],
        ...
      ],
      "distance":"33.913",
      "transit_time":0.0005652166666666666
   },
   "air":{
      "path":[
         [
            31.143378,
            121.805214
         ],
         [
            31.188525405591676,
            121.7472003893808
         ],
        ...
      ],
      "distance":1701339.0810755193,
      "transit_time":2.4304844015364564
   },
   "road_to":{
      "path":[
         [
            46.4244,
            30.671789
         ],
         [
            46.424591,
            30.671618
         ],
        ...
      ],
      "distance":"6.919",
      "transit_time":0.00011531666666666666
   }
}