ShipLookup API Documentation

Comprehensive maritime vessel data API for developers. Access detailed ship information including IMO numbers, vessel specifications, and ownership details.

🔑 Authentication

All API requests require authentication using an API key. You can obtain an API key by creating an account and generating one in your dashboard.

Authentication Methods

X-API-Key Header

X-API-Key: YOUR_API_KEY

⚠️ Security Note: Keep your API key secure and never expose it in client-side code. Treat it like a password.

🌐 Base URL

https://shiplookup.com/api

All API endpoints are relative to this base URL. All requests must be made over HTTPS.

⚡ Rate Limits

Per Minute

60 requests

Per Hour

1,000 requests

Rate limit headers are included in all responses to help you track your usage.

🚢 Get All Ships

Endpoint

GET /api/ships

Description

Retrieve a paginated list of ships from the database. This endpoint is useful for browsing available vessels or implementing data export functionality.

Query Parameters

ParameterTypeDefaultDescription
limitinteger10Number of ships to return (1-100)
offsetinteger0Number of ships to skip for pagination

Example Request

curl -X GET "https://shiplookup.com/api/ships?limit=5&offset=0" \
-H "Authorization: X-API-Key YOUR_API_KEY"

Example Response

{
  "success": true,
  "data": [
    {
      "imo": 9876543,
      "mmsi": 123456789,
      "name": "Ocean Explorer",
      "vesselName": "OCEAN EXPLORER",
      "callsign": "ABCD123",
      "length": 200.5,
      "beam": 32.0,
      "grossTonnage": 45000,
      "yearBuilt": 2015,
      "shipType": "Container Ship",
      "flag": "Panama",
      "aisType": "Container Ship",
      "aisFlag": "Panama"
    }
  ],
  "meta": {
    "userId": "user_123",
    "apiKeyId": "key_456",
    "timestamp": "2025-01-27T10:30:00Z",
    "pagination": {
      "limit": 5,
      "offset": 0,
      "count": 1
    }
  }
}

🔍 Get Ship by IMO

Endpoint

GET /api/ships/{imo}

Description

Retrieve detailed information about a specific ship using its International Maritime Organization (IMO) number. This endpoint provides comprehensive vessel data and consumes 1 credit per request.

Path Parameters

ParameterTypeDescription
imointegerThe IMO number of the ship (numeric only)

Example Request

curl -X GET "https://shiplookup.com/api/ships/9876543" \
-H "Authorization: X-API-Key YOUR_API_KEY"

Example Response

{
  "success": true,
  "data": {
    "imo": 9876543,
    "mmsi": 123456789,
    "name": "Ocean Explorer",
    "vesselName": "OCEAN EXPLORER",
    "callsign": "ABCD123",
    "length": 200.5,
    "beam": 32.0,
    "grossTonnage": 45000,
    "yearBuilt": 2015,
    "shipType": "Container Ship",
    "flag": "Panama",
    "aisType": "Container Ship",
    "aisFlag": "Panama"
  },
  "meta": {
    "timestamp": "2025-01-27T10:30:00Z",
    "creditsUsed": 1,
    "creditsRemaining": 299
  }
}

🔎 Search Ships

Endpoint

GET /api/ships/search

Description

Search for ships using various criteria including IMO, MMSI, name, vessel name, or callsign. At least one search parameter is required. Text searches are case-insensitive and support partial matches.

Query Parameters

ParameterTypeRequiredDescription
namestringNoPartial name search (case-insensitive)
vessel_namestringNoPartial vessel name search
callsignstringNoPartial callsign search
limitintegerNoNumber of results to return (1-100, default: 10)

Example Requests

Search by IMO:

curl -X GET "https://shiplookup.com/api/ships/search?imo=9876543" \
-H "Authorization: X-API-Key YOUR_API_KEY"

Search by name:

curl -X GET "https://shiplookup.com/api/ships/search?name=ocean&limit=5" \
-H "Authorization: X-API-Key YOUR_API_KEY"

Search by callsign:

curl -X GET "https://shiplookup.com/api/ships/search?callsign=ABCD" \
-H "Authorization: X-API-Key YOUR_API_KEY"

Example Response

{
  "success": true,
  "data": [
    {
      "imo": 9876543,
      "mmsi": 123456789,
      "name": "Ocean Explorer",
      "vesselName": "OCEAN EXPLORER",
      "callsign": "ABCD123",
      "length": 200.5,
      "beam": 32.0,
      "grossTonnage": 45000,
      "yearBuilt": 2015,
      "shipType": "Container Ship",
      "flag": "Panama",
      "aisType": "Container Ship",
      "aisFlag": "Panama"
    }
  ],
  "meta": {
    "userId": "user_123",
    "apiKeyId": "key_456",
    "timestamp": "2025-01-27T10:30:00Z",
    "count": 1,
    "limit": 10,
    "searchParams": {
      "imo": null,
      "mmsi": null,
      "name": "ocean",
      "vessel_name": null,
      "callsign": null
    }
  }
}

✅ Test Authentication

Endpoint

GET /api/test-auth

Description

Test endpoint to verify your API key is valid and working correctly. This endpoint doesn't consume any credits and is useful for debugging authentication issues.

Example Request

curl -X GET "https://shiplookup.com/api/test-auth" \
-H "Authorization: X-API-Key YOUR_API_KEY"

Example Response

{
  "message": "API key is valid!",
  "userId": "user_123",
  "apiKeyId": "key_456"
}

📊 Data Models

Ship Object

FieldTypeDescription
imointegerInternational Maritime Organization number
mmsiintegerMaritime Mobile Service Identity number
namestringShip name as registered
vesselNamestringVessel name in uppercase format
callsignstringRadio callsign identifier
lengthnumberShip length in meters
beamnumberShip width in meters
grossTonnageintegerGross tonnage capacity
yearBuiltintegerYear the ship was built
shipTypestringType of ship (e.g., "Container Ship", "Tanker")
flagstringCountry of registration
aisTypestringAIS ship type classification
aisFlagstringAIS flag state

❌ Error Codes

The API uses standard HTTP status codes to indicate success or failure. All error responses include a descriptive error message.

400 - Bad Request

Invalid parameters or malformed request

{
  "error": "Limit must be between 1 and 100"
}

401 - Unauthorized

Missing or invalid API key

{
  "error": "API key required"
}

402 - Payment Required

Insufficient credits for the request

{
  "error": "Insufficient credits"
}

404 - Not Found

Ship not found with the provided IMO

{
  "error": "Ship with IMO 9876543 not found"
}

429 - Too Many Requests

Rate limit exceeded

{
  "error": "Rate limit exceeded"
}

500 - Internal Server Error

Unexpected server error

{
  "error": "Internal server error"
}

💰 Credits System

The ShipLookup API uses a credit-based system to manage usage and ensure fair access to our maritime database.

Get All Ships

Free

No credits consumed

Search Ships

Free

No credits consumed

Get Ship by IMO

1 Credit

This endpoint consumes 1 credit per request and provides detailed ship information.

💡 Tip: Use the search endpoint to find ships without consuming credits, then use the specific IMO lookup for detailed information when needed.

🚀 Getting Started

1

Create an Account

Sign up for a free account to access the API

2

Generate API Key

Go to your dashboard and generate an API key

3

Test Your Setup

Use the test endpoint to verify your API key works

4

Start Building

Integrate our API into your application

🆘 Support

Need help with the API? We're here to assist you with integration and technical questions.

📧 Email Support

Contact us at support@shiplookup.com

📚 Documentation

This page contains all the information you need