---
updatedAt: 2025-08-18T14:28:48.000Z
agentTools:
  projectIndex: https://documentation.safecube.ai/llms.txt
---

# Search Port Details by its name or unlocode

Retrieve detailed informations about a specific port by its UNLOCODE. It include the berth occupation rate and the difference with the average one.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Safecube Ports Intelligence API",
    "version": "1.0.0-beta",
    "description": "Welcome to the documentation of the Safecube Ports Intelligence API\n<p><strong>Beta Version</strong></p> <p><strong>This API is currently in BETA It is subject to change and may not be fully stable.</p> <p>Use with caution in production environments.</strong></p>\n<h1>Compatibility guidelines</h1> <p>The HTTP API is versioned with a single number, which is currently 1</p> <p>This number symbolizes the major version number. New features can be added to the API in the same version number if there is no breaking change.</p> <p>The version number is present in the url, for instance <strong>/ports-intelligence/api/v1</strong> for the current version.\n<h1>Documentation</h1> <p>You can find the complete documentation for our API at <a href='https://documentation.safecube.ai/'>Safecube documentation</a>.</p>\n<h1>Authentication</h1> <p>Every endpoints of this API require authentication using an API key with a specific authorization.</p> <p>If you don't have an API Key and you need to use the Safecube Shipment Management API, you need to ask Sinay to have one.</p> <p>To use the API Key, you must add a header named <strong>API_KEY</strong> with your API Key as a value.</p> <h1>Test the API with Swagger-ui</h1> <p>To test the API using Swagger-ui, you must click on the button <strong>Authorize</strong> and then fill the <strong>apiKey</strong> field and click on <strong>Authorize</strong>.</p> <p>Swagger-ui will then use the api key automatically in each request.</p> <p>On every endpoints, you can click on <strong>Try it out</strong>, you can modify the body and then click on <strong>Execute</strong></p> <p>You will be able to see the response.</p>"
  },
  "servers": [
    {
      "url": "https://api.sinay.ai/ports-intelligence/api/v1"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/ports/search?filter={filter}": {
      "get": {
        "tags": [
          "Ports"
        ],
        "summary": "Search Port Details by its name or unlocode",
        "description": "Retrieve detailed informations about a specific port by its UNLOCODE. It include the berth occupation rate and the difference with the average one.",
        "operationId": "searchPortDetails",
        "parameters": [
          {
            "name": "filter",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE or the name of the port (e.g., FRLEH or Le Havre)",
            "schema": {
              "type": "string",
              "example": "FRLEH"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                },
                "examples": {
                  "covered_port": {
                    "summary": "Covered Port Example (FRLEH)",
                    "value": {
                      "portDetails": {
                        "name": "LE HAVRE",
                        "longitude": 0.146204,
                        "latitude": 49.4726,
                        "unlocode": "FRLEH",
                        "countryName": "France",
                        "countryCode": "FR"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "API_KEY",
        "description": "API key for authentication"
      }
    },
    "schemas": {
      "Port": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the port"
          },
          "longitude": {
            "type": "number",
            "format": "float",
            "description": "Longitude coordinate"
          },
          "latitude": {
            "type": "number",
            "format": "float",
            "description": "Latitude coordinate"
          },
          "unlocode": {
            "type": "string",
            "description": "UN/LOCODE of the port"
          },
          "countryName": {
            "type": "string",
            "description": "Country name"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO country code"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message"
          },
          "code": {
            "type": "string",
            "description": "Error code"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Error timestamp"
          }
        }
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "Authentication information is missing or invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Unauthorized",
              "code": "AUTH_001",
              "timestamp": "2025-07-17T10:30:00Z"
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The requested resource was not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Resource not found",
              "code": "NOT_FOUND",
              "timestamp": "2025-07-17T10:30:00Z"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Internal server error",
              "code": "INTERNAL_ERROR",
              "timestamp": "2025-07-17T10:30:00Z"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Ports",
      "description": "Retrieve data related to port information and vessels in ports"
    }
  ]
}
```