1. Datasets
  2. Ports
  3. Puerto Rico

Puerto Rico Ports API

14 ports for Puerto Rico, from NGA World Port Index. Filter the collection with country=PR and you get the same JSON shape as every other country.

GET /v1/portsPublic domain / US government workPR28 Nov 2026

Request and response

Add country filtering to the collection endpoint and you get Puerto Rico records back. The response below is the example from our OpenAPI document, so it shows the exact shape you get, though the record itself may come from another country.

GET/v1/ports
curl 'https://api.apifor.dev/v1/ports' \
  -G -d country=PR \
  -H 'x-api-key: YOUR_API_KEY'
Example response · application/json
{
  "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"
    }
  ]
}

Fields

Each record in data has these fields. Types are read from the example values; a nullable field can hold null for some records.

FieldTypeExample
wpi_numberinteger40
namestring"Thorlakshofn"
alt_namenullablenull
unlocodestring"ISTHH"
country_namestring"Iceland"
countrystring"IS"
region_namestring"Iceland South Coast"
water_bodystring"North Atlantic Ocean"
latnumber63.85
lngnumber-21.366667
harbor_sizenullablenull
harbor_typenullablenull
harbor_usestring"Fishing"
shelternullablenull
tidal_range_mnumber2.8
entrance_width_mnullablenull
channel_depth_mnumber6.6
anchorage_depth_minteger11
cargo_pier_depth_mnullablenull
oil_terminal_depth_mnullablenull
lng_terminal_depth_mnullablenull
max_vessel_length_mnullablenull
max_vessel_beam_mnullablenull
max_vessel_draft_mnumber6.6
offshore_max_vessel_length_mnullablenull
offshore_max_vessel_beam_mnullablenull
offshore_max_vessel_draft_mnullablenull
pilotage_compulsorynullablenull
pilotage_availablenullablenull
tugs_assistancenullablenull
facilitiesstring"{\"anchorage\":true,\"ro_ro\":true,\"breakbulk…
repairsstring"Limited"
dry_docknullablenull
navareastring"I"
sailing_directionstring"Sailing Directions Pub. 181 (Enroute) - Greenl…
publication_linkstring (url)"https://msi.geo.nga.mil/api/publications/downl…
chartstring"38610"

Filters and paging

Query parameters accepted by GET /v1/ports. Full detail, including the single-record route, is in the endpoint reference.

ParameterTypeRules
pageintegermin 1 · default 1
limitinteger1 to 200 · default 50
countrystringISO 3166-1 alpha-2
qstring2 to 100 chars
unlocodestringNone