Datalastic Maritime API Logo

Sea Route API: Calculate Distance from Port to Offshore Rig

AIS Tracking, API Knowledge zone

An offshore oil rig in the open sea connected by a dotted line to a distant port on the coastline, showing a calculated sea route.

Not every ship heads from one port to another.

A lot of vessels go offshore to oil rigs, wind farms, and research stations. And if you’ve ever tried to calculate the route to one of those spots using a regular mapping tool, you know it’s not that simple. Straight lines across water look fine on paper, but in reality? They might cut across land or completely ignore how ships actually move.

That’s where the Sea Route API makes a difference.

It lets you figure out how to get from a port to any set of coordinates, not just another port. That’s useful if you’re managing supply trips to rigs or planning a research expedition out in the open sea.

Why Use a Sea Route API Instead of a Simple Map?

On paper, a straight line might seem like the fastest route across the sea, but ships don’t sail that way. Our Sea Route API gives you realistic routes that follow actual shipping lanes and steer clear of land, shallow waters, and restricted zones.

You can use it for:

* Routing from port to port

* Routing from a port to any set of coordinates

* Routing between any two coordinates

That means you’re not limited to port destinations. You can also plot routes to offshore points like oil rigs, buoys, or survey areas.

Example: Calculate a Route from Stavanger to an Oil Rig in the North Sea

Let’s say your ship is docked at Stavanger, Norway (UNLOCODE: NOSTV), and you need to reach an oil platform located at:

  • Latitude: 59.0000

  • Longitude: 2.2500

You can make this Sea Route API call like this:

https://api.datalastic.com/api/ext/route?api-key=YOUR_API_KEY&port_unlocode_from=NOSTV&lat_to=59.0000&lon_to=2.2500 

This API call will return:

  • A full sea route (LineString with coordinates)

  • The total sailing distance in kilometers

  • Start and end points (port and coordinates)

  • Response metadata, like processing time

It’s ideal for use in dashboards, backend systems, or even map visualizations using tools like Leaflet or Mapbox.

Sea Routes API Response Example:

{
 "data": {
 "from": {
 "type": "Feature",
 "geometry": {
 "type": "Point",
 "coordinates": [24.9445, 60.1685]
 },
 "properties": {
 "type": "Port",
 "port_name": "HELSINKI",
 "port_uuid": "7d9ba108-52b4-47d7-a74d-13d4e1a80a51",
 "port_unlocode": "FIHEL"
 }
 },
 "route": {
 "type": "Feature",
 "geometry": {
 "type": "LineString",
 "coordinates": [[24.9445, 60.1685], … , [-119, 33.7]]
 },
 "properties": {
 "total_dist": 16357.2518
 }
 },
 "to": {
 "type": "Feature",
 "geometry": {
 "type": "Point",
 "coordinates": [-119, 33.7]
 },
 "properties": {
 "type": "Coordinate Point"
 }
 }
 },
 "meta": {"duration": 0.070373595, "endpoint": "/api/ext/route","success": true}
}

Use Cases: When to Use Port-to-Coordinate Routing

This comes in handy when you’re tracking vessels headed to spots that aren’t official ports like rigs, buoys, or survey areas. It’s especially useful in remote zones where AIS coverage is patchy. Pair it with other data like Datalastic’s SAT-E which estimates vessel positions when AIS signals are missing, you can still follow the vessel’s likely route and get a reliable ETA.

Works with AIS and Satellite-Estimated Data

If you’re already using AIS tracking or satellite-estimated tools like SAT-E, you can layer in the sea route data to:

  • See the likely route a vessel is taking

  • Estimate how much distance is left

  • Reconstruct the full trip, even when AIS cuts out

This gives you a complete picture of vessel movement from port to offshore targets.

Read Other Maritime Articles 

Maritime Weather API: Current and Hourly Data

Maritime Weather API: Current and Hourly Data

If you've ever tried to bolt weather data onto a shipping or logistics tool, you know the annoying part isn't the weather data itself. It's that marine conditions and atmospheric conditions usually come from two different providers with two different schemas, and...

AIS Spoofing in the Red Sea: What’s Really Happening

AIS Spoofing in the Red Sea: What’s Really Happening

A cargo ship off Yanbu suddenly reports a position it couldn’t possibly have reached. Its speed jumps to 45 knots, far beyond what a loaded tanker can realistically do. Minutes later, the signal disappears. Hours after that, the vessel reappears somewhere else...

How To Use ChatGPT To Track Ships in Real Time?

How To Use ChatGPT To Track Ships in Real Time?

Tracking ships using ChatGPT is possible and an easy process when it is connected to a live maritime data source such as Datalastic. On its own, ChatGPT does not maintain a live database of ship positions. It may know general information about vessels, shipping...

How to Connect Datalastic to Claude and ChatGPT?

How to Connect Datalastic to Claude and ChatGPT?

Connecting Datalastic to Claude and ChatGPT is an easy and fast process that you'll be surprised by it, following this tutorial. By connecting Datalastic through its Model Context Protocol (MCP) server, you can give AI assistants direct access to real-time maritime...

Find Vessels In The Gulf Of Oman

Find Vessels In The Gulf Of Oman

Tracking vessels in the Gulf of Oman is essential for understanding maritime traffic in one of the world’s most strategically important shipping corridors. This region connects the Arabian Sea with the Strait of Hormuz, acting as a gateway for global oil shipments,...

Enterprise Vessel Tracking API

Enterprise Vessel Tracking API

An enterprise vessel tracking API is not defined by features alone. It is defined by scale, reliability, and the ability to perform under real-world pressure. In maritime operations, where systems rely on continuous data flows, even small inefficiencies can quickly...