---
title: "PortCalls"
method: GET
path: "/portcalls"
tags: ["Credit methods"]
---

# PortCalls

`GET /portcalls`

## Request

- Base URL: `https://api.vesselfinder.com`
- URL: `https://api.vesselfinder.com/portcalls`
- Auth: API key in query parameter `userkey`

Returns arrival and departure events for a port (`locode`) or for vessels (`imo`/`mmsi`).
If `locode` is given, `imo` and `mmsi` are ignored.

Use `last_id` for incremental polling: only events with an ID greater than the value
are returned, and `fromdate`/`todate` are ignored.

## Query parameters

- `format` 'json' | 'xml'
- `errormode` 409
- `locode` string
- `imo` string
- `mmsi` string
- `interval` integer
- `fromdate` string
- `todate` string
- `last_id` integer
- `event` 'arrival' | 'departure'
- `extradata` 'ais' | 'voyage' | 'ais,voyage'
- `anchorage` 0 | 1 | 2
- `imo_only` 0 | 1
- `limit` integer

## Response `200`

Port call events.

- union
  - PortCallRecord[]
    - `PORTCALL` PortCall, required: A single arrival or departure event.
      - `ID` integer: Unique event ID. Use with `last_id` for incremental polling.
      - `MMSI` integer
      - `IMO` integer
      - `LOCODE` string: UN/LOCODE of the port.
      - `EVENT` 'ARRIVAL' | 'DEPARTURE'
      - `TIMESTAMP` string: Event time, UTC.
      - `PORT` string: Port name.
      - `COUNTRY` string: Country of the port.
    - `AIS` AIS: Latest position and voyage-related data as broadcast over AIS.
      - `MMSI` integer: Maritime Mobile Service Identity.
      - `TIMESTAMP` string: Time the position was received, UTC (`YYYY-MM-DD HH:MM:SS UTC`).
      - `LATITUDE` number: Latitude
      - `LONGITUDE` number: Longitude
      - `COURSE` number: Course over ground
      - `SPEED` number: Speed over ground
      - `HEADING` integer: True heading, degrees. `511` = not available.
      - `NAVSTAT` integer: Navigational status. See [NavStat codes](https://api.vesselfinder.com/docs/ref-navstat.html).
      - `IMO` integer: IMO number. `0` when not broadcast.
      - `NAME` string: Vessel name.
      - `CALLSIGN` string: Radio call sign.
      - `TYPE` integer: AIS ship type. See [AIS Ship Types](https://api.vesselfinder.com/docs/ref-aistypes.html).
      - `A` integer: Antenna to bow, meters. `A + B` = length.
      - `B` integer: Antenna to stern
      - `C` integer: Antenna to port side, meters. `C + D` = beam.
      - `D` integer: Antenna to starboard side
      - `DRAUGHT` number: Current draught as reported over AIS.
      - `DESTINATION` string: Destination as entered by the crew (free text).
      - `LOCODE` string: UN/LOCODE of the destination, empty if it cannot be determined.
      - `ETA_AIS` string: ETA as entered by the crew, `MM-DD HH:MM`. Raw AIS value, may be invalid (e.g. `00-00 24:60`).
      - `ETA` string: ETA with the year added by VesselFinder, `YYYY-MM-DD HH:MM:SS`. Empty if unknown.
      - `SRC` 'TER': Position source. Always `TER` (terrestrial AIS).
      - `ZONE` string: Name of the sea area the vessel is in.
      - `ECA` boolean: Vessel is inside an ECA/SECA zone. In XML: `"true"`/`"false"`.
    - `VOYAGE` Voyage: Last port of call.
      - `LOCODE` string: UN/LOCODE of the last port.
      - `DEPARTURE` string: Departure time from the last port, UTC.
      - `LASTPORT` string: Name of the last port.
      - `LASTCOUNTRY` string: Country of the last port.
  - Error: Returned with HTTP 200 (default error mode) when parameters are invalid, the account is expired or blocked, or credits are insufficient. In XML: `<error>ERROR DESCRIPTION</error>`.
    - `error` string, required

## Other responses

- `409`: Error, returned only when `errormode=409` is set.

---

[API](https://skmtc.dev/vesselfinder/apis/vesselfinder-api.md) - [All operations](https://skmtc.dev/vesselfinder/apis/vesselfinder-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vesselfinder/apis/vesselfinder-api/revisions/da7c595e3467?raw)
