---
name: nga-world-port-index-ingestion
description: "How to get NGA World Port Index data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load NGA port indexes into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/nga-world-port-index
Provider: https://msi.nga.mil/Publications/WPI
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key is required for the checked public name-index endpoint.

## Request
```bash
curl 'https://msi.nga.mil/api/publications/world-port-index/wpi-prc-names'
```

## Format
JSON arrays of port, country and region names.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""NGA WPI public port, country, and region indexes -> pandas -> Parquet."""
import requests
import pandas as pd

URL = "https://msi.nga.mil/api/publications/world-port-index/wpi-prc-names"
r = requests.get(URL, timeout=60)
r.raise_for_status()
data = r.json()
frames = [pd.DataFrame({"kind": kind, "name": values})
          for kind, values in data.items()]
df = pd.concat(frames, ignore_index=True)
df.to_parquet("nga_wpi_indexes.parquet", index=False)
counts = df.groupby("kind").size().to_dict()
print(len(df), "index entries", counts)
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 4114 index entries {'countries': 220, 'ports': 3541, 'regions': 353}

## Limits
- Rate limit: Not stated.
- The checked endpoint returns name indexes rather than full port records.

## Quirks
- The JSON object separates countries, ports and regions into arrays; add a kind column before concatenating them.
- Detailed-query requests returned service errors during verification, while the name-index endpoint succeeded.
- Port names are not stable identifiers; retain provider record identifiers when using full-record downloads.

## Terms and attribution
- NGA says website information is public information that may be distributed or copied unless otherwise specified.
- NGA requests appropriate credits.
- Terms page: https://www.nga.mil/resources/Privacy_Policy.html

## Sources
- https://msi.nga.mil/api/publications/download?key=16693975%2FSFH00000%2FBowditch_Vol_1_LoRes.pdf&type=view: "known facilities, and available services of a great many ports, shipping facilities, and oil terminals throughout the world."
- https://msi.nga.mil/api/publications/download?key=16693975%2FSFH00000%2FBowditch_Vol_1_LoRes.pdf&type=view: "The enhanced data is available to download in five formats: csv, geopackage, json, shapefile, and file geodatabase."
- https://www.nga.mil/resources/Privacy_Policy.html: "Information presented on this website is considered public information and may be distributed or copied unless otherwise specified."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
