ParseForge Scrapers

USGS Streamflow Scraper

parseforge/usgs-streamflow-scraper

OtherSEO tools

Scrapes real-time streamflow, gage height, and water measurements from USGS monitoring stations by state or keyword search. Returns each observation as a flat row with site number, value, and unit.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
95
Bookmarked
0
Rating
Not rated yet
Last modified
12 days ago

Overview

ParseForge

USGS Streamflow Scraper

Scrape real-time streamflow, gage height, and water data from any USGS monitoring site or state, up to a million measurements per run. Every record returns the latest value, site number, and measurement unit. No API key required. Export to CSV, JSON, Excel, or XML.

The USGS Water Services API requires navigating REST endpoints and parsing time-series formats for each parameter code. This Actor reads the public Instantaneous Values feed directly, filtered by state or a site keyword, and returns each measurement in one flat row.\n\nHydrologists, emergency managers, and researchers get the latest water conditions without writing a single request.

Who uses it What they scrape USGS Water Services for
Hydrologists Monitor current streamflow and gage height across a watershed for flood forecasting.
Emergency managers Pull the latest river levels for every gauge in a state during a storm event.
Environmental researchers Collect baseline flow data for a study reach over a dry season.
Water resource engineers Check real-time reservoir inflows and downstream releases for operations planning.

What it does

This Actor collects real-time streamflow, gage height, and other water measurements from USGS monitoring stations by state or keyword search, and returns each observation as a flat row.

  • ๐Ÿ“ State-wide collection: pull every active gauge in a two-letter state code, such as CA or TX, in one run.
  • ๐Ÿ” Keyword search: filter sites by name, site number, or location keyword to target a specific basin or city.
  • ๐Ÿ“ Multi-parameter ready: returns whatever the station reports, including streamflow, gage height, and water temperature, in a consistent schema.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with USGS Water Services data

๐ŸŒŠ Flood monitoring dashboards.

An emergency operations center runs the Actor for a state code every 15 minutes to feed a live map of river levels and gage heights.

๐Ÿ“Š Regional water-year summaries.

A consulting hydrologist pulls all streamflow measurements for a state at the end of the water year to compute annual statistics.

๐Ÿ”ฌ Field campaign planning.

A research team checks current gage heights and flows for a set of keyword-matched sites before deploying sensors.

๐Ÿž๏ธ Recreation flow checks.

A kayaking outfitter scrapes a handful of river gauges by site name to post daily runnable flows on their website.

Why choose this scraper

What you get
No API key Reads the public USGS Instantaneous Values feed directly, no registration or token needed.
Flat row output Every measurement arrives as one row with site number, datetime, value, and unit, ready for a spreadsheet.
State or site scope Pull every gauge in a state or narrow to a single watershed with a keyword.
Scalable runs Collect up to a million measurements per run, enough for a full state snapshot.

How it compares

This Actor focuses on real-time Instantaneous Values by state or keyword, while the alternative also covers historical daily data and additional parameters.

Feature ParseForge Usgs Water Scraper
Real-time Instantaneous Values Yes Yes
State-wide collection by two-letter code Yes Not listed
Keyword search for site name or number Yes Not listed
Historical daily values Not listed Yes
Groundwater levels Not listed Yes
Precipitation data Not listed Yes

Configure the run

Drive the Actor from a US state code or a site keyword search, alone or together, and the max items limit caps how many measurements reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

{
  "maxItems": 10
}

A larger pull:

{
  "maxItems": 200
}

Pricing

Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $2.10
1,000 results $21.00
10,000 results $210.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the USGS Streamflow Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to USGS Water Services through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/usgs-streamflow-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your state code is a valid two-letter USPS abbreviation and that the query, if used, matches a real site name or number. Also try increasing maxItems in case the default 10 is too low for the number of active stations.

Why are some values negative or zero?

USGS reports raw sensor readings. A negative gage height means the water surface is below the station's reference datum. A zero streamflow can occur in dry channels. These are valid measurements, not errors.

Why do I see parameter codes instead of names?

The Actor returns the raw parameter code as provided by USGS. You can map common codes yourself: 00060 is streamflow, 00065 is gage height, and 00010 is water temperature.

The run timed out. What should I do?

A very large state with many stations can take time. Increase the run timeout in your Apify actor settings, or reduce the scope by adding a keyword query to target fewer sites.

Why are some stations missing from my state run?

The Actor returns only stations that have reported a value in the current Instantaneous Values window. Temporarily offline or seasonal stations will not appear until they transmit again.

FAQ

Question Answer
What data does this Actor return? It returns real-time instantaneous values from USGS monitoring stations. Each row includes the site number, measurement datetime, parameter code, measured value, and unit.
Do I need a USGS API key? No. The Actor reads the public USGS Instantaneous Values REST endpoint, which does not require authentication or an API key.
How do I get all gauges for a state? Set the state input to the two-letter postal code, such as 'ca' or 'tx', and set maxItems high enough to cover the active stations. The Actor will return the latest measurement from every site in that state.
Can I filter by a specific river or site number? Yes. Use the query field with a site name, site number, or location keyword. The Actor matches against the USGS site inventory and returns only those stations.
What parameters are available? The Actor returns whatever the station reports. Common parameters include streamflow (00060), gage height (00065), and water temperature (00010), but any parameter code in the Instantaneous Values service will appear.
How many measurements can I collect in one run? You can set maxItems up to 1,000,000. The default is 10 for a quick test. A full state run typically returns a few thousand rows.
What export formats are supported? You can export your dataset to CSV, JSON, Excel, or XML from the Apify platform, or push it to an external service via an integration.
How often is the data updated? The Actor reads the live USGS feed each time it runs. Most stations report every 15 to 60 minutes, so a fresh run returns the latest available value.
Can I schedule this to run automatically? Yes. Apify schedules let you run the Actor every hour, day, or on a custom cron expression to build a time series of measurements.
Does this include historical data? This Actor targets the Instantaneous Values service, which returns the most recent reading. For historical daily values, you would need a different endpoint.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Geological Survey. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many measurements to collect per run. 10
query string Keyword search not set
state string Two-letter code, e.g. ca, tx ca

Pricing

from $19.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.019 to $0.021

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~usgs-streamflow-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run USGS Streamflow Scraper on Apify All scrapers