# Ocean Buoy Observations — Wave Height, Wind & Water Temp (`plaindata/ocean-buoy-observations`) Actor

Latest or 45-day marine observations from ocean buoys and coastal stations: wave height and period, wind, gusts, pressure, air and water temperature. Filter by station or radius. Data: National Data Buoy Center (public domain), not affiliated.

- **URL**: https://apify.com/plaindata/ocean-buoy-observations.md
- **Developed by:** [plaindata](https://apify.com/plaindata) (community)
- **Categories:** Developer tools, AI, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 result returneds

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

## Ocean Buoy Observations — Wave Height, Wind & Water Temp

Get **real-time marine observations** from ocean buoys and coastal (C-MAN) stations around the US coasts, the Gulf, the Great Lakes, Hawaii, Alaska and the open Pacific and Atlantic: **significant wave height, dominant and average wave period, wave direction, wind speed, direction and gusts, sea-level pressure, air and water temperature, dew point and visibility** — as clean JSON rows. Ask for the latest reading from every station, only the stations near a point, or up to **45 days of history** for chosen stations. Built on the published data files of the National Data Buoy Center. Useful for surf and sailing apps, fishing and boating, shipping and offshore operations, coastal research, insurance and energy dashboards and AI agents.

### Input examples

```json
{ "mode": "latest" }
{ "mode": "latest", "nearLatitude": 36.8, "nearLongitude": -122.4, "radiusKm": 200 }
{ "mode": "history", "stationIds": ["46042", "44013"], "hoursBack": 48 }
{ "mode": "latest", "minWaveHeightM": 4 }
```

### Output (one row per station observation)

| Field | Meaning |
|---|---|
| stationId, stationName, stationType, program | NDBC station ID (e.g. 46042), name, buoy / fixed, programme |
| latitude, longitude | Station position |
| observedAt | Observation time (UTC, ISO 8601) |
| waveHeightM | Significant wave height (m) |
| dominantWavePeriodSec, averageWavePeriodSec, meanWaveDirectionDeg | Wave periods (s) and direction the dominant waves come from (°T) |
| windDirectionDeg, windSpeedMs, windGustMs | Wind direction (°T), speed and gust (m/s) |
| pressureHpa, pressureTendencyHpa | Sea-level pressure and 3-hour tendency (hPa) |
| airTemperatureC, waterTemperatureC, dewPointC | Temperatures (°C) |
| visibilityNmi, tideFt | Visibility (nautical miles) and water level (ft), where measured |
| distanceKm | Distance from your point (radius search only) |
| stationUrl | Official station page |
| source | Data source statement |

Values are exactly as published (units as above). Sensors that did not report are `null`.

### Data source & licence

National Data Buoy Center (a National Weather Service office), www.ndbc.noaa.gov — `activestations.xml`, `latest_obs.txt` and the `realtime2` station files described in the NDBC Web Data Guide. NWS disclaimer: "The information on National Weather Service (NWS) Web pages are in the public domain, unless specifically noted otherwise, and may be used without charge for any lawful purpose" — provided it is not claimed as your own, no endorsement or affiliation is implied, and modified content is not presented as official government material. Only stations **owned by NDBC** are returned; partner-owned stations hosted on the same site are left out. Values are passed through unmodified. Realtime data have passed automated quality checks only.

### Notes

Unofficial copy for convenience — not for navigation or life-safety decisions; check official forecasts and warnings. Requests are spaced one second apart; history mode is limited to 25 stations per run. Not affiliated with or endorsed by NOAA, the National Weather Service or the National Data Buoy Center.

# Actor input Schema

## `mode` (type: `string`):

latest = the most recent observation (under 2 hours old) from every matching station. history = all observations of the last N hours (up to 45 days) for the chosen stations.

## `stationIds` (type: `array`):

Optional NDBC station IDs, e.g. 46042 (Monterey Bay), 41010 (Cape Canaveral East), 44013 (Boston), BUZM3 (Buzzards Bay). Leave empty for all stations. Partner-owned stations are not included.

## `nearLatitude` (type: `number`):

Optional. With Near longitude, only stations within the radius are returned, sorted by distance.

## `nearLongitude` (type: `number`):

Optional, e.g. -122.4 for San Francisco (west is negative).

## `radiusKm` (type: `integer`):

Search radius around the given point.

## `hoursBack` (type: `integer`):

History mode only: how many hours of observations to return (max 1080 = 45 days).

## `minWaveHeightM` (type: `number`):

Optional. Only observations with significant wave height at or above this value.

## `maxResults` (type: `integer`):

0 = no limit.

## Actor input object example

```json
{
  "mode": "latest",
  "stationIds": [],
  "radiusKm": 300,
  "hoursBack": 24,
  "maxResults": 0
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "mode": "latest",
    "stationIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("plaindata/ocean-buoy-observations").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 = {
    "mode": "latest",
    "stationIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("plaindata/ocean-buoy-observations").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 '{
  "mode": "latest",
  "stationIds": []
}' |
apify call plaindata/ocean-buoy-observations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plaindata/ocean-buoy-observations"
        }
    }
}
```

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/UtvtnaxPNlRxK0Nrn/builds/TglIGjiB0sOTUSY5f/openapi.json
