# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-water-lien-phila-gov-api-3378a256/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-water-lien-phila-gov-api-3378a256/get_account_lien_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-water-lien-phila-gov-api-3378a256/get_property_accounts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-water-lien-phila-gov-api-3378a256/search_by_account_number \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-water-lien-phila-gov-api-3378a256/search_by_address \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
