Ports All docs

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/ports

List ports with filters and paging.

ParameterInTypeRules
pagequeryintegermin 1 · default 1
limitqueryinteger1 to 200 · default 50
countryquerystringISO 3166-1 alpha-2
qquerystring2 to 100 chars
unlocodequerystringNone
GET/v1/ports
curl 'https://api.apifor.dev/v1/ports' \
  -G -d country=IS -d limit=1 \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "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 parameters
  • 404Record not found
  • 500Dataset unavailable
GET/v1/ports/{id}

Find ports by identifier.

ParameterInTypeRules
id *pathstringNone
GET/v1/ports/{id}
curl 'https://api.apifor.dev/v1/ports/{id}' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "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 parameters
  • 404Record not found
  • 500Dataset unavailable

Error handling · Rate limits · Source licences