API and MCP server
Plug the water-system census and its violation records into your own systems and AI tools. The MCP server answers anyone in public mode; full records, the REST API, the change feed and webhooks come with Enterprise.
MCP server (AI tools)
Connect AquaCensus to Claude, ChatGPT or your own agent. The server is https://aquacensus.com/api/mcp (Streamable HTTP). Without a key it answers in public mode: summaries with a link to each record, 5 results per call. With an Enterprise key it returns full records, change history and the change feed.
{
"mcpServers": {
"aquacensus": {
"type": "http",
"url": "https://aquacensus.com/api/mcp",
"headers": { "Authorization": "Bearer ack_live_…" }
}
}
}Tools: search_water-systems, get_water-systems, search_violations, get_violations, recent_changes (Enterprise), about.
REST API (Enterprise)
Create a key under Account → API keys, then send it as Authorization: Bearer ack_live_…. JSON responses; keyset paging with cursor; up to 100 records per page and 120 requests a minute per key.
curl -H "Authorization: Bearer $KEY" \ "https://aquacensus.com/api/v1/water-systems?state=TX&limit=100"
| Endpoint | What it returns |
|---|---|
GET /api/v1 | datasets, filters, your limits |
GET /api/v1/water-systems | Every U.S. public water system in EPA SDWIS (active and inactive): PWSID, name, system type, population served, service connections, owner type, primary water source and geography. Filters: statecountypws_type · q = name prefix |
GET /api/v1/violations | EPA SDWA violations and enforcement actions per public water system (EPA ECHO): violation code, contaminant code, health-based flag, dates, status and enforcement. Filter by pwsid to get one system's history. Filters: pwsidis_health_basedstatus |
GET /api/v1/water-systems/{pwsid} | one public water system + its last 20 changes |
GET /api/v1/violations/{violation_id} | one sdwa violation + its last 20 changes |
GET /api/v1/changes | change feed: new, updated, removed records (dataset, after_id, since) |
Bulk files and webhooks
Enterprise includes every national and state file (gzipped CSV, refreshed weekly), and any alert can post to your webhook, signed with X-Census-Signature: t=…,v1=HMAC-SHA256(secret, t.body).