Ir al contenido
GET /v1/search

Search seaports by name and country

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/ports-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

curl "https://api.oanor.com/ports-api/v1/search" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/ports-api/v1/search", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/ports-api/v1/search");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/ports-api/v1/search",
    headers={"x-oanor-key": "oanor_test_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "data": {
        "count": 1,
        "limit": 20,
        "total": 1,
        "offset": 0,
        "filters": {
            "q": "rotterdam",
            "country": "NL"
        },
        "results": [
            {
                "name": "Rotterdam",
                "locode": "NLRTM",
                "country": "NL",
                "latitude": 51.9167,
                "longitude": 4.5,
                "connections": {
                    "rail": true,
                    "road": true,
                    "airport": true
                },
                "subdivision": "ZH",
                "country_name": "The Netherlands"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T00:48:52.223Z",
        "request_id": "3484e989-50ff-4019-9432-28831a25338e"
    },
    "status": "ok",
    "message": "Search completed",
    "success": true
}