# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/azsdwis/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/azsdwis/get-available-ccr-years \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/azsdwis/get-glossary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/azsdwis/get-water-system-analytes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/azsdwis/get-water-system-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/azsdwis/get-water-system-sample-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/azsdwis/list-filters \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/azsdwis/search-water-systems \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"contact_type":"<string>","county":"<string>","name":"<string>","number":"<string>","source_type":"<string>","system_type":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.