To simplify integration, our team has developed an open-source API wrapper for all VesselFinder API methods. The wrapper is available in both PHP and Python, and can be accessed on GitHub.
Below are two quick examples demonstrating how easy it is to work with the VesselFinder API using the wrapper:
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
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);
}