Vai al contenuto
GET /v1/nearby

Ports within a radius of a coordinate

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/seaports-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/seaports-api/v1/nearby" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/seaports-api/v1/nearby", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/seaports-api/v1/nearby");
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/seaports-api/v1/nearby",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "count": 10,
        "total": 27,
        "center": {
            "lat": 51.9,
            "lon": 4.48
        },
        "results": [
            {
                "id": "31140",
                "name": "Rotterdam",
                "country": "Netherlands",
                "latitude": 51.9,
                "longitude": 4.48333,
                "un_locode": "NL RTM",
                "water_body": "North Sea; North Atlantic Ocean",
                "distance_km": 0.2,
                "harbor_size": "Large",
                "harbor_type": "River (Basins)"
            },
            {
                "id": "31130",
                "name": "Schiedam",
                "country": "Netherlands",
                "latitude": 51.9,
                "longitude": 4.4,
                "un_locode": "NL SCI",
                "water_body": "North Sea; North Atlantic Ocean",
                "distance_km": 5.5,
                "harbor_size": "Very Small",
                "harbor_type": "River (Basins)"
            },
            {
                "id": "31120",
                "name": "Vlaardingen",
                "country": "Netherlands",
                "latitude": 51.9,
                "longitude": 4.35,
                "un_locode": "NL VLA",
                "water_body": "North Sea; North Atlantic Ocean",
                "distance_km": 8.9,
                "harbor_size": "Very Small",
                "harbor_type": "River (Basins)"
            },
            {
                "id": "31150",
                "name": "Dordrecht",
                "country": "Netherlands",
                "latitude": 51.81667,
                "longitude": 4.65,
                "un_locode": "NL DOR",
                "water_body": "North Sea; North Atlantic Ocean",
                "distance_km": 14.9,
                "harbor_size": "Medium",
                "harbor_type": "River (Natural)"
            },
            {
                "id": "31100",
                "name": "Maassluis",
                "country": "Netherlands",
                "latitude": 51.91667,
                "longitude": 4.25,
                "un_locode": "NL MSL",
                "water_body": "North Sea; North Atlantic Ocean",
                "distance_km": 15.9,
                "harbor_size": "Very Small",
                "harbor_type": "Canal or Lake"
            },
            {
                "id": "31080",
                "name": "Hoek Van Holland",
                "country": "Netherlands",
                "latitude": 51.95,
                "longitude": 4.13333,
                "un_locode": "NL HVH",
                "water_body": "North Sea; North Atlantic Ocean",
                "distance_km": 24.4,
                "harbor_size": "Very Small",
                "harbor_type": "River (Basins)"
            },
            {
                "id": "31085",
                "name": "Europoort",
                "country": "Netherlands",
                "latitude": 51.95,
                "lon
…