Dataloy Distances API (1.1.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

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

Example: point=33.75166,-118.270864
block_sc
boolean
Default: 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.

Example: block_sc=false
block_pc
boolean
Default: false

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.

Example: block_pc=true
block_kc
boolean
Default: 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.

Example: block_kc=false
block_nw
boolean
Default: false

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.

Example: block_nw=true
block_ne
boolean
Default: false

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.

Example: block_ne=true
block_cc
boolean
Default: false

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

Example: block_cc=false
block_ts
boolean
Default: false

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

Example: block_ts=false
block_area
Array of strings

Gives you the possibilty to block specific areas. You can add several areas in the block_area parameter seperating the areas by a semicolon (;). Radius is given in meters. The format of one block area is: [longitude,latitude,radius]. The format of several block areas is: [longitude,latitude,radius;longitude,latitude,radius].

Example: block_area=55.52863,9.72839,1000;55.565922,10.8654,50000
avoid_eca_factor
number
Default: 1

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.

Example: avoid_eca_factor=1.3
avoid_hra_factor
number
Default: 1

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.

Example: avoid_hra_factor=2
avoid_ice_factor
number
Default: 1

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.

Example: avoid_ice_factor=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

The filter that provides the desired port in return.

Example: filter=portName(EQ)BERGEN, locationCode(EQ)BGO, portId(EQ)10010

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
}

Request API

Introduction

The Request API is part of the Dataloy Distances API. The Request API takes an start date, and an end date, as well as the api key. This will provide the amount of calls the user have made to all of the other plans they have in the distances API.

GET Request Endpoint

Use the GET method to get the amount of calls that have been made. The api as two available parameters 'start' and 'end'. These can be used alone, or togheter. When no parameter is present, the user will get the amout of calls made between the first of the current month and the current date. When start is used, the user will get amount for calls made between the specified date, and the current date, and when end is specified the user will get the amount of calls made from the first day of the month that the user specify as end date

Authorizations:
query Parameters
start
string

The date that the user want to track calls from in the syntax yyyy-MM-dd

Example: start=2023-07-01
end
string

The date that the user want to track to, in the same syntax : yyyy-MM-dd.Then end date cannot be before start date

Example: end=2023-07-15

Responses

Request samples

curl --location --request GET 'https://distances.dataloy.com/request/request?start=2023-08-03&end=2023-08-15'
 --header 'X-API-Key: YOUR KEY HERE'

Response samples

Content type
application/json
{
  • "Professional - Route": {
    },
  • "Professional - Port": {
    },
  • "Request": {
    }
}