NAVTEX Messages API

Access maritime safety information through the NAVTEX API. Query weather warnings, navigation hazards, search and rescue alerts, and other safety broadcasts. Messages are collected every 6 hours.

What is NAVTEX?

NAVTEX (Navigational Telex) is an international automated medium frequency direct-printing service for delivery of maritime safety information. It's a key component of the Global Maritime Distress and Safety System (GMDSS) and provides safety information to ships at sea.

NAVTEX stations around the world broadcast messages on standardized frequencies, covering coastal waters within approximately 200-400 nautical miles of the transmitter. The API collects and indexes these broadcasts, making them searchable and accessible through a simple REST interface.

Safety Note: While the API provides access to NAVTEX messages for informational and research purposes, it should not be used as a primary source for real-time safety decisions at sea. Always rely on direct NAVTEX reception and official maritime safety communications for navigation.

Message Categories

NAVTEX messages are categorized by subject identifier (B1 character). Each category serves a specific safety purpose:

A

Navigational Warnings

Hazards to navigation including uncharted dangers, changes to aids to navigation, and marine construction activities.

B

Meteorological Warnings

Gale warnings, storm warnings, and other hazardous weather information for mariners.

C

Ice Reports

Ice conditions and icebreaker operations in polar and subpolar regions.

D

Search and Rescue

SAR operations, distress alerts, and missing vessel information.

E

Weather Forecasts

Detailed marine weather forecasts for specific sea areas.

L

Navigation Warnings (Additional)

Supplementary navigational warnings and updates.

T

Piracy Warnings

Piracy alerts and security advisories for high-risk areas.

V-Z

Special Services

LORAN corrections, OMEGA corrections, and other special transmissions.

Use Cases

Voyage Planning

Query short-term historical and current NAVTEX messages along planned routes to identify potential hazards and weather conditions before departure.

Maritime Research

Analyze patterns in maritime safety messages for research into weather trends, hazard distributions, and SAR activity.

Situational Awareness

Build dashboards that display relevant safety information for specific geographic areas or vessel routes.

Risk Assessment

Incorporate safety message data into maritime risk models and insurance assessments.

Available Endpoints

GET /navtex

Get NAVTEX Messages

Retrieve NAVTEX messages within a specified time range.

Parameters:

  • time.from - Start of time range in RFC3339 format (optional, defaults to 24 hours ago)
  • time.to - End of time range in RFC3339 format (optional, defaults to current time)
  • pagination.limit - Results per page (max 50, default 20)
  • pagination.nextToken - Cursor for next page of results

Code Examples

Get Recent Messages (cURL)

# The API defaults to the past 24 hours if time range is omitted
curl -X GET "https://api.vesselapi.com/v1/navtex" \
     -H "Authorization: Bearer YOUR_API_KEY"

Get Messages in Time Range (Python)

import requests
from datetime import datetime, timedelta

end_time = datetime.utcnow()
start_time = end_time - timedelta(days=7)

response = requests.get(
    "https://api.vesselapi.com/v1/navtex",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={
        "time.from": start_time.strftime("%Y-%m-%dT%H:%M:%SZ"),
        "time.to": end_time.strftime("%Y-%m-%dT%H:%M:%SZ"),
        "pagination.limit": 50
    }
)

messages = response.json()
for msg in messages["navtexMessages"]:
    print(f"[{msg['label']}] {msg['issuing_office']}: {msg['raw_content'][:100]}")

Filter Messages Client-Side (JavaScript)

async function getPiracyAlerts() {
  const now = new Date();
  const weekAgo = new Date(now - 7 * 24 * 60 * 60 * 1000);

  const response = await fetch(
    `https://api.vesselapi.com/v1/navtex?` +
    new URLSearchParams({
      "time.from": weekAgo.toISOString(),
      "time.to": now.toISOString()
    }),
    { headers: { "Authorization": "Bearer YOUR_API_KEY" } }
  );

  const data = await response.json();
  // Filter by label client-side
  return data.navtexMessages.filter(msg =>
    msg.raw_content.toLowerCase().includes("piracy")
  );
}

Response Fields

Field Description
label Message type (e.g., "NAVIGATIONAL WARNING")
issuing_office Office that issued the bulletin
timestamp UTC timestamp of the broadcast
raw_content Full message text
lines Message content as array of lines
metarea_name METAREA name (e.g., "South China Sea")
metarea_coordinator Coordinating country for the METAREA
metarea_id METAREA numeric identifier
metarea_region Geographic region of the METAREA
metarea_stations List of broadcast stations in the METAREA
wmo_header WMO header code

Access Maritime Safety Data

Try the NAVTEX endpoint interactively in the API Explorer.

Related Documentation