API Wrapper

VesselFinder API Wrapper

Our team has developed an API wrapper for all API methods. The wrapper is developed in PHP and Python. It is open-source and available at GitHub.

Here are two examples of how easy it is to use the VesselFinder API with the wrapper implementation:

Python example (VESSELS method)

from vesselfinder_api import VesselFinderApi
from vesselfinder_api.exceptions import ApiErrorException

v = VesselFinderApi(userkey='-- Input your userkey here --', errormode=False, save_last_info=True)

try:
    print(v.vessels(imo=[9228801,9441271], mmsi=227441980))
except ApiErrorException as e:
    print(e)

PHP example (VESSELS method)

<?php
include __DIR__ . '/../VesselFinderApi.php';

use API\VesselFinderApi;

$client = new VesselFinderApi('-- Input your userkey here --');

try {
    $vessels = $client->vessels([9228801,9441271], 227441980);
    print_r($vessels);
} catch (\Exceptions\ApiErrorException $e) {
    print_r($e->getMessage() . PHP_EOL);
}