Sign up for and use an API key with the new USGS Water Data APIs
domain: api.waterdata.usgs.gov · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Get a free API key at https://api.waterdata.usgs.gov/signup/ - keys are issued via api.data.gov and emailed to you.
Attach the key to requests either as a query parameter (?api_key=YOUR_KEY) or as an X-Api-Key request header.
Anonymous (keyless) requests are allowed but rate-limited more strictly than keyed requests; check the X-RateLimit-Limit and X-RateLimit-Remaining response headers on every call.
If you need sustained high-volume access, email wdfn@usgs.gov to discuss custom rate limits rather than working around the default ones.
Store the key outside source control and rotate it if it leaks, same as any api.data.gov-issued credential.
Known gotchas
The DEMO_KEY used in the docs' examples shares a global rate-limit pool across all api.data.gov demo users and will get throttled quickly under real traffic - get your own key.
Rate-limit headers here (X-RateLimit-Limit/X-RateLimit-Remaining) use a different convention than the legacy waterservices.usgs.gov service, which doesn't expose per-key limits the same way.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?