# Noaa Tides Currents Scraper (`bigibyte/noaa-tides-currents-scraper`) Actor

Get NOAA tide predictions, observed water levels, and station details for any US gauge. Pick a station and date range, run it, then download results as CSV, JSON, or Excel. Schedule it to build a repeatable tide archive for harbor planning, coastal monitoring, and research.

- **URL**: https://apify.com/bigibyte/noaa-tides-currents-scraper.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## NOAA Tides & Currents Scraper: Water Levels and Predictions

<p align="center">
  <img src="https://imgur.com/JlkQlvY.png" alt="NOAA Tides & Currents Scraper" style="max-width:100%; border-radius:14px; width:680px;" />
</p>

The NOAA tides and currents scraper pulls public CO-OPS tide predictions, observed water levels, and water-level station metadata. It is a free API scraper: no API key, no login, and a direct connection by default. Schedule a run and export to CSV, JSON, or Excel when you need a repeatable archive of the same stations.

San Francisco (`9414290`) is filled in so a first run returns today's six-minute predictions without extra setup.

### Use cases

- **Harbor planning**: save predicted tide heights for a station before a job window
- **Coastal monitoring**: grab the latest observed water level, with NOAA's sigma and quality fields
- **Station lookup**: export the water-level catalog (ID, name, state, coordinates) and filter it to the gauges you care about
- **Research archives**: walk a date range one day at a time and stop at a row cap
- **Scheduled feeds**: run the same input on a timer and download CSV or Excel from the dataset

### What data does this actor extract?

Data mode writes one row per prediction or water-level reading. Station mode writes one row per catalog station. Every row includes `scrapedAt` and `sourceUrl`.

```json
{
  "t": "2026-10-11 00:00",
  "v": "0.151",
  "stationId": "9414290",
  "productName": "predictions",
  "scrapedAt": "2026-10-12T00:00:00+00:00",
  "sourceUrl": "https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?date=today&station=9414290&product=predictions&datum=MLLW&time_zone=gmt&units=metric&format=json"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `t` | string | Time string from NOAA, unchanged |
| `v` | string | Value string from NOAA, metric, datum MLLW |
| `stationId` | string | CO-OPS station ID |
| `stationName` | string | Name from water-level metadata or the catalog |
| `productName` | string | `predictions` or `water_level` |
| `sigma` | string | Observed standard deviation (`s`), when present |
| `dataFlags` | string | Observed flag string (`f`), when present |
| `qualityCode` | string | Observed quality code (`q`), when present |
| `latitude` | string | Station latitude |
| `longitude` | string | Station longitude |
| `stateCode` | string | State or territory code from the catalog |
| `timeZone` | string | Station time zone name |
| `shefCode` | string | SHEF code |
| `tidalStation` | boolean | NOAA tidal flag |
| `greatLakesStation` | boolean | NOAA Great Lakes flag |
| `detailUrl` | string | Link to the station details document |
| `scrapedAt` | string | UTC timestamp added by the actor |
| `sourceUrl` | string | NOAA URL for the request |
| `error` | string | Present only when that request failed |

### Input

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `data` | `data` for a time series, `stations` for the water-level catalog |
| `stations` | array | `9414290` | Station IDs. Empty in stations mode means the full catalog |
| `product` | string | `predictions` | `predictions` or `water_level` |
| `beginDate` | string | empty | First day, `yyyyMMdd`. Blank uses today or latest |
| `endDate` | string | empty | Last day, `yyyyMMdd`, inclusive |
| `maxItems` | integer | `100` | Row cap. Hard maximum 1000 |
| `timeoutSecs` | integer | `300` | Stop starting new requests after this many seconds |
| `requestTimeoutSecs` | integer | `30` | Per-request HTTP timeout |
| `proxyConfiguration` | object | no proxy | Optional. Default is `{"useApifyProxy": false}` |

#### Example input

```json
{
  "mode": "data",
  "stations": ["9414290"],
  "product": "predictions",
  "beginDate": "20261011",
  "endDate": "20261011",
  "maxItems": 100,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### How a run walks NOAA

1. With no dates, predictions use today and water level uses latest available data.
2. With beginDate and endDate, each calendar day is processed individually. The span stops at 31 days.
3. Station mode extracts the full catalog of available water-level stations.
4. Requests execute smoothly with built-in retry handling for unexpected server delays or rate limit responses.
5. Rows are deduped by station, product, and timestamp (or station ID in the catalog). A failed request becomes an error row and the run continues until maxItems or timeoutSecs.
   6.An empty series is logged and does not create an error row. An invalid station ID produces an error row.

### Data source and licence

Values come from the NOAA Center for Operational Oceanographic Products and Services (CO-OPS) datagetter and metadata APIs. NOAA states that CO-OPS limits the volume of queries from a single customer when load is heavy. The NOS disclaimer says information on government servers is in the public domain unless annotated otherwise, and asks that attribution be given when NOS material is reproduced. Each row keeps the request URL in `sourceUrl`. This actor stays on the public endpoints above and does not use a proxy to get around those limits.

### FAQ

**Does the NOAA tides currents scraper need an API key?**
No. The calls used here are public. Leave the proxy off unless your own IP is blocked.

**How many rows can one run save?**
`maxItems` defaults to 100 and will not go past 1000. A full prediction day for one station is about 240 six-minute points, so a cap of 100 stores the first part of that day.

**What if the station ID is wrong?**
The actor writes one error row with the HTTP status and a short piece of the NOAA message, then moves on.

**Can I export CSV or Excel?**
Yes. The output links point at the default dataset as JSON, CSV, and Excel.

**Which products are included?**
Tide predictions and observed water level only. Wind and air temperature are not requested.

### Changelog

- 1.0: predictions, latest water level, and the water-level station catalog, with day-by-day ranges, retries, and a row cap.

### Integrations

Connect this actor to other apps with [Apify integrations](https://apify.com/integrations). Make, Zapier, Slack, Google Sheets, and [webhooks](https://docs.apify.com/integrations/webhooks) can pick up the dataset when a run finishes.

Tide series stay easier to archive when the job repeats: https://bigibyte.com

#### Trademark Notice

NOAA Tides & Currents and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely to identify the source of the data and does not imply affiliation, sponsorship, endorsement, or partnership.

#### Disclaimer

Disclaimer: This Actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or otherwise officially associated with NOAA Tides & Currents or its owners. All data is collected from publicly available sources. Users are responsible for complying with the source's terms of use, rate limits, and attribution or licensing requirements.

#### Is web scraping legal?

This Actor only collects publicly available data from NOAA Tides & Currents, mostly through its public API or feed, without logging in or bypassing any access controls. Scraping public data is generally legal, but how you use it matters:

- **Personal data:** If the results include personal data (for example names, emails, or profile details), laws such as the GDPR in the EU and the CCPA in California may apply. Only collect and store personal data when you have a legitimate reason.
- **Copyright:** Some content (articles, images, descriptions) may be protected by copyright. Do not republish full copyrighted content without permission.
- **Terms of use:** Respect the source's terms, stated rate limits, and any attribution or non-commercial-use requirements listed in the Data source and licence section.
- **Legal advice:** This is general information, not legal advice. If you're unsure, consult a lawyer.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

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

data returns tide or water-level time series. stations returns the NOAA water-level station catalog.

## `stations` (type: `array`):

CO-OPS station IDs, one per line. In data mode each ID is queried. In stations mode the catalog is limited to these IDs. Leave the list empty in stations mode to export the full water-level catalog.

## `product` (type: `string`):

Datagetter product for data mode. predictions is the six-minute tide prediction series. water_level is the latest observed water level. Other products are not called.

## `beginDate` (type: `string`):

First day of the series, yyyyMMdd, GMT. With endDate, the actor requests one calendar day at a time. Leave blank to use date=today for predictions or date=latest for water level.

## `endDate` (type: `string`):

Last day of the series, yyyyMMdd, GMT, inclusive. The span is capped at 31 days. Leave blank when you only want the default today or latest reading.

## `maxItems` (type: `integer`):

Maximum dataset rows for this run, including error rows. Values above 1000 are clamped to 1000.

## `timeoutSecs` (type: `integer`):

Stop starting new NOAA requests after this many seconds. Does not replace the Apify run timeout.

## `requestTimeoutSecs` (type: `integer`):

Seconds to wait for a single NOAA HTTP response before retrying.

## `proxyConfiguration` (type: `object`):

Optional proxy for NOAA requests. The default sends traffic directly, with no Apify Proxy, because CO-OPS asks callers not to bypass its load limits.

## Actor input object example

```json
{
  "mode": "data",
  "stations": [
    "9414290"
  ],
  "product": "predictions",
  "beginDate": "20261011",
  "endDate": "20261011",
  "maxItems": 100,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `datasetUrl` (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": "data",
    "stations": [
        "9414290"
    ],
    "product": "predictions",
    "maxItems": 100,
    "timeoutSecs": 300,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/noaa-tides-currents-scraper").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": "data",
    "stations": ["9414290"],
    "product": "predictions",
    "maxItems": 100,
    "timeoutSecs": 300,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/noaa-tides-currents-scraper").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": "data",
  "stations": [
    "9414290"
  ],
  "product": "predictions",
  "maxItems": 100,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call bigibyte/noaa-tides-currents-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigibyte/noaa-tides-currents-scraper"
        }
    }
}
```

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/3rgM7IE7dsPALfLa5/builds/TPZoaKrSTlHdCnjxK/openapi.json
