# Affordable housing

> Documentation index: [llms.txt](https://westkite.com/docs/llms.txt). Every page is also at its URL plus `.md`.

Find subsidized and affordable housing, and when each subsidy ends: every HUD Section 8 and 202/811 rental assistance contract, LIHTC projects, USDA Rural Development 515 and 514 properties, FHA-insured mortgages, public housing, and state and city inventories with their own end dates. One row is one program at one property, so a building with a Section 8 contract and a tax credit allocation has two rows. Rows cost $1 per 1,000, the same as any [find](https://westkite.com/docs/api/find.md).

```endpoint
GET /v1/find/affordable_housing
POST /v1/find/affordable_housing
```

Affordable housing is a type of [find](https://westkite.com/docs/api/find.md), so it takes the same `where`, `in`, `near`, `lat` and `lng`, `radius_m`, `sort`, `limit` and `cursor`. `limit` goes up to 100 rows a call; follow `next_cursor` for more. By default the soonest end comes first.

## Programs

Every row has one `program`. Ask for one with `where=program = section8`, or several with `where=program in section8,lihtc`. With no `program` clause you get every program.

| Value | What it is |
|---|---|
| `section8` | A HUD project-based Section 8 rental assistance contract (new construction, rehab, state agency, loan management, property disposition, preservation, RAD conversions, 202/8 and 515/8) |
| `section202_prac` | A HUD Section 202 Project Rental Assistance Contract (elderly housing) |
| `section811_prac` | A HUD Section 811 Project Rental Assistance Contract (housing for people with disabilities) |
| `section202_811_pac` | A HUD Section 202 or 811 Project Assistance Contract |
| `section811_pra` | A HUD Section 811 Project Rental Assistance (state agency demonstration) contract |
| `lihtc` | A Low-Income Housing Tax Credit project (HUD's national database; Florida and Oregon also publish their own allocations with end dates) |
| `usda_515` | A USDA Rural Development Section 515 rural rental housing loan |
| `usda_514` | A USDA Rural Development Section 514 farm labor housing loan |
| `fha_insured` | An FHA-insured multifamily mortgage (HUD); maturity_on is the loan's maturity, and the mortgage itself carries no affordability end |
| `public_housing` | A public housing development (HUD), operated by its public housing agency; no end date is published |
| `hud_use_agreement` | A HUD use agreement (Florida inventory) |
| `section202_direct_loan` | A HUD Section 202 direct loan (Florida inventory); maturity_on is the loan's maturity |
| `section202_811_capital_advance` | A HUD Section 202 or 811 capital advance (Florida inventory) |
| `home` | A HOME Investment Partnerships award with an affordability period (state inventories) |
| `htf` | A National Housing Trust Fund award (state inventories) |
| `tax_exempt_bonds` | Tax-exempt multifamily housing bonds (state or local issuer) |
| `state_program` | A state housing finance agency program (Florida SAIL, Oregon OAHTC, GHAP, LIFT and others; program_detail names it) |
| `local_program` | A city affordability requirement or subsidy (City of Austin: density bonus, RHDA, bonds; program_detail names it) |

## When a program ends

`expires_on` is the date the contract or restriction ends. `expires_basis` says where the date comes from:

| Value | What it is |
|---|---|
| `published` | The date the publisher gives (a HUD contract's overall expiration, USDA's restrictive-clause expiration, a state or city affordability end) |
| `published_year` | The publisher gives the year only; expires_on is 31 December of that year |
| `derived_year15` | Derived, not published: 31 December of the LIHTC placed-in-service year + 14, the earliest the 15-year federal compliance period can end. Extended use usually runs 30 years or more (extended_use_expires_on) |
| `unavailable` | No end date is published for this program (public housing, FHA-insured mortgages, some state rows) |

LIHTC dates are never published in HUD's database, so they are derived from the year the project was placed in service and labelled `derived_year15`. `details.extended_use_expires_on` is the year-30 date (`derived_year30`) for allocations from 1990 on. Many extended-use agreements run longer than 30 years. Add `where=expires_basis = published` to leave derived dates out.

A HUD contract's `expires_on` is its overall expiration. `details.current_term_expires_on` is the end of its current funding term, which is often sooner.

Loans have `maturity_on` instead: FHA-insured mortgages, Section 202 direct loans and bonds. An FHA-insured mortgage carries no affordability end, so its `expires_basis` is `unavailable`.

## Filters

| Field | Type | Operators | Values | Notes |
|---|---|---|---|---|
| `program` | enum | `=` `in` | `section8`, `section202_prac`, `section811_prac`, `section202_811_pac`, `section811_pra`, `lihtc`, `usda_515`, `usda_514`, `fha_insured`, `public_housing`, `hud_use_agreement`, `section202_direct_loan`, `section202_811_capital_advance`, `home`, `htf`, `tax_exempt_bonds`, `state_program`, `local_program` |  |
| `expires_on` | date | `>=` `<=` `between` |  | YYYY-MM-DD (the contract's or restriction's end) |
| `expires_basis` | enum | `=` `in` | `published`, `published_year`, `derived_year15`, `unavailable` |  |
| `maturity_on` | date | `>=` `<=` `between` |  | YYYY-MM-DD (loan maturity) |
| `units` | integer, units | `>=` `<=` `between` |  | Units in the property |
| `assisted_units` | integer, units | `>=` |  | Assisted or restricted units under the program |
| `owner` | string | `~` |  | Owner name contains, as HUD or the state names it |
| `name` | string | `~` |  | Property name contains |
| `manager` | string | `~` |  | Management agent contains |
| `program_id` | string | `=` |  | The program record's own id: a HUD contract number, LIHTC project id, FHA number |
| `property_id` | string | `=` |  | The programs at this property |
| `linked` | boolean | `=` |  | = true (matched to one property) or = false |

Search a place with `in` (a county or city by name, or a ZIP code; Austin projects outside the city limits name no city, so a county or ZIP search finds those too), around a point with `near` or `lat` and `lng` plus `radius_m`, or at one property with `where=property_id = property:…`. With none of these, the search runs nationwide.

## Coverage

Federal programs are loaded for every state. State and city programs are loaded where a state or city publishes an inventory. So each answer has `coverage`: one row for each program and each state in scope, with `status`:

| Status | Means |
|---|---|
| `covered` | A source for this program is loaded for this state. |
| `partial` | A source is loaded, but only for part of the state (the City of Austin's inventory in Texas). `note` says which part. |
| `not_covered` | No source for this program is loaded in this state. No rows doesn't mean there are none. |

What each source holds:

| Source | Programs | Where | Dates |
|---|---|---|---|
| HUD Multifamily Assistance and Section 8 contracts | `section8`, `section202_prac`, `section811_prac`, `section202_811_pac`, `section811_pra` | Every state | Published, monthly |
| HUD LIHTC database | `lihtc` | Every state, projects placed in service through 2022 | Derived |
| USDA Rural Development multifamily housing | `usda_515`, `usda_514` | Every state | Restrictive clause expiration, published |
| HUD insured multifamily properties | `fha_insured` | Every state | Loan maturity |
| HUD public housing developments | `public_housing` | Every state | None published |
| Shimberg Center Assisted Housing Inventory | state programs, FHFC housing credits, bonds, HOME, HUD use agreements, 202 loans | Florida | Year published |
| Oregon Housing and Community Services inventory | `lihtc`, `home`, `htf`, `state_program` | Oregon | Published |
| City of Austin Affordable Housing Inventory | `local_program` | Austin, Texas | Published |

In Florida and Oregon, a tax credit project can have two `lihtc` rows: HUD's, with derived dates, and the state agency's, with published dates. Count its units once. `assisted_units` is null where the publisher counts assisted units only for the whole property (an FHA-insured mortgage, the Florida and Oregon inventories); that count is in `details.property_assisted_units`.

## Request

Section 8 contracts in Cook County, Illinois, ending between now and the end of 2028, soonest first:

```curl
curl --get "https://api.westkite.com/v1/find/affordable_housing" \
  -H "Authorization: Bearer $WESTKITE_API_KEY" \
  --data-urlencode "in=Cook County, IL" \
  --data-urlencode "where=program = section8" \
  --data-urlencode "where=expires_on between 2026-12-01 and 2028-12-31" \
  --data-urlencode "limit=2"
```

```typescript
const params = new URLSearchParams({ in: "Cook County, IL", limit: "2" });
params.append("where", "program = section8");
params.append("where", "expires_on between 2026-12-01 and 2028-12-31");
const res = await fetch(`https://api.westkite.com/v1/find/affordable_housing?${params}`, {
  headers: { Authorization: `Bearer ${process.env.WESTKITE_API_KEY}` },
});
const { data } = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.westkite.com/v1/find/affordable_housing",
    params=[("in", "Cook County, IL"), ("where", "program = section8"), ("where", "expires_on between 2026-12-01 and 2028-12-31"), ("limit", 2)],
    headers={"Authorization": f"Bearer {os.environ['WESTKITE_API_KEY']}"},
)
data = res.json()["data"]
```

## Response

An abridged answer. `details` holds the program's other published facts, so its keys differ from source to source.

```json 200
{
  "data": {
    "type": "affordable_housing",
    "returned": 1,
    "by_program": { "section8": 1 },
    "programs": [
      {
        "id": "affordable:65e7eeb5540613dc3323397b890e4925",
        "program": "section8",
        "program_detail": "202/8 NC / Sec. 202",
        "program_id": "IL06T791028",
        "name": "BREMENTOWNE MANOR",
        "units": 106,
        "assisted_units": 106,
        "expires_on": "2027-03-02",
        "expires_basis": "published",
        "maturity_on": null,
        "owner": "Brementowne Manor, Inc.",
        "owner_type": "Non-Profit",
        "manager": "Thurston Woods Village",
        "status": "Active",
        "address": "16130 S. Oak Park Avenue",
        "city": "TINLEY PARK",
        "postal_code": "60477",
        "state": "IL",
        "county_fips": "17031",
        "property_id": "property:0428701b-1a77-82ea-87e9-ac524dbeb5b6",
        "link": { "method": "address", "candidates": 1 },
        "details": { "current_term_expires_on": "2027-03-02", "contract_term_months": 240, "rent_to_fmr_pct": 83.7, "hud_property_id": "800005740" },
        "source": {
          "id": "US-HUD-MF-CONTRACTS",
          "publisher": "U.S. Department of Housing and Urban Development, Office of Multifamily Housing",
          "as_of": "2026-12-01",
          "licence": "U.S. Government work (HUD), public domain"
        }
      }
    ],
    "coverage": [{ "program": "section8", "state": "IL", "status": "covered", "sources": ["US-HUD-MF-CONTRACTS"] }],
    "next_cursor": "aff1.1",
    "has_more": true
  },
  "missing": [],
  "billing": { "operation_id": "op_…", "operation": "find", "charged_usd": 0.001, "balance_usd": 9.99 },
  "request_id": "req_…"
}
```

Every field is in the [API reference](https://westkite.com/docs/api/reference.md) and the [OpenAPI document](https://api.westkite.com/v1/openapi.json) under `AffordableProgram`.

## At one property

`parts=affordable` on [GET /v1/properties/{id}](https://westkite.com/docs/api/properties.md) lists every program at the property, the soonest end still ahead (`next_expires_on`) and coverage for its state. It adds nothing to the $0.01 record.

```curl
curl "https://api.westkite.com/v1/properties/property:0428701b-1a77-82ea-87e9-ac524dbeb5b6?parts=affordable" \
  -H "Authorization: Bearer $WESTKITE_API_KEY"
```

`property_id` on a row is set when exactly one property matched the published address or point. `link.candidates` above 1 means several properties share the address, and `property_id` is left empty. A property with no program on record lists `affordable` in `missing`: `not_found` where the programs are covered, `not_covered` where they aren't.

## More examples

Tax credit projects in Travis County, Texas, whose 15-year compliance period ends by 2027, largest first:

```curl
curl --get "https://api.westkite.com/v1/find/affordable_housing" \
  -H "Authorization: Bearer $WESTKITE_API_KEY" \
  --data-urlencode "in=Travis County, TX" \
  --data-urlencode "where=program = lihtc" \
  --data-urlencode "where=expires_on <= 2027-12-31" \
  --data-urlencode "sort=-units"
```

USDA rural rental properties in a county with 40 or more units whose restrictions end in the next five years:

```curl
curl --get "https://api.westkite.com/v1/find/affordable_housing" \
  -H "Authorization: Bearer $WESTKITE_API_KEY" \
  --data-urlencode "in=Tift County, GA" \
  --data-urlencode "where=program in usda_515,usda_514" \
  --data-urlencode "where=expires_on between 2026-12-01 and 2031-12-01" \
  --data-urlencode "where=units >= 40"
```

Every program held by one owner:

```curl
curl --get "https://api.westkite.com/v1/find/affordable_housing" \
  -H "Authorization: Bearer $WESTKITE_API_KEY" \
  --data-urlencode "where=owner ~ Preservation"
```

## Sources and terms

HUD and USDA records are U.S. Government works. The Florida and Oregon inventories are published with no stated licence and are served with credit to the Shimberg Center for Housing Studies, University of Florida, and Oregon Housing and Community Services. The City of Austin's inventory is CC BY-SA 4.0, City of Austin, Texas. The National Housing Preservation Database is not used.
