US Drinking Water Violations API
Violations recorded against US public water systems by state, with the system's name, size, type and water source, from the EPA's drinking water database. For water treatment sellers, due diligence, researchers and journalists.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from data.epa.gov/efservice/VIOLATION
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/drinking-water-violations/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"state":"NJ"},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
14 fields: 12 here, 2 technical ones under Technical details.
Basics
- Pwsid
Public water system ID.
Example NJ0101308
- Water system name
Example ROYAL LODGE
- EPA violation code
Example 4B
- Violation category
Violation category code, such as MCL, TT, MR or MON.
Example RPT
- Health based
Whether the violation is health-based.
Example No
- EPA contaminant code
Example 8000
- Compliance status
Returned to compliance, addressed or unaddressed.
Example Returned to compliance
- Population served
People served by the system.
Example 28
- Pws type
System type, such as community or non-community.
Example Transient non-community water system
- Primary source
Main water source, such as groundwater or surface water.
Example Groundwater
Dates
- Begin date
Start of the compliance period.
Example Jan 11, 2018
- End date
End of the compliance period, empty while open.
Example Jun 30, 2019
Technical detailsField names and types for developers, and the 2 fields hidden above
Hidden by default
These 2 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.
- ID
idUnique key: water system ID and violation ID. - Violation ID
violation_idThe source's violation ID within the system.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
id | text | ID (hidden) | 3 of 3 |
pwsid | text | Pwsid | 3 of 3 |
water_system_name | text | Water system name | 3 of 3 |
violation_id | text | Violation ID (hidden) | 3 of 3 |
violation_code | text | EPA violation code | 3 of 3 |
violation_category | text | Violation category | 3 of 3 |
is_health_based | yes or no | Health based | 3 of 3 |
contaminant_code | text | EPA contaminant code | 3 of 3 |
begin_date | date | Begin date | 3 of 3 |
end_date | date | End date | 1 of 3 |
compliance_status | text | Compliance status | 3 of 3 |
population_served | number | Population served | 3 of 3 |
pws_type | text | Pws type | 3 of 3 |
primary_source | text | Primary source | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Pwsid | Water system name | EPA violation code | Violation category | Health based | EPA contaminant code | Compliance status | Population served | Pws type | Primary source | Begin date | End date |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | NJ0101308 | ROYAL LODGE | 4B | RPT | No | 8000 | Returned to compliance | 28 | Transient non-community water system | Groundwater | Jan 11, 2018 | — |
| 2 | NJ0101308 | ROYAL LODGE | 3A | MON | No | 8000 | Returned to compliance | 28 | Transient non-community water system | Groundwater | Apr 1, 2019 | Jun 30, 2019 |
| 3 | NJ0101308 | ROYAL LODGE | 4B | RPT | No | 8000 | Returned to compliance | 28 | Transient non-community water system | Groundwater | Jul 11, 2019 | — |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- Give a two-letter state (primacy agency) code, a public water system ID, or both. A state run returns all its violations, active and past, in the source's own order; use health_based_only to narrow it.
- A run returns at most 5,000 violations. Large states have tens of thousands of rows, so filter by system ID or health-based status.
- Water system names are looked up once per system, so a run that touches many systems takes longer. Some inactive or old systems have no name in the source (water_system_name is then empty).
- contaminant_code is the EPA numeric code, not a name. end_date is empty while a violation is open. Codes such as violation_category and violation_code are shown as the source gives them.
- Data is reported by states to the EPA and updated quarterly, so recent violations can be missing or revised. US EPA Envirofacts (SDWIS) is public domain.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.