DEV Community

Cover image for Live Ship Tracking API: How to Integrate Vessel Data into Your Applications
ShipFinder
ShipFinder

Posted on

Live Ship Tracking API: How to Integrate Vessel Data into Your Applications

Live ship tracking is useful far beyond displaying vessels on a map. Developers can use real-time AIS data to build fleet dashboards, cargo-tracking portals, port arrival tools, geofence alerts and maritime analytics applications.

The main challenge is turning raw vessel reports into structured data that an application can search, display and monitor reliably. A live ship tracking API handles this data layer, allowing developers to retrieve the latest known vessel position through standard HTTP requests.

This guide explains how to integrate live vessel data using the ShipFinder AIS Data API, from creating a free trial key to requesting and processing a vessel’s latest position.

What Can You Build with Vessel Data?

A live vessel tracking API can support many types of maritime applications.

Fleet monitoring dashboards

Display the latest position and operational status of multiple vessels on one map.

Cargo-tracking portals

Connect a shipment with its carrying vessel and provide customers with voyage progress and updated arrival information.

Port arrival tools

Monitor inbound vessels and help terminals, warehouses and transport providers prepare for arrivals.

Geofence alerts

Trigger a workflow when a vessel enters or leaves a port, anchorage, terminal area or custom zone.

Route and voyage analysis

Combine current positions with historical tracks, port calls, planned routes or marine weather data.

Mobile ship-tracking apps

Build mobile interfaces for vessel search, fleet monitoring and arrival notifications without maintaining a separate AIS collection network.

A Simple Integration Architecture

A typical ship-tracking application has three layers:

ShipFinder AIS API

Your backend service

Web app, mobile app or internal dashboard

Your backend should make authenticated requests to the API, validate the response and return only the fields required by the client.

Avoid placing the API key directly inside browser JavaScript or a mobile application. Client-side credentials can be inspected and reused by unauthorized users.

Step 1: Create a Free API Key

Start by opening the ShipFinder AIS Data API page and accessing the API Console.

After signing in:

  1. Open My API Keys.

  2. Select Create API Key.

  3. Choose a Starter (Trial) Key.

  4. Complete the required information.

  5. Copy the generated key.

According to the official ShipFinder API integration tutorial, the Starter key includes a preset permission scope and can be used for development and integration testing.

Do not commit the key to Git or include it in public frontend code.

Step 2: Identify the Vessel

The MMSI is commonly used when requesting live vessel positions.

If you already know the MMSI, you can query the position endpoint directly. Otherwise, use the Vessel Search API to search by:

  • Vessel name

  • MMSI

  • IMO number

  • Call sign

A name search may return several records. Vessel names can be reused, and a vessel’s MMSI may change in some circumstances. Check the IMO number, call sign and latest AIS report time before selecting a result.

For long-term vessel identity, the IMO number is generally more stable. For AIS position requests, use the MMSI associated with the relevant vessel record.

Step 3: Request the Latest Vessel Position

ShipFinder provides a Single Vessel Position endpoint. the request requires an API key and MMSI.

A successful response follows this general structure:

{
  "status": 0,
  "msg": "",
  "data": {
    "mmsi": 123456789,
    "imo": 9876543,
    "call_sign": "CALLSIGN",
    "ship_name": "EXAMPLE VESSEL",
    "ship_type": 70,
    "length": 200,
    "width": 32,
    "draught": 10.5,
    "dest": "SINGAPORE",
    "destcode": "SGSIN",
    "eta": 1780000000,
    "navistat": 0,
    "lat": 1.2501,
    "lng": 103.7501,
    "sog": 14.2,
    "cog": 92.5,
    "hdg": 93,
    "rot": 0,
    "last_time": 1779996400
  }
}
Enter fullscreen mode Exit fullscreen mode

The values above are illustrative. Your application should always process the actual response returned by the API.

Important fields include:

Step 4: Integrate the API with Node.js

Create a small Express endpoint that retrieves a vessel position without exposing the ShipFinder API key to the browser.

Step 5: Display the Vessel on a Map

Most web-mapping libraries expect coordinates in one of two formats:

// Common map marker format
[latitude, longitude]

// GeoJSON coordinate format
[longitude, latitude]
Enter fullscreen mode Exit fullscreen mode

Mixing these formats can place a ship in the wrong location. Confirm the coordinate order required by your map library before creating the marker.

A normalized GeoJSON feature could look like this:

const vesselFeature = {
  type: "Feature",
  geometry: {
    type: "Point",
    coordinates: [
      vessel.position.longitude,
      vessel.position.latitude
    ]
  },
  properties: {
    mmsi: vessel.mmsi,
    name: vessel.name,
    speed: vessel.movement.speedKnots,
    course: vessel.movement.course,
    destination: vessel.voyage.destination,
    lastUpdate: vessel.lastUpdate
  }
};
Enter fullscreen mode Exit fullscreen mode

This structure can be used with mapping tools that support GeoJSON.

Polling or Push: Which Should You Use?

There are two common ways to keep vessel information updated.

Polling

Your backend sends position requests at a defined interval.

Polling works well for:

  • Tracking one vessel

  • User-triggered searches

  • Low-volume dashboards

  • Proof-of-concept applications

Choose a refresh interval that matches your business need and API permissions. Requesting data more frequently than necessary increases infrastructure usage without guaranteeing that a newer AIS report is available.

Push-based updates

For fleet-scale or event-driven applications, a push service can deliver updates to a webhook URL.

ShipFinder’s Real-time Vessel Position Push monitors vessels in a configured fleet and sends position packets to the receiving URL. The current service documentation describes a 10-minute push interval and notes that advanced permission is required.

Push services are useful when you need:

  • Continuous fleet monitoring

  • Arrival or departure notifications

  • Geofence entry and exit alerts

  • Speed alerts

  • Dynamic ETA changes

  • AIS signal-loss notifications

The best architecture may combine both methods: on-demand API requests for searches and webhook events for monitored fleets.

Scaling from One Ship to a Fleet

Calling the single-vessel endpoint repeatedly is suitable for a small proof of concept, but fleet applications should use endpoints designed for multiple vessels.

The Multi-vessel Position API accepts multiple MMSI values in one request.

Batching requests reduces unnecessary network overhead and makes it easier to update several map markers together.

For persistent monitoring, use fleet-management and push services rather than building a high-frequency polling loop for every vessel.

Understanding “Real-Time” AIS Data

In vessel tracking, “real time” usually means the latest AIS report available to the platform. It does not mean that every vessel has a continuously updating position.

Update availability depends on factors such as:

  • Whether the vessel is transmitting AIS

  • Terrestrial or satellite AIS coverage

  • Signal congestion

  • The vessel’s operating area

  • Transmission and processing intervals

Always examine last_time before using a position. A valid coordinate with an old timestamp should not be presented as a current location without a warning.

Destination, ETA and navigation status may also depend on information entered aboard the vessel. Treat these fields as operational indicators rather than guaranteed facts.

Start Building with ShipFinder

A live ship tracking API removes the need to collect and process AIS signals independently. With a vessel identifier and an API key, developers can retrieve structured position and voyage data and integrate it into web applications, mobile apps or internal systems.

Start with a single-vessel request, normalize the returned data and add mapping or alert workflows as the application grows.

You can create a free Starter API key to test the ShipFinder AIS Data API, then explore the complete endpoint schemas and integration guides in the ShipFinder API documentation.

Top comments (0)