Dataloy Distances API (1.0.0)

Download OpenAPI specification:Download

The Dataloy Distances API provides routes, distances and details about ECA for any sea route globally. In order to use the route endpoint and get a route and distance, you will need to input at least two locations with latitude and longitude in decimal format. You can use your own locations or query for over 10,000 ports and maritime locations using our Port endpoint. Please see endpoint documentation in order to see the details of each endpoint.

Authentication

ApiKeyAuth:

Security Scheme Type API Key
Header parameter name: X-API-Key

Routing API

Introduction

The Routing API is part of the Dataloy Distances API. Routing is the process of finding the best path connecting two or more points, where the meaning of ''best'' depends on the use case, however normally it means the route having the shortest distance.

GET Route Endpoint

Use the GET request with the minimum number of parameters to get any route worldwide.

Authorizations:
query Parameters
point
required
Array of strings
Example: point=33.75166,-118.270864

The points for which the route should be calculated. Format: [latitude,longitude]. Specify at least an origin and a destination. Via points are possible.

block_sc
boolean
Default: false
Example: block_sc=false

By default, routes will go via the Suez Canal if this is the shortest option. To block the Suez Canal and force routing around it, set this parameter to true.

block_pc
boolean
Default: false
Example: block_pc=true

By default, routes will go via the Panama Canal if this is the shortest option. To block the Panama Canal and force routing around it, set this parameter to true.

block_kc
boolean
Default: false
Example: block_kc=false

By default, routes will go via the Kiel Canal if this is the shortest option. To block the Kiel Canal and force routing around it, set this parameter to true.

block_nw
boolean
Default: false
Example: block_nw=true

By default, routes will go via the North West Passage if this is the shortest option. To block the North West Passage and force routing around it, set this parameter to true.

block_ne
boolean
Default: false
Example: block_ne=true

By default, routes will go via the North East Passage if this is the shortest option. To block the North East Passage and force routing around it, set this parameter to true.

avoid_eca_factor
number
Default: 1
Example: avoid_eca_factor=1.3

By default, routes pass the shortes way through any ECA zones. To avoid ECA, a factor between 1-5 can be entered, where 1 is no avoidance and 5 is maximum avoidance. Recommended value for achieving a good avoidance is as low as 1.3.

avoid_hra_factor
number
Default: 1
Example: avoid_hra_factor=2

By default, routes pass the shortes way through any HRA zones. To avoid HRA, a factor between 1-5 can be entered, where 1 is no avoidance and 5 is maximum avoidance. Recommended value for achieving a good avoidance is 2.

avoid_ice_factor
number
Default: 1
Example: avoid_ice_factor=5

By default, routes pass the shortes way through any ice areas. To avoid ice, a factor between 1-5 can be entered, where 1 is no avoidance and 5 is maximum avoidance. Recommended value is 5.

Responses

Request samples

curl --location --request GET 'https://distances.dataloy.com/route/route?point=60.181136,4.979553&point=21.640835,113.656311&avoid_eca_factor=1&avoid_hra_factor=1&avoid_ice_factor=1'
 --header 'X-API-Key: YOUR KEY HERE'

Response samples

Content type
application/json
{
  • "info": {
    },
  • "paths": [
    ]
}

Ports API

Introduction

The Ports API is part of the Dataloy Distances API. The Routing API requires a set of latitude and longitude coordinates. To make it easy to retrieve the coordinates of ports, the Ports API offers an endpoint to get basic port information such as Port Name, Location Code, Latitude, Longitude and Timezone.

GET Port Endpoint

Use the GET request with the minimum number of parameters to get any port with details.

Authorizations:
query Parameters
filter
required
string
Example: filter=portName(EQ)BERGEN, locationCode(EQ)BGO, portId(EQ)10010

The filter that provides the desired port in return.

Responses

Request samples

curl --location --request GET 'https://distances.dataloy.com/port/port?filter=portName(EQ)BERGEN'
 --header 'X-API-Key: YOUR KEY HERE'

Response samples

Content type
application/json
{
  • "portName": "BERGEN",
  • "countryCode": "NO",
  • "countryName": "Norway",
  • "locationCode": "BGO",
  • "timezone": "Europe/Oslo",
  • "latitude": 60.392039,
  • "longitude": 5.306605,
  • "key": 104146
}