1. Help Center
  2. Spire Sense Maritime
  3. Spire Maritime 2.0 - GraphQL API

Maritime 2.0 GraphQL - Filtering for Tanker, Cargo or Merchant Fleet Vessels

How to filter for Tanker, Cargo or Merchant Fleet Vessels in Maritime 2.0 graphQL

In the old Vessels API, it was only possible to filter only on the general AIS ship_type values Tanker or Cargo.  Maritime 2.0 graphQL filters vessels on specific commercial ship types instead. A table of the ShipType values reported in Maritime 2.0 can be found here https://maritime-docs.spire.com/api/maritime_20/fundamentals/#shiptype

If you want to receive the equivalent filter results as were provided in Vessels API then 

the filters in Maritime 2.0 for Cargo and Tanker are shown below 

Filter for Cargo Vessels

use this filter in Maritime 2.0

shipType:[CAR_CARRIER,COMBINATION_CARRIER,CONTAINER,DRY_BULK,GENERAL_CARGO,LIVESTOCK,REEFER,ROLL_ON_ROLL_OFF] 

Filter for tanker vessels

use this filter in Maritime 2.0

shipType:[GAS_CARRIER,GENERAL_TANKER,LNG_CARRIER,TANKER_CHEMICALS,TANKER_CRUDE,TANKER_PRODUCT]

Filter for the Merchant Fleet

use this filter in Maritime 2.0

shipType:[CAR_CARRIER,COMBINATION_CARRIER,CONTAINER,DRY_BULK,GENERAL_CARGO,LIVESTOCK,REEFER,ROLL_ON_ROLL_OFF,VEHICLE_PASSENGER,GAS_CARRIER,GENERAL_TANKER,LNG_CARRIER,TANKER_CHEMICALS,TANKER_CRUDE,TANKER_PRODUCT]