/v1/meta
Totals & harbor-size breakdown
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/seaports-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/seaports-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/seaports-api/v1/meta");
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/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "id = World Port Index number. Depths/sizes in metres. Facility flags may be null when unsurveyed.",
"total": 3804,
"fields": [
"id",
"name",
"alt_name",
"un_locode",
"country",
"region",
"water_body",
"latitude",
"longitude",
"harbor_size",
"harbor_type",
"harbor_use",
"shelter",
"channel_depth_m",
"anchorage_depth_m",
"cargo_pier_depth_m",
"max_vessel_length_m",
"max_vessel_draft_m",
"facilities",
"pilotage_compulsory"
],
"source": "NGA World Port Index (WPI / Pub 150)",
"countries": 195,
"with_locode": 3345,
"harbor_sizes": [
{
"size": "Very Small",
"count": 2114
},
{
"size": "Small",
"count": 1017
},
{
"size": "Medium",
"count": 370
},
{
"size": "Large",
"count": 174
}
]
},
"meta": {
"timestamp": "2026-05-31T03:55:45.262Z",
"request_id": "d0f1caf8-4cbe-4401-9fa7-b44b25ca88cd"
},
"status": "ok",
"message": "Meta retrieved",
"success": true
}