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.

Try it
Ready-made, maintained by usRecords, 14 fieldsv1.0

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

Stateoptional
Two-letter state code (primacy agency), such as NJ
Example: NJ
Pwsidoptional
One public water system ID, such as NJ0102001
Example: NJ0102001
Health based onlyoptional
Only health-based violations
Maximum resultsoptional
Most rows to return
Example: 5

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
Endpoint
POSThttps://pullrow.dev/v1/apis/drinking-water-violations/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
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.

statetext
Two-letter state code (primacy agency), such as NJ
example: NJ
pwsidtext
One public water system ID, such as NJ0102001
example: NJ0102001
health_based_onlyyes/no
Only health-based violations
example: true
max_resultsnumber
Most rows to return
example: 5

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 nameTypeShown on this page asFilled
idtextID (hidden)3 of 3
pwsidtextPwsid3 of 3
water_system_nametextWater system name3 of 3
violation_idtextViolation ID (hidden)3 of 3
violation_codetextEPA violation code3 of 3
violation_categorytextViolation category3 of 3
is_health_basedyes or noHealth based3 of 3
contaminant_codetextEPA contaminant code3 of 3
begin_datedateBegin date3 of 3
end_datedateEnd date1 of 3
compliance_statustextCompliance status3 of 3
population_servednumberPopulation served3 of 3
pws_typetextPws type3 of 3
primary_sourcetextPrimary source3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordPwsidWater system nameEPA violation codeViolation categoryHealth basedEPA contaminant codeCompliance statusPopulation servedPws typePrimary sourceBegin dateEnd date
1NJ0101308ROYAL LODGE4BRPTNo8000Returned to compliance28Transient non-community water systemGroundwaterJan 11, 2018—
2NJ0101308ROYAL LODGE3AMONNo8000Returned to compliance28Transient non-community water systemGroundwaterApr 1, 2019Jun 30, 2019
3NJ0101308ROYAL LODGE4BRPTNo8000Returned to compliance28Transient non-community water systemGroundwaterJul 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.
Known limits
  • 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.