# Water Lien — 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 Philadelphia property water lien records by address or account number to check for outstanding liens and get detailed account information. Quickly look up whether a property has water-related debt or payment issues before purchasing or refinancing.

**Category:** Government & Public Data | **Website:** [water-lien.phila.gov/](https://water-lien.phila.gov/) | **Docs:** [parse.bot/marketplace/3378a256-4ada-4ff7-aaf2-5c6c60a7ff40/water-lien-phila-gov-api](https://parse.bot/marketplace/3378a256-4ada-4ff7-aaf2-5c6c60a7ff40/water-lien-phila-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/water-lien/`
**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 account lien details

Get detailed lien records for a specific water account. Only returns data when the account has liens (lienCount > 0) and the supply_type matches a lien record. Use custId, instId, and supplyType values from get_property_accounts results where lienCount is greater than zero.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cust_id` | integer | Yes | Customer ID (custId) from a get_property_accounts result |
| `inst_id` | integer | Yes | Installation ID (instId) from a get_property_accounts result |
| `supply_type` | string | Yes | Supply type from the account record that has liens. Must match the supplyType of the lien-bearing account row (e.g., 'AGENCY', 'WATER'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/water-lien/get-account-lien-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"cust_id":"<integer>","inst_id":"<integer>","supply_type":"<string>"}'
```

### Get property accounts

Get all water accounts associated with a specific normalized property address. Returns account details including lien counts, debt balances, and owner information. Both ZIP-5 and ZIP+4 address formats are accepted.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Full normalized address with ZIP code as returned by search_by_address (e.g., '1234 MARKET ST 19107' or '1234 MARKET ST 19107-3721') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/water-lien/get-property-accounts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>"}'
```

### Search by account number

Search for accounts by a PWD account number (digits only, no hyphens). Returns account details matching the given account number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `account_number` | string | Yes | PWD account number with no hyphens (e.g., '0115356001234001'). Remove hyphens from displayAccountNumber values returned by get_property_accounts. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/water-lien/search-by-account-number \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"account_number":"<string>"}'
```

### Search by address

Search for matching property addresses by a partial address string. Returns a list of normalized addresses with ZIP codes. The query must include a street number to produce results; bare street names without a numeric prefix return empty.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial or full street address including a street number (e.g., '1234 Market St', '1500 Spring Garden'). A numeric street number prefix is required for matches. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/water-lien/search-by-address \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<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.