---
title: "Historical AIS positions for a vessel"
method: GET
path: "/api/v0/vessel_history"
tags: ["Historical Vessel Data"]
---

# Historical AIS positions for a vessel

`GET /api/v0/vessel_history`

## Request

- Base URL: `https://api.datalastic.com`
- URL: `https://api.datalastic.com/api/v0/vessel_history`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in query parameter `api-key`
- TypeScript: <https://skmtc.dev/datalastic/apis/datalastic-maritime-api/docs/api/v0/vessel_history/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a time-series of past AIS positions for one vessel. Use `days`
for a relative window, or `from`/`to` for an absolute range. Data is
available from 10 August 2021 onward. Only position changes are stored,
so a stationary vessel may have gaps.

**Credit cost:** 2 credits per calendar date returned. Billing is per
date returned, not per day requested. A window of N days usually spans
N+1 UTC dates, so `days=1` typically costs 4 credits. Dates with no
position data are not charged.

## Query parameters

- `mmsi` string
- `imo` string
- `uuid` string, uuid
- `days` integer
- `from` string, date
- `to` string, date

## Response `200`

Ordered list of historical position records.

- object
  - `data` VesselHistoryRecord[]
    - `mmsi` string
    - `lat` number, float
    - `lon` number, float
    - `speed` number, float
    - `course` number, float
    - `heading` number, float
    - `navigational_status` string, nullable
    - `destination` string, nullable
    - `timestamp_UTC` string, date-time
    - `timestamp_epoch` integer
  - `meta` Meta
    - `duration` number, float: Server-side query time in seconds.
    - `endpoint` string
    - `success` boolean
    - `next` string: Pagination token. Present on paginated endpoints (`/vessel_find`) only when more results exist. Pass it back as the `next` query parameter to fetch the following page.

## Other responses

- `400`: Missing required parameter or invalid parameter value.
- `401`: Invalid or expired API key.
- `402`: API key is valid but the credit balance is exhausted or the subscription has expired. Purchase more credits to continue.
- `404`: Requested vessel, port, or resource was not found. No credits deducted.
- `429`: More than 600 API calls in a single minute. The response carries a `Retry-After` header with the wait in seconds. Use it for backoff.
- `500`: Server-side error. Retry the request.

## Changes

- **2026-09-08** `a29cf323d1c3`: 1 warning, 7 info
  - deleted the `query` request parameter `api-key`
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `404`
  - added the non-success response with the status `400`
  - …4 more

[Operation history](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/changes/api/v0/vessel_history/get.md)

---

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