# nearest_port_name

> Name of the nearest BTS principal port (port statistical area polygon; distance 0 when the point is inside it), searched up to 5,000 km; the distance is in the notes.

Source: https://docs.invariant-ai.com/fields/nearest_port_name

|  |  |
| --- | --- |
| Name | `nearest_port_name` |
| Layer | utilities |
| Type, unit | string, none |
| Sources (in order) | `BTS_PORTS` |
| Cache | 180 days (`ttl_seconds` 15552000) |

## What it is

Name of the nearest BTS principal port (port statistical area polygon; distance 0 when the point is inside it), searched up to 5,000 km; the distance is in the notes.

## Nulls

status "absent": no principal port within 5,000 km, or the nearest has no name. "failed": BTS did not answer, or equally near port areas carry different names.

## Example

```bash
curl -s https://api.invariant-ai.com/v1/fetch \
  -H "X-API-Key: $INVARIANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat": 39.0438, "lng": -77.4874, "fields": ["nearest_port_name"]}'
```

Field object keys are described in [Responses](https://docs.invariant-ai.com/responses). Live definition: [`GET /v1/meta/fields`](https://docs.invariant-ai.com/api/meta-fields).
