GitHunt
RE

reyemb/oss-aisexplorer

Marine vessel tracking tool by geolocation, MMSI, or MarineTraffic URLs

AISExplorer

PyPI
PyPI - Downloads
Python

A Python library for retrieving marine vessel data from MarineTraffic. Query vessels by MMSI, geographic area, or MarineTraffic URLs.

Features

  • Locate vessels by MMSI identifier
  • Retrieve vessel data within geographic areas (up to 500 vessels)
  • Query data directly via MarineTraffic URLs
  • Flexible filtering by vessel type, flag, speed, location, and more
  • Return data as JSON or pandas DataFrame

Installation

pip install aisexplorer

Usage

Find Vessel by MMSI

from aisexplorer.AIS import AIS

# Returns vessel location data
AIS().get_location(211281610)

# Returns as pandas DataFrame
AIS(return_df=True).get_location(211281610)

Find Vessels in Area

from aisexplorer.AIS import AIS

# Get vessels in East Mediterranean (max 500 results)
AIS(return_df=True).get_area_data("EMED")

Available area codes can be found in the MarineTraffic documentation.

Query via URL

from aisexplorer.AIS import AIS

url = "https://www.marinetraffic.com/en/data/?asset_type=vessels&columns=..."
AIS(return_df=True).get_data_by_url(url)

Using Filters

from aisexplorer.AIS import AIS

ais = AIS(return_df=True, return_total_count=True)

ais.set_filters(filter_config={
    'latest_report': [360, 525600],
    'lon': [-18, -4],
    'lat': [30, 31]
})

df, count = ais.get_area_data("WMED")

Configuration Options

Parameter Type Default Description
return_df bool False Return pandas DataFrame instead of dict
return_total_count bool False Include total result count
verbose bool False Enable verbose logging
columns str/list "all" Columns to include
columns_excluded list None Columns to exclude
num_retries int 10 Number of retry attempts
seconds_wait int 15 Seconds between retries

Limitations

  • Maximum 500 vessels per area query
  • Proxy support has been discontinued
  • Login functionality is currently unavailable due to captcha implementation

License

This project is open source.

Languages

Python100.0%

Contributors

Created November 20, 2021
Updated February 21, 2026
reyemb/oss-aisexplorer | GitHunt