# Azsdwis — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve data from Arizona's Safe Drinking Water Information System (SDWIS). Look up public water systems by name, number, county, type, or source water type, and access detailed records including analytes monitored, historical sample results, and Consumer Confidence Reports (CCR).

**Category:** Government & Public Data | **Website:** [azsdwis.azdeq.gov/](https://azsdwis.azdeq.gov/) | **Docs:** [parse.bot/marketplace/929b467c-5221-4a8d-9d5c-8aa952fc51ee/azsdwis-azdeq-gov-api](https://parse.bot/marketplace/929b467c-5221-4a8d-9d5c-8aa952fc51ee/azsdwis-azdeq-gov-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_available_ccr_years

List available years for Consumer Confidence Reports (CCR) for a specific water system.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pws_id` | string | Yes | Public water system ID (e.g. 'AZ0407025'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/get_available_ccr_years \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pws_id":"<string>"}'
```

### get_glossary

Retrieve the glossary of terms and definitions. Note: This page has been removed from the site and currently returns an error.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/get_glossary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_water_system_analytes

List all analytes (contaminants) monitored for a specific water system.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tinwsys_is_number` | string | Yes | Internal water system ID number (from search_water_systems results). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/get_water_system_analytes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tinwsys_is_number":"<string>"}'
```

### get_water_system_detail

Retrieve detailed information for a specific water system, including contacts and water sources.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tinwsys_is_number` | string | Yes | Internal water system ID number (from search_water_systems results). |
| `tinwsys_st_code` | string | No | State code. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/get_water_system_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tinwsys_is_number":"<string>","tinwsys_st_code":"<string>"}'
```

### get_water_system_sample_results

Retrieve historical sample results for a specific analyte and water system.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `analyte_id` | string | Yes | Analyte ID (analyte_id from get_water_system_analytes results). |
| `tinwsys_is_number` | string | Yes | Internal water system ID number (from search_water_systems results). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/get_water_system_sample_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"analyte_id":"<string>","tinwsys_is_number":"<string>"}'
```

### list_filters

List available search filters for water systems including counties, system types, source water types, and point of contact types.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/list_filters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_water_systems

Search for public water systems in Arizona by name, number, county, type, or source water type. Accepts either display text or code values for filter parameters.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `contact_type` | string | No | Point of contact type filter. |
| `county` | string | No | County name filter. |
| `name` | string | No | Water system name to search for (partial match supported). |
| `number` | string | No | Water system number (e.g. 'AZ0407025'). |
| `source_type` | string | No | Source water type filter. |
| `system_type` | string | No | Water system type filter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-azsdwis-azdeq-gov-api-929b467c/search_water_systems \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contact_type":"<string>","county":"<string>","name":"<string>","number":"<string>","source_type":"<string>","system_type":"<string>"}'
```
