USGS Water Services API
Overview
USGS Water Services provides real-time and historical data on streamflow, water levels, and water quality for thousands of monitoring stations across the United States. The API is free and requires no authentication, offering data in multiple formats including JSON, CSV, and XML. It is a valuable resource for hydrology projects, flood monitoring apps, or environmental data analysis.
Beginner Tip
Use the Instantaneous Values service with a USGS site number to get current streamflow data — find site numbers at waterdata.usgs.gov/nwis. Specify format=json to get a structured response that is easiest to parse programmatically.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from USGS Water Services",
"description": "Water quality and level info for rivers and lakes",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
value.timeSeries Array of time series objects, one per requested parameter and site combination. value.timeSeries[].sourceInfo.siteName Official name of the USGS monitoring station. value.timeSeries[].variable.variableName Human-readable name of the measured parameter such as Streamflow in cubic feet per second. value.timeSeries[].values[].value Array of value and dateTime objects containing the measurement readings. value.timeSeries[].values[].value[].value The numeric measurement value as a string; convert to float for calculations. value.timeSeries[].values[].value[].dateTime ISO 8601 timestamp of when this measurement was recorded. Implementation Example
const url = "https://waterservices.usgs.gov/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →arcsecond.io
⭐ Beginner's Pickarcsecond.io is a free astronomy API that aggregates data from multiple space databases, including stars, planets, exoplanets, and observing sites.
arXiv
arXiv provides programmatic access to curated research-sharing platform: physics, mathematics, quantitative finance, and economics via REST API.
GBIF
⭐ Beginner's PickGBIF (Global Biodiversity Information Facility) is a free, open API providing access to hundreds of millions of species occurrence records from around the world.
iDigBio
iDigBio is a free API that gives you access to millions of digitized natural history museum specimens from institutions across the United States and beyond.
inspirehep.net
INSPIRE-HEP is a free REST API for the High Energy Physics literature database, covering papers, authors, institutions, conferences, and experiments in particle physics.