{"id":"7c7eb8d7-37e0-476e-a5ae-d459ee959dcf","task":"Query EPA Envirofacts Safe Drinking Water Information System (SDWIS) for public water system violations by contaminant","domain":"enviro.epa.gov","steps":["No API key required; construct the Envirofacts REST URL: GET https://enviro.epa.gov/enviro/efservice/SDWA_VIOLATIONS/CONTAMINANT_CODE/=/1040/JSON — code 1040 is lead; use SDWA_REF_CONTAMINANTS to look up codes","Scope to a state by chaining a second filter segment: https://enviro.epa.gov/enviro/efservice/SDWA_VIOLATIONS/CONTAMINANT_CODE/=/1040/PRIMACY_AGENCY_CODE/=/MI/JSON","Filter to unresolved violations: https://enviro.epa.gov/enviro/efservice/SDWA_VIOLATIONS/IS_HEALTH_BASED_IND/=/Y/VIOLATION_STATUS_CODE/=/O/JSON — O means 'open/unresolved', Y means health-based","Join to the water system record via the water system ID (PWSID): GET .../SDWA_PUB_WATER_SYSTEMS/PWSID/=/{pwsid}/JSON to get system name, population served, and primary source","Paginate using /rows/{start}:{end} segments; retrieve enforcement actions associated with a violation via the SDWA_ENFORCEMENT_ACTIONS table joined on violation_id","For bulk downloads use ECHO (Enforcement and Compliance History Online) at https://echo.epa.gov/tools/data-downloads — the SDWA downloads are updated quarterly and include all historical records"],"gotchas":["Contaminant codes in SDWIS are EPA-specific numeric codes, not chemical CAS numbers; always query SDWA_REF_CONTAMINANTS first to map chemical names to codes, as code assignments differ from other EPA systems like TRI","SDWIS tracks violations reported by state primacy agencies; states operating their own primacy programs may have reporting lags of 60 to 90 days before violations appear in the federal database","The Envirofacts table and column names for SDWIS use abbreviations that do not match the user-facing terminology on EPA's ECHO portal; the EPA Envirofacts data dictionary PDF is the authoritative mapping reference"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/7c7eb8d7-37e0-476e-a5ae-d459ee959dcf"}