# USCG Navigation Restriction Resolver (`rhincodontypus/uscg-navigation-restriction-resolver`) Actor

Check a point or vessel route against current official U.S. Coast Guard maritime safety information. Returns intersecting safety zones, navigation hazards, marine construction, events, naval activity, space-operation areas, and source provenance as structured data for AI agents and automation.

- **URL**: https://apify.com/rhincodontypus/uscg-navigation-restriction-resolver.md
- **Developed by:** [Jonathan Brown](https://apify.com/rhincodontypus) (community)
- **Categories:** Travel, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 navigation area checks

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## USCG Navigation Restriction Resolver

Check a point, a vessel route or a bounding box against **current official U.S. Coast Guard maritime safety
information**. Returns one structured record listing the intersecting safety zones, hazards to navigation,
marine construction, marine events, naval activity, space-operation areas, temporary aids-to-navigation
changes, TESS advisories and geospatial MSIBs, with official text, validity windows, geometry and source
provenance.

> **Not navigational advice.** This Actor reports official notice records. It never says a route is safe,
> clear or unrestricted. Zero matches means no matching records were found in the official datasets
> successfully checked. It is not a statement that navigation is hazard-free or unrestricted. Mariners must
> still consult official charts, current Local and Broadcast Notices to Mariners, VHF broadcasts and
> applicable Coast Guard instructions, and follow onboard navigation and safety procedures.

### What it does

Point / route / bbox → official USCG NAVCEN Maritime Safety Information layers → spatially relevant notices.

- **Source:** the GeoJSON layers published by the USCG Navigation Center (NAVCEN) at
  [navcen.uscg.gov/msi](https://www.navcen.uscg.gov/msi). No third-party data.
- **Geometry:** buffers and intersections are computed in a local azimuthal-equidistant projection centred on
  your query, so nautical-mile radii and corridors are real distances (not degree buffers). Reported distances
  are geodesic on the WGS84 ellipsoid.
- **Time:** each notice is classified `active`, `upcoming` or `unknown` (no dates published) at `atTime`
  (default: now). Expired notices are excluded and counted.
- **Coverage:** every dataset file checked is listed with its status (`success`, `unavailable`, `timeout`,
  `invalid_format`, `listed_but_not_published`) and publication time. A failed layer makes the result
  `partial`; it never looks like zero notices.
- **Listed but not published:** if NAVCEN's file index lists a file that NAVCEN does not serve (HTTP 404),
  it is reported in `coverage.unpublishedDatasets`. It is not treated as checked or empty, so coverage is
  incomplete and `coverage.coverageNote` says records there were not checked.
- **Per-file category coverage:** `coverage.categories` gives each requested category a `status`
  (`complete`, `partial`, `unavailable`) and lists its dataset files as `checked`, `unavailable` or
  `listedButNotPublished`. A category with any file checked stays in `categoriesChecked`; if some of its files
  were not checked it is also in `categoriesPartiallyChecked`. Example: today NAVCEN lists `safeZoneLine_1`
  but does not serve it, so `safety_zone` is `partial` with `safeZone_1` and `safeZonePoly_1` checked.

### Input

Provide exactly one of `point`, `route` or `bbox` (WGS84 decimal degrees).

```json
{"point": {"lat": 40.89, "lon": -73.78}, "radiusNm": 5}
```

```json
{"route": [{"lat": 29.31, "lon": -94.70}, {"lat": 29.73, "lon": -95.03}], "corridorNm": 1}
```

```json
{"bbox": {"south": 40.4, "west": -74.3, "north": 40.9, "east": -73.7}}
```

| Field | Notes |
|---|---|
| `point` + `radiusNm` | Default 5 nm, 0.1–50 nm. |
| `route` + `corridorNm` | 2–200 ordered positions you supply (≤1500 nm). Corridor half-width default 1 nm, 0.1–25 nm. The Actor does not plan routes. |
| `bbox` | ≤10° per side; must not cross the antimeridian. |
| `atTime` | ISO 8601 with timezone. Default now (UTC). |
| `categories` | Optional subset of `safety_zone`, `hazard_to_navigation`, `marine_construction`, `marine_event`, `naval_activity`, `space_operation`, `temporary_change`, `tess_advisory`, `msib`. |

Named places (e.g. "Port Canaveral") are not resolved in v1; pass coordinates.

### Output (one dataset item)

| Field | Meaning |
|---|---|
| `status` | `success` (all requested layers checked), `partial` (some layers failed), `source_unavailable`, `invalid_input`. |
| `coverage` | `categories` (per-category status and files), `categoriesChecked`, `categoriesPartiallyChecked`, `categoriesUnavailable`, `categoriesFailed`, `categoriesIncomplete`, `completeForRequestedLayers`, `coverageNote`, `sourceFailures`, `unpublishedDatasets`, per-file `datasets`, `notCovered`. |
| `summary` | `matchedNoticeCount`, `activeCount`, `upcomingCount`, `unknownValidityCount`, `expiredExcludedCount`, `categoriesMatched`, `byCategory`. |
| `notices[]` | `category`, `title`, `validity`, `effectiveWindow`, official GeoJSON `geometry`, `relationshipToQuery` (`intersectsQueryGeometry`, `withinSearchArea`, `minimumDistanceNm`, `routePosition`), verbatim `officialText`, `source` (dataset URL, record dates). |
| `scopeNote` | What a zero-match result does and does not mean. |

Route results are ordered by `routePosition` (approximate fraction of your route length where the notice is
nearest or first intersected); point and bbox results by distance. No severity score is invented: use the
official category and wording.

### Ideal use cases

Pre-voyage information gathering, maritime operations workflows, route screening, harbor/port
reconnaissance, marine construction planning, space-operation awareness, and autonomous agent research.

### What it does NOT do

Route planning, collision avoidance, chart replacement, navigational clearance, weather routing, legal
compliance determination, or assurance of safe transit. It does not check Broadcast Notices to Mariners
(planned), NOAA charts, NGA NAVAREA warnings, AIS, tides or weather.

### Pricing

Pay per event: `navigation-area-check` **$0.05** per query, plus a $0.00005 start event.

- Charged when all requested layers were checked, **including zero matches**.
- Charged when some layers failed but matching notices were still found (status `partial`).
- **Not charged** for invalid input, or when coverage is incomplete (failed or unpublished layers) and nothing was found.

### Limitations

- Coverage is limited to what NAVCEN publishes as geospatial MSI records; notices without geometry are not
  returned. NAVCEN publishes dates at day granularity.
- Freshness depends on NAVCEN's publication. Layers are reused for at most a short period, and only while
  NAVCEN's file index shows the same publication time.
- Broadcast Notices to Mariners are not included in v1.

# Actor input Schema

## `point` (type: `object`):

A position {"lat": 27.9506, "lon": -80.4547}. Notices within radiusNm are returned.

## `radiusNm` (type: `number`):

Search radius around point. Default 5, range 0.1-50.

## `route` (type: `array`):

User-supplied route as 2-200 ordered positions \[{"lat":..,"lon":..}, ...], up to 1500 nm. The Actor does not plan routes.

## `corridorNm` (type: `number`):

Distance either side of the route. Default 1, range 0.1-25.

## `bbox` (type: `object`):

{"south":..,"west":..,"north":..,"east":..}, at most 10 degrees per side; must not cross the antimeridian.

## `atTime` (type: `string`):

ISO 8601 time with timezone used to classify notices as active, upcoming or expired. Default: now.

## `categories` (type: `array`):

Limit to these categories. Default: all of safety_zone, hazard_to_navigation, marine_construction, marine_event, naval_activity, space_operation, temporary_change, tess_advisory, msib.

## Actor input object example

```json
{
  "point": {
    "lat": 40.7,
    "lon": -74.02
  }
}
```

# Actor output Schema

## `result` (type: `string`):

The single record: status, query, coverage (categoriesChecked, completeForRequestedLayers, sourceFailures), summary counts and notices with official text, validity, geometry and relationshipToQuery.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "point": {
        "lat": 40.7,
        "lon": -74.02
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rhincodontypus/uscg-navigation-restriction-resolver").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "point": {
        "lat": 40.7,
        "lon": -74.02,
    } }

# Run the Actor and wait for it to finish
run = client.actor("rhincodontypus/uscg-navigation-restriction-resolver").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "point": {
    "lat": 40.7,
    "lon": -74.02
  }
}' |
apify call rhincodontypus/uscg-navigation-restriction-resolver --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rhincodontypus/uscg-navigation-restriction-resolver"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/OCbjQ4jQhPeTh9VnF/builds/Nj3FVsTRLNdSBlFeU/openapi.json
