Distance & Time API V2
API Entry Point | https://sirius.searates.com/api/distanceandtime?parameters |
HTTP Method | GET |
Request Parameters
Parameter name | Required | Type | Description |
key | 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 |
speed | no | float number | Speed for the selected type of transport. If speed is not set, it will be defaulted depending on the type (sea - 13 knots, air - 800 km/h, road - 35 km/h, rail - 35) |
road_speed | no | float number | Transport speed to ports. Used for types sea , air . By default 35 km/h. |
Example URL
https://sirius.searates.com/api/distanceandtime?lat_from=31.230416&lng_from=121.473701&lat_to=46.482526&lng_to=30.7233095&type=sea&key=XXXXXX&speed=15&road_speed=50
The above query returns the following result:
{
"transit_time_chart": {
"pay": true,
"drilldown": [
{
"name": "HAMBURG SUD",
"id": "HAMBURG SUD",
"lineId": 4,
"data": [
[
"SEGU4197094",
25
],
...
],
"y": 31,
"color": {
...
}
},
]
},
"road_from": {
"path": [
[
31.230068,
121.474106
],
...
],
"distance": 28.495,
"transit_time_seconds": 2052,
"transit_time_days": "0 days",
"name": "Shanghai, China",
"speed": "50 km\/h",
"lat": 31.230416,
"lng": 121.473701
},
"sea": {
"dist": 15401.06,
"path": [
[
31.400089849043,
121.49711608887
],
...
],
"transit_time_seconds": 1995818,
"transit_time_days": "23 days",
"from_name": "Shanghai",
"to_name": "Odessa",
"speed": "15 knots",
"from_lat": 31.4000905769357,
"from_lng": 121.497112503479,
"to_lat": 46.4999995864331,
"to_lng": 30.7307730194095
},
"road_to": {
"path": [
[
46.499035,
30.729176
],
...
],
"distance": 3.03772,
"transit_time_seconds": 219,
"transit_time_days": "0 days",
"name": "Odessa, Odessa Oblast, Ukraine",
"speed": "50 km\/h",
"lat": 46.482526,
"lng": 30.7233095
}
}