AISHub members are allowed to access AISHub webservice and retrieve AISHub data in XML, JSON or CSV format.
NOTE! Don’t access the webservice more frequently than once per minute! The web service will return nothing if executed more frequently!
Webservice URL
https://data.aishub.net/ws.php?username=A&format=B&output=C&compress=D&latmin=E&latmax=F&lonmin=G&lonmax=H&mmsi=I&imo=J&interval=K
PARAMETERS
Parameter | Default | Description |
---|---|---|
A | - | your AISHub username. You will receive it after joining AISHub. |
B | 0 | format of data values (0 – AIS encoding , 1 – Human readable format) |
C | xml | output format (xml, json, csv) |
D | 0 | compression (0 – no compression, 1 – ZIP, 2 – GZIP, 3 – BZIP2) |
E | -90 | South (minimum) latitude |
F | +90 | North (maximum) latitude |
G | -180 | West (minimum) longitude |
H | +180 | East (maximum) longitude |
I | - | MMSI number or list of numbers (webservice returns data for the requested vessels only) |
J | - | IMO number or list of numbers (webservice returns data for the requested vessels only) |
K | - | The maximum age of the returned positions (in minutes) |
Examples:
Returns all AISHub data as XML file (ZIP compression)
https://data.aishub.net/ws.php?username=USERNAME&format=1&output=xml&compress=1
Returns all vessels in an area with boundaries (South 20.5 / North 30.8 / West -15.0 / East 18.6) as JSON file (BZIP2 compression)
https://data.aishub.net/ws.php?username=USERNAME&format=1&output=json&compress=3&latmin=20.5&latmax=30.8&lonmin=-15&lonmax=18.6
Returns all data for vessel with MMSI 123456789
https://data.aishub.net/ws.php?username=USERNAME&format=1&output=json&compress=2&mmsi=123456789
Returns all data for vessels from list with MMSI numbers and list of IMO numbers
https://data.aishub.net/ws.php?username=USERNAME&format=1&output=json&compress=2&mmsi=123456789,223456789&imo=1234567,1234568,1234569&imo=1234567,1234568,1234569
Output values
AIS format (B=0)
XML<vessel MMSI="244750034" TIME="1625826373" LONGITUDE="3022820" LATITUDE="31476126" COG="3600" SOG="0" HEADING="511" ROT="128" NAVSTAT="8" IMO="0" NAME="CHATEAUROUX" CALLSIGN="PH7002" TYPE="69" A="24" B="6" C="0" D="6" DRAUGHT="12" DEST="" ETA="1596"/>JSON
{"MMSI":244750034,"TIME":"1625826523","LONGITUDE":3022815,"LATITUDE":31476144,"COG":3600,"SOG":0,"HEADING":511,"ROT":128,"NAVSTAT":8,"IMO":0,"NAME":"CHATEAUROUX","CALLSIGN":"PH7002","TYPE":69,"A":24,"B":6,"C":0,"D":6,"DRAUGHT":12,"DEST":"","ETA":1596}CSV
"MMSI","TSTAMP","LATITUDE","LONGITUDE”,"COG","SOG","HEADING","NAVSTAT","IMO","NAME","CALLSIGN","TYPE","A","B","C","D","DRAUGHT","DEST","ETA" 244750034,1625826632,31476160,3022802,3600,0,511,8,0,"CHATEAUROUX","PH7002",69,24,6,0,6,12,"",1596
Human-readable format (B=1)
XML<vessel MMSI="244750034" TSTAMP="2021-07-08 08:20:32 GMT" LONGITUDE="5.03812" LATITUDE="52.46015" COG="360" SOG="0" HEADING="511" ROT="128" NAVSTAT="8" IMO="0" NAME="CHATEAUROUX" CALLSIGN="PH7002" TYPE="69" A="24" B="6" C="0" D="6" DRAUGHT="1.2" DEST="" ETA="00-00 24:60"/>JSON
{"MMSI":244750034,"TIME":"2021-07-09 08:06:53 GMT","LONGITUDE":5.03806,"LATITUDE":52.46015,"COG":360,"SOG":0,"HEADING":511,"ROT":128,"NAVSTAT":8,"IMO":0,"NAME":"CHATEAUROUX","CALLSIGN":"PH7002","TYPE":69,"A":24,"B":6,"C":0,"D":6,"DRAUGHT":1.2,"DEST":"","ETA":"00-00 24:60"}CSV
"MMSI","TSTAMP","LATITUDE","LONGITUDE","COG","SOG","HEADING","NAVSTAT","IMO","NAME","CALLSIGN","TYPE","A","B","C","D","DRAUGHT","DEST","ETA" 244750034,"2021-07-09 10:18:34 GMT",52.46025,5.03806,360,0,511,8,0,"CHATEAUROUX","PH7002",69,24,6,0,6,1.2,"","00-00 24:60"
Explanation of data values:
MMSI | Maritime Mobile Service Identity |
TIME | data timestamp AIS format – unix timestamp Human readable format – UTC |
LONGITUDE | geographical longitude AIS format – in 1/10000 minute i.e. degrees multiplied by 600000 Human readable format – degrees |
LATITUDE | geographical latitude AIS format – in 1/10000 minute i.e. degrees multiplied by 600000 Human readable format – degrees |
COG | Course Over Ground AIS format – in 1/10 degrees i.e. degrees multiplied by 10. COG=3600 means “not available” Human readable format – degrees. COG=360.0 means “not available” |
SOG | Speed Over Ground AIS format – in 1/10 knots i.e. knots multiplied by 10. SOG=1024 means “not available” Human readable format – knots. SOG=102.4 means “not available” |
HEADING | current heading of the AIS vessel at the time of the last message value in degrees, HEADING=511 means “not available” |
PAC | (AIS format only) – Position Accuracy 0 – low accuracy 1 – high accuracy |
ROT | (AIS format only) - Rate of Turn |
NAVSTAT | Navigational Status |
IMO | IMO ship identification number |
NAME | vessel’s name (max.20 chars) |
CALLSIGN | vessel’s callsign |
TYPE | vessel’s type (more details here) |
DEVICE | positioning device type (more details here) |
A | Dimension to Bow (meters) |
B | Dimension to Stern (meters) |
C | Dimension to Port (meters) |
D | Dimension to Starboard (meters) |
DRAUGHT | AIS format – in 1/10 meters i.e. draught multiplied by 10. Human readable format – meters |
DEST | vessel’s destination |
ETA | Estimated Time of Arrival AIS format (see here). Human readable format – UTC date/time |
AISHub members are allowed to access AISHub webservice and retrieve AISHub data in XML, JSON or CSV format.
NOTE! Don’t access the webservice more frequently than once per minute! The web service will return nothing if executed more frequently!
Webservice URL
https://data.aishub.net/stations.php?username=A&output=B&compress=C&id=D
PARAMETERS
Parameter | Default | Description |
---|---|---|
A | - | your AISHub username. You will receive it after joining AISHub. |
B | xml | output format (xml, json, csv) |
C | 0 | compression (0 – no compression, 1 – ZIP, 2 – GZIP, 3 – BZIP2) |
D | - | Station id (webservice returns data for the represented station only) |
Examples:
Returns all stations as XML file
https://data.aishub.net/stations.php?username=USERNAME&output=xml
Returns all data for station with ID 2333
https://data.aishub.net/stations.php?username=USERNAME&output=xml&id=2333
Output values
XML<station ID="2333" LASTUPDATE="2021-07-12 07:05:01 GMT" COUNTRY="United Kingdom" LOCATION="TEST-EP" SHIPS="41" DISTINCT="36" CONTRIBUTOR=""/>JSON
{"ID":2333,"LASTUPDATE":"2021-07-12 07:20:01 GMT","COUNTRY":"United Kingdom","LOCATION":"TEST-EP","SHIPS":41,"DISTINCT":38,"CONTRIBUTOR":""}CSV
"SID","LASTUPDATE","COUNTRY","LOCATION","SHIPS","DISTINCT" 2333,"2021-07-12 07:25:01 GMT","United Kingdom","TEST-EP",40,38
Explanation of data values:
SID | Station ID (unique for each station) |
LASTUPDATE | data timestamp human readable format – UTC |
COUNTRY | country of the station |
LOCATION | location of the station |
SHIPS | count of ships in coverage |
DISTINCT | count of unique ships |
AIS API
[ {"ERROR":false,"USERNAME":"USERNAME","FORMAT":"HUMAN","RECORDS":5}, [ {"MMSI":311733000,"TIME":"2021-07-09 12:08:05 GMT","LONGITUDE":-63.04667,"LATITUDE":18.01317,"COG":48.7,"SOG":0,"HEADING":49,"ROT":0,"NAVSTAT":5,"IMO":9111802,"NAME":"ENCHANTMENT OTS","CALLSIGN":"C6FZ7","TYPE":60,"A":49,"B":253,"C":17,"D":15,"DRAUGHT", 7.2,"DEST":"PHILIPSBURG","ETA":"07-04 13:00"}, {"MMSI":374651000,"TIME":"2021-07-09 12:09:25 GMT","LONGITUDE":-128.26693,"LATITUDE":33.89075,"COG":122.6,"SOG":14.7,"HEADING":119,"ROT":-8,"NAVSTAT":0,"IMO":9853864,"NAME":"FUTURE DIAMOND","CALLSIGN":"3ETX9","TYPE":80,"A":188,"B":42,"C":11,"D":21,"DRAUGHT":8,"DEST":"PA BLB","ETA":"07-18 22:30"}, {"MMSI":413797631,"TIME":"2021-07-09 12:04:09 GMT","LONGITUDE":120.23183,"LATITUDE":31.94281,"COG":51.4,"SOG":0.3,"HEADING":51,"ROT":128,"NAVSTAT":15,"IMO":0,"NAME":"ZHECHANGXINGHUO6810","CALLSIGN":"","TYPE":70,"A":5,"B":38,"C":4,"D":4,"DRAUGHT":0,"DEST":"","ETA":"00-00 00:00"}, {"MMSI":224206370,"TIME":"2021-07-09 12:09:08 GMT","LONGITUDE":-8.89313,"LATITUDE":42.2015,"COG":36.7,"SOG":9.9,"HEADING":511,"ROT":128,"NAVSTAT":15,"IMO":0,"NAME":"ONA B","CALLSIGN":"EA9286","TYPE":37,"A":9,"B":8,"C":3,"D":2,"DRAUGHT":0,"DEST":"","ETA":"00-00 00:00"}, {"MMSI":229295000,"TIME":"2021-07-09 12:09:21 GMT","LONGITUDE":9.91864,"LATITUDE":53.5434,"COG":256.5,"SOG":0.1,"HEADING":273,"ROT":0,"NAVSTAT":0,"IMO":9597355,"NAME":"ZP BOXER","CALLSIGN":"9HA3213","TYPE":52,"A":8,"B":16,"C":7,"D":5,"DRAUGHT":5.8,"DEST":"HAMBURG","ETA":"10-27 05:00"} ] ]
STATIONS API
[ {"ERROR":false,"USERNAME":"USERNAME","RECORDS":866}, [ {"ID":2333,"LASTUPDATE":"2021-07-27 08:25:01 GMT","COUNTRY":"United Kingdom","LOCATION":"TEST-EP","SHIPS":53,"DISTINCT":51,"CONTRIBUTOR":""}, {"ID":2145,"LASTUPDATE":"2021-07-27 08:25:01 GMT","COUNTRY":"Belgium","LOCATION":"Antwerp2","SHIPS":466,"DISTINCT":38,"CONTRIBUTOR":"Tresco Engineering"}, {"ID":2061,"LASTUPDATE":"2021-07-27 08:25:01 GMT","COUNTRY":"Belgium","LOCATION":"Ostend","SHIPS":42,"DISTINCT":0,"CONTRIBUTOR":""}, ... {"ID":2243,"LASTUPDATE":"2021-07-27 08:25:01 GMT","COUNTRY":"Netherlands","LOCATION":"Arnhem","SHIPS":3,"DISTINCT":0,"CONTRIBUTOR":""}, {"ID":2155,"LASTUPDATE":"2021-07-27 08:25:01 GMT","COUNTRY":"Netherlands","LOCATION":"Lelystad","SHIPS":16,"DISTINCT":0,"CONTRIBUTOR":""} ] ]
AIS API
<?xml version="1.0" encoding="iso-8859-1"?> <VESSELS ERROR="false" USERNAME="USERNAME" FORMAT="AIS" RECORDS="5"> <vessel MMSI="311733000" TIME="1625832485" LONGITUDE="-37828000" LATITUDE="10807900" COG="487" SOG="0" HEADING="49" ROT="0" NAVSTAT="5" IMO="9111802" NAME="ENCHANTMENT OTS" CALLSIGN="C6FZ7" TYPE="60" A="49" B="253" C="17" D="15" DRAUGHT="72" DEST="PHILIPSBURG" ETA="467776"/> <vessel MMSI="374651000" TIME="1625832672" LONGITUDE="-76955688" LATITUDE="20332052" COG="1225" SOG="147" HEADING="119" ROT="6" NAVSTAT="0" IMO="9853864" NAME="FUTURE DIAMOND" CALLSIGN="3ETX9" TYPE="80" A="188" B="42" C="11" D="21" DRAUGHT="80" DEST="PA BLB" ETA="497054"/> <vessel MMSI="413797631" TIME="1625832249" LONGITUDE="72139100" LATITUDE="19165687" COG="514" SOG="3" HEADING="51" ROT="128" NAVSTAT="15" IMO="0" NAME="ZHECHANGXINGHUO6810" CALLSIGN="" TYPE="70" A="5" B="38" C="4" D="4" DRAUGHT="0" DEST="" ETA=""/> <vessel MMSI="224206370" TIME="1625832634" LONGITUDE="-5334807" LATITUDE="25323438" COG="261" SOG="116" HEADING="511" ROT="128" NAVSTAT="15" IMO="0" NAME="ONA B" CALLSIGN="EA9286" TYPE="37" A="9" B="8" C="3" D="2" DRAUGHT="0" DEST="" ETA=""/> <vessel MMSI="229295000" TIME="1625832671" LONGITUDE="5951179" LATITUDE="32125974" COG="2565" SOG="1" HEADING="271" ROT="0" NAVSTAT="0" IMO="9597355" NAME="ZP BOXER" CALLSIGN="9HA3213" TYPE="52" A="8" B="16" C="7" D="5" DRAUGHT="58" DEST="HAMBURG" ETA="710976"/> </VESSELS>
STATIONS API
<?xml version="1.0" encoding="iso-8859-1"?> <STATIONS ERROR="false" USERNAME="USERNAME" RECORDS="866"> <station ID="2333" LASTUPDATE="2021-07-27 07:50:01 GMT" COUNTRY="United Kingdom" LOCATION="TEST-EP" SHIPS="50" DISTINCT="49" CONTRIBUTOR=""/> <station ID="2145" LASTUPDATE="2021-07-27 07:50:01 GMT" COUNTRY="Belgium" LOCATION="Antwerp2" SHIPS="477" DISTINCT="44" CONTRIBUTOR="Tresco Engineering"/> <station ID="2061" LASTUPDATE="2021-07-27 07:50:01 GMT" COUNTRY="Belgium" LOCATION="Ostend" SHIPS="43" DISTINCT="0" CONTRIBUTOR=""/> ... <station ID="2243" LASTUPDATE="2021-07-27 07:50:01 GMT" COUNTRY="Netherlands" LOCATION="Arnhem" SHIPS="1" DISTINCT="0" CONTRIBUTOR=""/> <station ID="2155" LASTUPDATE="2021-07-27 07:50:01 GMT" COUNTRY="Netherlands" LOCATION="Lelystad" SHIPS="13" DISTINCT="0" CONTRIBUTOR=""/> </STATIONS>
AIS API
"MMSI","TSTAMP","LATITUDE","LONGITUDE","COG","SOG","HEADING","NAVSTAT","IMO","NAME","CALLSIGN","TYPE","A","B","C","D","DRAUGHT","DEST","ETA" 311733000,1625832485,10807900,-37828000,487,0,49,5,9111802,"ENCHANTMENT OTS","C6FZ7",60,49,253,17,15,72,"PHILIPSBURG",467776 374651000,1625832779,20329692,-76951235,1222,148,119,0,9853864,"FUTURE DIAMOND","3ETX9",80,188,42,11,21,80,"PA BLB",497054 413797631,1625832249,19165687,72139100,514,3,51,15,0,"ZHECHANGXINGHUO6810","",70,5,38,4,4,0,"", 224206370,1625832634,25323438,-5334807,261,116,511,15,0,"ONA B","EA9286",37,9,8,3,2,0,"", 229295000,1625832772,32125970,5951165,2565,0,271,0,9597355,"ZP BOXER","9HA3213",52,8,16,7,5,58,"HAMBURG",710976
STATIONS API
"ID","LASTUPDATE","COUNTRY","LOCATION","SHIPS","DISTINCT","CONTRIBUTOR" 2333,"2021-07-27 08:30:01 GMT","United Kingdom","TEST-EP",54,52,"" 2145,"2021-07-27 08:30:01 GMT","Belgium","Antwerp2",461,36,"Tresco Engineering" 2061,"2021-07-27 08:30:01 GMT","Belgium","Ostend",41,0,"" ... 2243,"2021-07-27 08:30:01 GMT","Netherlands","Arnhem",2,0,"" 2155,"2021-07-27 08:30:01 GMT","Netherlands","Lelystad",14,0,""