Code Violation Data API: Property Code Enforcement Records
Published · Updated · Evidence checked 11 November 2026
A code violation data API supplies structured municipal enforcement records for property research. In PermitStack, violations and complaints are separate record kinds. Check the issuing authority, source history window, status and record date before using a result. A complaint does not establish a violation, and an empty search does not establish that a property has no enforcement history.
In this guide
- Separate a reported concern from an agency finding
- Evaluate enforcement coverage independently
- Check coverage, then request a property record
- Read status and money without inventing certainty
- Use enforcement records to focus a property review
- What the dataset does not establish
- Code-violation access and pricing
- Frequently asked questions
Separate a reported concern from an agency finding
Property code enforcement data can include complaints, inspections, citations, orders and case-resolution events. These are different steps in a municipal process. Before comparing properties, identify what each source calls a record and which steps it publishes.
For example, New York City's HPD complaint guide distinguishes a complaint, an inspection and a notice of violation. Its process is a local example, not a rule to apply to every authority. For a single property, the issuing department's own case search is the place to confirm the current record.
PermitStack's default violation search uses record_kind=violation. Use record_kind=complaint for reported concerns and cases without evidence of an agency finding, or record_kind=all for both. Keep the kind visible in your application instead of labeling every returned row a confirmed violation.
Evaluate enforcement coverage independently
A building-permit feed for a city does not establish code-enforcement coverage there. Departments can publish different periods, record types and amounts of detail. Start with the violations coverage response for the state and authority you need, then inspect the source-level limits.
| Field | How to interpret it |
|---|---|
records and complaint_records | Separate violation and complaint populations. Do not add them and call the result confirmed violations. |
count_unit | Whether the source counter describes records or distinct cases. A case can contain several recorded items. |
coverage_window | Full published history, a rolling window or open cases only. Full history still means the available source history. |
data_through and freshness | Measured record currency. A recent fetch is not proof of a recent enforcement event or a fresh check of every old case. |
stale_open_records | Older records still labeled OPEN. Their status needs context, not an automatic present-condition conclusion. |
At the 11 November 2026 check, maintained counters for 17 active, enabled sources held 7,399,922 violation records and 674,053 complaint records. The live coverage rollup agrees with those totals. These are separate record populations, not unique properties or counts of current hazards. The counters were last computed on 2026-11-10; the date of this check is not a new inspection of those properties.
These figures exclude inactive source definitions and do not establish national coverage. Use the dataset's own live coverage response. Neither the permit coverage map nor a statewide label establishes coverage of every property.
Check coverage, then request a property record
Set your key and the state you are evaluating. Check dataset availability and access in the API reference. Coverage is available to any API key; record search requires violations access.
set -o pipefail
: "${PERMITSTACK_API_KEY:?Set your API key}"
: "${REVIEW_STATE:?Set the two-letter state}"
curl --fail-with-body --silent --show-error --get \
'https://api.permit-stack.com/v1/violations/coverage' \
-H "X-API-Key: $PERMITSTACK_API_KEY" \
--data-urlencode "state=$REVIEW_STATE" \
| jq '{count, places: [.places[] | {state, source, count_unit,
records, complaint_records, coverage_window,
window_days, data_through, freshness}]}'
: "${REVIEW_ADDRESS:?Set the property street address locally}"
: "${REVIEW_CITY:?Set the property city}"
curl --fail-with-body --silent --show-error --get \
'https://api.permit-stack.com/v1/violations/search' \
-H "X-API-Key: $PERMITSTACK_API_KEY" \
--data-urlencode "state=$REVIEW_STATE" \
--data-urlencode "city=$REVIEW_CITY" \
--data-urlencode "address=$REVIEW_ADDRESS" \
--data-urlencode 'record_kind=violation' \
--data-urlencode 'per_page=25' \
| jq '{total, total_capped, total_unknown,
results: [.results[] | {id, source_id, record_kind,
category, status, opened_date, closed_date,
record_date, record_date_basis, fine_amount, permit_id}]}'
The example prints no narratives, names or addresses. Address matching is partial, so the review application must confirm the intended property and authority before attaching a record. Keep those matching details within the authorized workflow. Do not publish property-level enforcement examples.
The initial search deliberately has no status or date filter. An open-only search would omit closed records, and a date window would omit undated ones. When needed, use open_only=true or status=OPEN for that narrower question, and date_after and date_before for the record-date window. Read record_date_basis: the date can describe opening, inspection or closure.
Read status and money without inventing certainty
OPEN is a specific normalized status, not a synonym for every record that is not closed. A citation or an adjudicated outcome belongs in its own category. A closed record is also not a current inspection of the entire property. Preserve the source and status context when deciding whether a record needs follow-up.
A null fine amount is unknown, not a zero-dollar balance. Fine amount, amount paid and balance due are separate fields where supplied. Neither an amount nor an OPEN label alone establishes a lien or a current amount payable.
Default search excludes voided records and process-only entries. include_uncounted=true opts into those additional stored records; inspect not_counted before combining populations. The detail route, GET /v1/violations/{violation_id}, can provide source-status context and related copies of the record. Do not count those copies as independent incidents.
Use enforcement records to focus a property review
Lenders and insurers can use a matched record to request supporting documents or investigate a discrepancy. An unresolved label should remain a question for review, with its source date attached. This dataset does not supply an underwriting decision, a title search or proof of present property condition.
Contractors can distinguish recorded repair activity from a potential need for work. An enforcement record does not establish an available job, a purchase decision or permission to contact a resident. Use contractor licensing separately when qualifying the firm doing the work.
A linked permit_id, where present, can lead to permit evidence. A repair permit, a passed inspection and case closure are different events. Compare them with the inspection guide and occupancy certificate guide; none automatically closes an enforcement case.
What the dataset does not establish
It is not a complete national registry, a continuous property inspection, a complete lien inventory or a substitute for the issuing agency's current record. Source history can be partial, old statuses can persist, fields can be absent and property matching can fail. A null completeness measure means capture has not been measured.
Handle total_unknown as an unknown count and total_capped as a lower bound. Access errors and unavailable sources must not become a clean-history result. Evaluate the locations and fields first, then review current dataset pricing and access.
Code-violation access and pricing
Code violations are live and included in Business and Scale. The Developer add-on is $19 per month or $190 per year. Record credit packs do not unlock the dataset. Check availability and access before making the example requests.
Frequently asked questions
Does a complaint mean the agency found a code violation?
No. Complaints and violations are separate record kinds. Use record_kind=complaint for reported concerns, record_kind=violation for the violation population, or all for both, while preserving the distinction.
Does an empty property search prove there are no violations?
No. Source coverage, history windows, missing records, access and property matching can affect the result. Confirm material questions with the issuing authority.
Does OPEN mean a property is currently unsafe?
No. OPEN is a stored case status. Read its source, dates and record kind, and review the current agency record before drawing a conclusion about the property.
Does a null fine mean nothing is owed?
No. A null amount means that value is unavailable. It is not a zero-dollar balance, and a reported fine is not by itself proof of a lien or a current amount payable.
Evidence checked 11 November 2026. Dataset figures describe maintained counters; prices describe the current catalog and offer terms. Source dates, geographic coverage and field availability vary. See the data methodology and API reference.
Review dataset availability and fields
Check the locations, fields and access your workflow needs before choosing a plan.
Review dataset availability and fields