Ports API Reference
2 routes under /v1/ports. Base URL https://api.apifor.dev, authenticated with x-api-key, one credit per request. Coverage and licence are on the Ports page.
GET
/v1/portsList ports with filters and paging.
| Parameter | In | Type | Rules |
|---|---|---|---|
| page | query | integer | min 1 · default 1 |
| limit | query | integer | 1 to 200 · default 50 |
| country | query | string | ISO 3166-1 alpha-2 |
| q | query | string | 2 to 100 chars |
| unlocode | query | string | None |
curl 'https://api.apifor.dev/v1/ports' \
-G -d country=IS -d limit=1 \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": [
{
"wpi_number": 40,
"name": "Thorlakshofn",
"alt_name": null,
"unlocode": "ISTHH",
"country_name": "Iceland",
"country": "IS",
"region_name": "Iceland South Coast",
"water_body": "North Atlantic Ocean",
"lat": 63.85,
"lng": -21.366667,
"harbor_size": null,
"harbor_type": null,
"harbor_use": "Fishing",
"shelter": null,
"tidal_range_m": 2.8,
"entrance_width_m": null,
"channel_depth_m": 6.6,
"anchorage_depth_m": 11,
"cargo_pier_depth_m": null,
"oil_terminal_depth_m": null,
"lng_terminal_depth_m": null,
"max_vessel_length_m": null,
"max_vessel_beam_m": null,
"max_vessel_draft_m": 6.6,
"offshore_max_vessel_length_m": null,
"offshore_max_vessel_beam_m": null,
"offshore_max_vessel_draft_m": null,
"pilotage_compulsory": null,
"pilotage_available": null,
"tugs_assistance": null,
"facilities": "{\"anchorage\":true,\"ro_ro\":true,\"breakbulk\":true,\"potable_water\":true}",
"repairs": "Limited",
"dry_dock": null,
"navarea": "I",
"sailing_direction": "Sailing Directions Pub. 181 (Enroute) - Greenland and Iceland",
"publication_link": "https://msi.geo.nga.mil/api/publications/download?key=16694491/SFH00000/Pub181bk.pdf&type=view",
"chart": "38610"
}
]
}200Successful response. Pagination is explicit; no silent truncation.400Invalid query parameters404Record not found500Dataset unavailable
GET
/v1/ports/{id}Find ports by identifier.
| Parameter | In | Type | Rules |
|---|---|---|---|
| id * | path | string | None |
curl 'https://api.apifor.dev/v1/ports/{id}' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": {
"wpi_number": 40,
"name": "Thorlakshofn",
"alt_name": null,
"unlocode": "ISTHH",
"country_name": "Iceland",
"country": "IS",
"region_name": "Iceland South Coast",
"water_body": "North Atlantic Ocean",
"lat": 63.85,
"lng": -21.366667,
"harbor_size": null,
"harbor_type": null,
"harbor_use": "Fishing",
"shelter": null,
"tidal_range_m": 2.8,
"entrance_width_m": null,
"channel_depth_m": 6.6,
"anchorage_depth_m": 11,
"cargo_pier_depth_m": null,
"oil_terminal_depth_m": null,
"lng_terminal_depth_m": null,
"max_vessel_length_m": null,
"max_vessel_beam_m": null,
"max_vessel_draft_m": 6.6,
"offshore_max_vessel_length_m": null,
"offshore_max_vessel_beam_m": null,
"offshore_max_vessel_draft_m": null,
"pilotage_compulsory": null,
"pilotage_available": null,
"tugs_assistance": null,
"facilities": "{\"anchorage\":true,\"ro_ro\":true,\"breakbulk\":true,\"potable_water\":true}",
"repairs": "Limited",
"dry_dock": null,
"navarea": "I",
"sailing_direction": "Sailing Directions Pub. 181 (Enroute) - Greenland and Iceland",
"publication_link": "https://msi.geo.nga.mil/api/publications/download?key=16694491/SFH00000/Pub181bk.pdf&type=view",
"chart": "38610"
}
}200Successful response. Pagination is explicit; no silent truncation.400Invalid query parameters404Record not found500Dataset unavailable