For feeders · Feed API

The world feed, by API.

Qualifying stations get a key to the whole AISMesh feed. Parameters keep the AISHub names. A script you already run switches by changing one address. The rest is ours: a fresh picture every minute, changes only, raw NMEA and clean JSON. Steady stations also get every message in hourly files.

Open. Once your station qualifies, make your key in My station. KEY stands for that key; the vessels in the samples are invented.
60 sA new world picture every minute
since=Only what changed since your last call
5 outputsJSON, GeoJSON, XML, CSV, raw NMEA
One URLAISHub scripts switch by changing the address

Quick start

Ask for an area and you get the vessels in it, newest position first. Call again after a minute with since and you get only the vessels that changed.

Shell
curl -s --compressed "https://api.aismesh.com/ws.php?username=KEY&latmin=50&latmax=52&lonmin=0&lonmax=3"

Request

GEThttps://api.aismesh.com/ws.php?username=KEY&output=json
  • One snapshot every minute. The world picture is rebuilt every 60 seconds. Calling more often returns the same picture. The API answers 429 with the seconds to wait.
  • HTTPS only, with gzip when your client asks for it.
  • Positions thinned to one per vessel per minute. Static, voyage and safety data are passed in full. Every message, not thinned, is in the hourly files.
  • Each reply carries generated (the time of the picture) and next_since (the value for your next call).

Parameters

All optional except username. Names and values match the AISHub web service where it has them; new marks what AISMesh adds.

ParameterDefaultWhat it does
usernameRequiredYour station feed key. Same name as on AISHub. Existing scripts only change the address.
outputjsonjson, xml, csv, geojson or nmea. new geojson and nmea.
formatnot setLeave it out for the clean AISMesh layout. 1 gives the AISHub style layout with readable values, 0 the AISHub style layout with values in AIS units. Only for json, xml and csv.
compress00 none, 1 zip, 2 gzip, as on AISHub. Simpler: send Accept-Encoding: gzip and leave it at 0.
latmin latmax
lonmin lonmax
whole worldArea in decimal degrees, south and west negative. A box that crosses 180° works: set lonmin greater than lonmax.
mmsiallOne MMSI or up to 100, separated by commas.
imoallOne IMO number or up to 100, separated by commas.
intervalallOnly vessels whose last position is at most this many minutes old.
since newnot setOnly vessels changed after this time. Pass next_since from the last reply (ISO 8601 UTC or Unix seconds). Saves most of the transfer on each call after the first.

Fields

The clean layout uses plain objects, decimal degrees, ISO 8601 UTC times and null for anything the vessel does not send; units sit in the field name. With format=1 or 0 the same data comes under the AISHub names in the second column.

FieldAISHub nameTypeUnitMeaning
mmsiMMSIintegerMaritime Mobile Service Identity, 9 digits.
timeTIMEISO 8601 UTCWhen the last position report was received.
latLATITUDEnumberdegreesWGS 84, north positive. null when the vessel sends none (91 in AIS).
lonLONGITUDEnumberdegreesWGS 84, east positive. null when the vessel sends none (181 in AIS).
sog_knSOGnumberknotsSpeed over ground, 0 to 102.2. null for not available.
cog_degCOGnumberdegreesCourse over ground, true, 0 to 359.9. null for not available (360 in AIS).
heading_degHEADINGintegerdegreesTrue heading, 0 to 359. null for not available (511 in AIS).
rot_deg_minROTnumber°/minRate of turn, decoded from the AIS value; right positive, left negative. null when not sent.
accuracy_highPACbooleanPosition accuracy flag: true is better than 10 m.
navstatNAVSTATintegerNavigational status, see codes.
imoIMOintegerIMO number. null when not sent.
nameNAMEtextVessel name, up to 20 characters, trailing @ removed.
callsignCALLSIGNtextRadio call sign, up to 7 characters.
typeTYPEintegerType of ship and cargo, see codes.
classnonetextA or B. new
dim_m.a b c dA B C DintegermetresFrom the position reference to bow (A), stern (B), port (C) and starboard (D).
length_m, beam_mnoneintegermetresA + B and C + D, worked out for you. new
draught_mDRAUGHTnumbermetresPresent static draught, 0.1 m steps.
destDESTtextDestination as typed on board, up to 20 characters.
etaETAtextUTCMonth, day, hour and minute as sent: MM-DDTHH:MMZ. AIS carries no year.

With format=0 values stay in AIS units, as AISHub gives them: positions in 1/10 000 minute, speed, course and draught in tenths, rate of turn and ETA as transmitted.

Codes

From Recommendation ITU-R M.1371-5, the technical standard for AIS.

Navigational status navstat

CodeMeaning
0Under way using engine
1At anchor
2Not under command
3Restricted manoeuvrability
4Constrained by her draught
5Moored
6Aground
7Engaged in fishing
8Under way sailing
9Reserved for a future status for high speed craft carrying dangerous goods, harmful substances or marine pollutants (IMO hazard or pollutant category C)
10Reserved for a future status for wing in ground craft carrying dangerous goods, harmful substances or marine pollutants (IMO hazard or pollutant category A)
11Power driven vessel towing astern (regional use)
12Power driven vessel pushing ahead or towing alongside (regional use)
13Reserved for future use
14AIS-SART, MOB-AIS or EPIRB-AIS, active
15Not defined (default; also AIS-SART, MOB-AIS and EPIRB-AIS under test)

Type of ship and cargo type

CodeMeaning
0Not available or no ship
1 to 19Reserved for future use
20 to 29Wing in ground craft (second digit below)
30Fishing
31Towing
32Towing, length of tow over 200 m or breadth over 25 m
33Dredging or underwater operations
34Diving operations
35Military operations
36Sailing
37Pleasure craft
38, 39Reserved for future use
40 to 49High speed craft (second digit below)
50Pilot vessel
51Search and rescue vessel
52Tug
53Port tender
54Anti-pollution equipment
55Law enforcement
56, 57Spare, for assignment to local vessels
58Medical transport
59Noncombatant ship (RR Resolution No. 18)
60 to 69Passenger ship (second digit below)
70 to 79Cargo ship (second digit below)
80 to 89Tanker (second digit below)
90 to 99Other type of ship (second digit below)

Second digit for 20s, 40s, 60s, 70s, 80s and 90s

For example 71 is a cargo ship carrying category X goods, 80 a tanker with the category not given (all ships of this type) and 89 a tanker with no additional information.

DigitMeaning
0All ships of this type
1Carrying DG, HS or MP, IMO hazard or pollutant category X
2Category Y
3Category Z
4Category OS
5 to 8Reserved for future use
9No additional information

Samples

The same three invented vessels in each output. Vessel B lies at anchor. It has no course and no rate of turn.

output=json
{
  "generated": "2026-11-21T21:40:12Z",
  "next_since": "2026-11-21T21:40:12Z",
  "vessels": [
    {
      "mmsi": 219000101,
      "time": "2026-11-21T21:39:58Z",
      "lat": 57.84105,
      "lon": 10.88214,
      "sog_kn": 12.6,
      "cog_deg": 62.4,
      "heading_deg": 63,
      "rot_deg_min": 0.0,
      "accuracy_high": true,
      "navstat": 0,
      "imo": null,
      "name": "DEMO VESSEL A",
      "callsign": "DEMOA",
      "type": 70,
      "class": "A",
      "dim_m": {
        "a": 120,
        "b": 24,
        "c": 12,
        "d": 11
      },
      "length_m": 144,
      "beam_m": 23,
      "draught_m": 7.4,
      "dest": "SE GOT",
      "eta": "11-22T06:30Z"
    },
    {
      "mmsi": 563000202,
      "time": "2026-11-21T21:39:47Z",
      "lat": 1.18322,
      "lon": 103.92031,
      "sog_kn": 0.1,
      "cog_deg": null,
      "heading_deg": 247,
      "rot_deg_min": null,
      "accuracy_high": false,
      "navstat": 1,
      "imo": null,
      "name": "DEMO VESSEL B",
      "callsign": "DEMOB",
      "type": 80,
      "class": "A",
      "dim_m": {
        "a": 150,
        "b": 33,
        "c": 16,
        "d": 16
      },
      "length_m": 183,
      "beam_m": 32,
      "draught_m": 11.2,
      "dest": "SG SIN",
      "eta": "11-22T08:00Z"
    },
    {
      "mmsi": 367000303,
      "time": "2026-11-21T21:40:03Z",
      "lat": 28.9124,
      "lon": -89.42118,
      "sog_kn": 7.1,
      "cog_deg": 341.0,
      "heading_deg": 340,
      "rot_deg_min": -3.6,
      "accuracy_high": true,
      "navstat": 0,
      "imo": null,
      "name": "DEMO VESSEL C",
      "callsign": "DEMOC",
      "type": 31,
      "class": "A",
      "dim_m": {
        "a": 22,
        "b": 8,
        "c": 5,
        "d": 5
      },
      "length_m": 30,
      "beam_m": 10,
      "draught_m": 3.6,
      "dest": "US MSY",
      "eta": "11-22T02:15Z"
    }
  ]
}

output=nmea gives the sentences as received, one per line: positions thinned to one per vessel per minute, static, voyage and safety messages in full, multi part messages kept together.

Hourly files

The complete feed: every message from every AISMesh station, not thinned, each with the time it was received. One gzip file for each UTC hour, ready 15 minutes after the hour ends. Positions, static, voyage and safety messages, base stations and aids to navigation: all of it, one copy of each transmission when several stations hear it.

  • For steady stations. Your key opens the files once your station has fed steadily for 30 days: online at least 90 % of the time with a median delay of 10 seconds or less over those 30 days, on top of the 7 day rules. My station shows how close it is.
  • Kept 7 days. The list shows every hour still there. Each file never changes once made: its name carries the hour and the list gives its size and SHA-256.
  • 30 files a day per key. Every hour of the day once with room to spare. The rest of a broken download (a Range request) does not count again.
GEThttps://api.aismesh.com/v1/hourly?username=KEY
List reply
{
  "files": [
    {
      "hour": "2026-11-23T14:00:00Z",
      "name": "aismesh-2026-11-23T14Z.nmea.gz",
      "url": "https://api.aismesh.com/v1/hourly/aismesh-2026-11-23T14Z.nmea.gz",
      "size": 48213377,
      "sha256": "9f2c4e81a07d55b3c1e6f0a2b8d94c37e15a6b0d2f8c41e93a7b6d05c2e81f4a"
    }
  ],
  "downloads_today": 3,
  "downloads_per_day": 30,
  "downloads_left_today": 27,
  "next_file_at": "2026-11-23T15:15:00Z",
  "delay_minutes": 15,
  "kept_hours": 168
}
GEThttps://api.aismesh.com/v1/hourly/aismesh-2026-11-23T14Z.nmea.gz?username=KEY

The download may answer with a redirect to a short lived storage address. Follow it: curl -L does, and so do most libraries. The key also works as Authorization: Bearer KEY.

Shell
curl -fL -o aismesh-2026-11-23T14Z.nmea.gz \
  "https://api.aismesh.com/v1/hourly/aismesh-2026-11-23T14Z.nmea.gz?username=KEY"
sha256sum aismesh-2026-11-23T14Z.nmea.gz     # compare with the list

Inside, one sentence per line. Each line starts with an NMEA 4 TAG block that carries the receive time in Unix seconds (c:); multi part messages stay together. Most decoders read TAG blocks. If yours does not, cut them off:

File lines
\c:1795442400*55\!AIVDM,1,1,,A,13@ne9@01vPil88Q6<uRL1wl0000,0*2E
\c:1795442401*54\!AIVDM,2,1,1,B,53@ne9H00000@Dlt400@Dlv1HE=<Dj0400000016?0H<;6s6NBTiH1km0000,0*40
\c:1795442401*54\!AIVDM,2,2,1,B,00000000000,2*26
Shell
zcat aismesh-2026-11-23T14Z.nmea.gz | sed 's/^\\[^\\]*\\//' > hour.nmea

Stations API

Your own station, as your station page shows it: health, records, rank, boards, ribbons and badges. Use it for a display at home, a club screen or your own alerts.

GEThttps://api.aismesh.com/station?username=KEY
Reply
{
  "station": {
    "id": "DEMO-0612",
    "name": "Demo Station",
    "sea": "North Sea",
    "online": true,
    "last_message": "2026-11-21T21:40:11Z",
    "now": {
      "vessels": 36,
      "messages_per_min": 208
    },
    "today": {
      "farthest_nm": 104.2
    },
    "online_30d_pct": 99.2,
    "delay_median_s": 1.8,
    "feed_key": {
      "state": "active",
      "qualified_since": "2026-11-14"
    },
    "rank": {
      "name": "Chief Officer",
      "watches": 612,
      "next": "Master",
      "watches_to_next": 483
    },
    "boards": {
      "sea_week": 1,
      "world_week": 23
    },
    "streak_days": 41,
    "ribbons": [
      "plank-owner",
      "first-light",
      "shipmate-b",
      "sea-time-1m",
      "sea-time-6m"
    ],
    "badges": [
      "long-range",
      "first-sighting",
      "rare-catch",
      "night-watch"
    ]
  }
}

The Stations API shows your station only. Station positions stay private and no list of stations is published.

Errors

Real HTTP status codes and a short JSON body that says what to do. Nothing hides in a header.

StatusCodeWhat to do
400bad_parameterA parameter is out of range or not understood. The message names it.
401unknown_keyNo station has this key, or it was replaced. Copy it again from My station.
403key_pausedYour station has been silent for more than 48 hours. The key works again by itself a few minutes after your feed returns.
403not_qualifiedThe station has not met the 7 day rules yet. My station shows how close it is.
403not_steadyHourly files only. The station has not fed steadily for 30 days yet. My station shows how close it is.
404not_foundHourly files only. No file for that hour: it is not ready yet or it is older than 7 days. The list shows what is there.
429too_soonLess than a minute since your last call. Retry-After gives the seconds to wait.
429daily_volumeThe key has taken its 600 MB for today. Retry-After gives the seconds to midnight UTC.
429daily_limitHourly files only. The key has taken its 30 files for today. Retry-After gives the seconds to midnight UTC.
503maintenanceShort planned work. Retry-After says when to come back.
429 reply, with the header Retry-After: 18
{
  "error": {
    "status": 429,
    "code": "too_soon",
    "message": "One call per 60 seconds per key. Try again in 18 seconds.",
    "retry_after_s": 18
  }
}

With format=1 or 0 the first object also carries "ERROR": true and "ERROR_MESSAGE": AISHub style scripts see the error where they look for it.

Limits and fair use

One key per station

Given after 7 days on watch: 10 vessels or more, 90 % online, messages within 10 seconds, your own antenna.

One call per minute

Per key. A new picture is only made every minute.

600 MB a day

Per key, counted as sent: gzip counts compressed. An area or since keeps each call small.

Hourly files

After 30 steady days. 30 files a day per key, each kept 7 days.

Personal, non commercial

For you and your own projects. No passing the data or the key on.

Pauses after 48 h silent

If your station stops sending for 48 hours the key pauses and it comes back by itself when your feed does.

The full rules are in the contributor terms.

Coming from AISHub

  1. Change the address to https://api.aismesh.com/ws.php and the username to your AISMesh key.
  2. Keep format=1 or format=0 and your script reads the same field names as before. The header has no RECORDS field. Count the rows if your script needs a number.
  3. When you have time: drop format for the clean layout, add since and call once a minute.

AISMesh asks for no exclusivity: keep feeding AISHub and the other networks you feed today. The AISMesh Relay sends to all of them at once.