> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datadocked.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Historical Vessel Data

> Retrieve historical vessel positions for voyage reconstruction. Returns up to 3000 positions per request. Historical data extends back 2 years. Pricing is based on the number of unique dates in results (5 credits per date). Based on terrestrial AIS data only. Rate limit: 15 requests/min.

Retrieve historical vessel positions for voyage reconstruction and route analysis.

<Info>
  **Credits:** 5 credits per unique date in results (variable total)
</Info>

## Date Format

Dates must be provided in ISO 8601 format:

```
from_date=2026-01-23T00:00:00Z
to_date=2026-02-06T23:59:59Z
```

## Limits

* **Maximum date range: 90 days** per request
* Returns up to **3,000 positions** per request
* Historical data extends back **2 years**

<Tip>
  Need more than 90 days? Make multiple requests with consecutive date ranges. For example, to get 6 months of data, make 2 requests covering 90 days each.
</Tip>

<Warning>
  This endpoint currently uses **terrestrial AIS data only**. Satellite AIS coverage will be added in a future update.
</Warning>

## Pricing

Credits are calculated based on the number of unique calendar dates in your results, not the number of positions returned.

| Date Range | Estimated Credits |
| ---------- | ----------------- |
| 1 day      | 5 credits         |
| 1 week     | 35 credits        |
| 2 weeks    | 70 credits        |

## Response Fields

Each position includes:

* `lat`: Latitude
* `lng`: Longitude
* `course`: Course over ground
* `speed`: Speed over ground
* `time`: ISO 8601 timestamp


## OpenAPI

````yaml GET /get-vessel-historical-data
openapi: 3.1.0
info:
  title: Data Docked Maritime API
  description: >-
    A comprehensive maritime data API providing real-time vessel tracking, port
    operations, inspection data, and more. Access AIS data, vessel particulars,
    management information, and historical tracking data.
  version: 1.0.0
  contact:
    name: Data Docked Support
    url: https://datadocked.com/contact
servers:
  - url: https://datadocked.com/api/vessels_operations
    description: Production server
security:
  - apiKey: []
tags:
  - name: Account
    description: Account management endpoints
  - name: Vessel Operations
    description: Vessel data, location, and tracking endpoints
  - name: Port Operations
    description: Port calls and port data endpoints
paths:
  /get-vessel-historical-data:
    get:
      tags:
        - Vessel Operations
      summary: Get Historical Vessel Data
      description: >-
        Retrieve historical vessel positions for voyage reconstruction. Returns
        up to 3000 positions per request. Historical data extends back 2 years.
        Pricing is based on the number of unique dates in results (5 credits per
        date). Based on terrestrial AIS data only. Rate limit: 15 requests/min.
      operationId: getVesselHistoricalData
      parameters:
        - name: imo_or_mmsi
          in: query
          required: true
          description: >-
            The IMO or MMSI number of the vessel you want to retrieve historical
            positions for.
          schema:
            type: string
          example: '9321483'
        - name: from_date
          in: query
          required: true
          description: Beginning of the date range in ISO 8601 format.
          schema:
            type: string
            format: date-time
          example: '2026-01-23T00:00:00Z'
        - name: to_date
          in: query
          required: true
          description: End of the date range in ISO 8601 format.
          schema:
            type: string
            format: date-time
          example: '2026-02-06T23:59:59Z'
      responses:
        '200':
          description: Successful response with historical positions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalDataResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    HistoricalDataResponse:
      type: object
      properties:
        status:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              lat:
                type: number
                description: Latitude
              lng:
                type: number
                description: Longitude
              course:
                type: number
                description: Course over ground
              speed:
                type: number
                description: Speed over ground
              time:
                type: string
                format: date-time
                description: Position timestamp
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error type
        message:
          type: string
          description: Error message
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your personal API key found in your profile dashboard at
        https://datadocked.com/dashboard/my_keys

````