# Pittsburgh Code Violations Scraper — Distressed Property Leads (`groundplanes/pittsburgh-code-violations`) Actor

Scrape City of Pittsburgh PLI code violation cases: address, parcel ID, case type (vacant building, weeds/debris, structure), outcome, court dates and coordinates. Official WPRDC open data, updated daily. Distressed-property, motivated-seller and contractor leads. Export CSV, Excel, JSON.

- **URL**: https://apify.com/groundplanes/pittsburgh-code-violations.md
- **Developed by:** [John](https://apify.com/groundplanes) (community)
- **Categories:** Lead generation, Real estate, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 violation records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

The **Pittsburgh code violations scraper** gives you one row per code violation case for **Pittsburgh, PA**, straight from the **City of Pittsburgh Permits, Licenses & Inspections (PLI)** via the official WPRDC open-data API. No login or coding needed: run it in your browser, on a schedule, or through the Apify API, and export results as **JSON, CSV or Excel**.

Pull City of Pittsburgh code violation cases from the **Department of Permits, Licenses & Inspections (PLI)** through the official WPRDC open data API. The data is updated daily.

### What you get

Each result is one violation record, so a `caseNumber` repeats once per violation cited in that case. Group by `caseNumber` for one row per case. Fields: case number, property address, **parcel ID**, case type (Vacant Building, Weeds/Debris, Structure, Refuse...), investigation date and outcome, the inspector's findings, the code section, court date and docket, neighborhood, ward and coordinates.

### Use cases

- **Real estate investors and wholesalers:** find distressed and vacant properties. Join on parcel ID with county assessment data.
- **Contractors, roofers, junk removal and landscapers:** find properties with open repair orders (the source has no owner names; look up owners in county assessment records).
- **Researchers and community groups:** track enforcement by neighborhood.

### How to scrape Pittsburgh code violations

1. Click **Try for free** (or **Start**) on this page. A free Apify account is enough.
2. Leave the prefilled input to get a quick sample, or set the filters described below.
3. Set **maxItems** to cap how many rows (and how much) a run returns.
4. Click **Start** and wait a few seconds to a minute.
5. Download the results as JSON, CSV or Excel, or connect them to Google Sheets, Zapier, Make or a webhook.

### Input

| Field | Description |
|---|---|
| caseTypes | e.g. `Vacant Building`, `Structure` |
| neighborhoods | e.g. `Hazelwood` |
| onlyViolationsFound | Default true, which drops unfounded complaints |
| onlyCourtCases | Keep cases sent to court |
| investigatedSince | Real YYYY-MM-DD date, default 14 days ago. Invalid dates fail with a clear message. |
| maxItems | Default 200 |

### Pricing (pay per event)

$4 per 1,000 records ($0.004 each), plus Apify's minimal $0.00005 start fee. **Example:** the default 200 records cost about $0.80. If a run hits your max charge limit, it stops cleanly and reports how many rows it delivered.

### Notes

Public records via the official API. Owner names are not included in the source. Not affiliated with the City of Pittsburgh or WPRDC.

### Sample output

```json
{
  "caseNumber": "CF-PLI-2026-067313",
  "address": "1200 HIGHMAN ST, Pittsburgh, PA 15205",
  "parcelId": "0018A00186000000",
  "status": "In Violation",
  "caseType": "Vacant Buildings",
  "investigationDate": "2026-10-09",
  "outcome": "Violation Found",
  "findings": "vacant condemned structure no utilities \n\nviolation present ",
  "violationDescription": null,
  "codeSection": null,
  "codeSectionTitle": null,
  "instructions": null,
  "courtDate": null,
  "docketNumber": null,
  "courtDecision": null,
  "latitude": 40.4328635101,
  "longitude": -80.0466354855,
  "neighborhood": "Westwood",
  "ward": "28",
  "councilDistrict": "2",
  "source": "City of Pittsburgh PLI via WPRDC"
}
```

### Source, license & data caveats

Source: [Pittsburgh PLI Violations Report (WPRDC)](https://data.wprdc.org/dataset/pittsburgh-pli-violations-report), license **Creative Commons CCZero (CC0)**, refreshed daily by the city. Data is provided as published; findings are the inspector's free text.

### FAQ

#### How much does it cost to scrape Pittsburgh code violations?

You pay $0.004 per result ($4 per 1,000) plus a $0.00005 start fee, and nothing else. Apify's free plan includes $5 of monthly credit, which covers about 1,200 results. See **Pricing** above for a worked example.

#### Is it legal to scrape Pittsburgh code violations?

This Actor reads public records from the **City of Pittsburgh Permits, Licenses & Inspections (PLI)** via the official WPRDC open-data API, using only public endpoints (no login, no CAPTCHA bypass, no private accounts). See the source/license section above for the dataset's terms. You are responsible for how you use the data; this is not legal advice.

#### How fresh is the data?

Each run reads the source live, so you get whatever the agency has published at that moment. How often the agency updates, and any known lag, is described in the data caveats/notes section above.

#### Can I use it via API, on a schedule, or with Google Sheets?

Yes. Every Apify Actor has a REST API and client libraries for Python and JavaScript. You can schedule daily or weekly runs, and send results to Google Sheets, Slack, Zapier, Make, n8n, webhooks, or an AI agent via the Apify MCP server.

#### I need another city, county or field. Can you add it?

Open an issue on the **Issues** tab with the city or data source you need. We build new public-records scrapers regularly.

### More public-records scrapers by Groundplanes

Same clean output, pay-per-result pricing and official public data sources:

#### Restaurant & food inspections

- [Maricopa County (Phoenix) Restaurant Inspections Scraper](https://apify.com/groundplanes/maricopa-restaurant-inspections)
- [Las Vegas Restaurant Inspections & Grades Scraper (SNHD)](https://apify.com/groundplanes/las-vegas-restaurant-inspections)
- [Pittsburgh Restaurant Inspections Scraper (Allegheny County)](https://apify.com/groundplanes/allegheny-restaurant-inspections)
- [Delaware Restaurant Inspections Scraper — Statewide Violations](https://apify.com/groundplanes/delaware-restaurant-inspections)
- [Boulder CO Restaurant Inspections Scraper — 2013–2026 Snapshot](https://apify.com/groundplanes/boulder-county-restaurant-inspections)
- [Montgomery County MD Restaurant & Food Inspections Scraper](https://apify.com/groundplanes/montgomery-md-food-inspections)
- [NY State Restaurant Inspections Scraper — NYSDOH, Non-NYC](https://apify.com/groundplanes/ny-state-food-service-inspections)

#### Code violations & distressed property leads

- [Orlando FL Code Enforcement Scraper — Code Violation Leads](https://apify.com/groundplanes/orlando-code-enforcement-cases)
- [New Orleans Code Violations Scraper — Code Enforcement Leads](https://apify.com/groundplanes/nola-code-enforcement-violations)

#### Business licenses & new business leads

- [Delaware Business Licenses Scraper — New Business Leads](https://apify.com/groundplanes/delaware-business-licenses)
- [Norfolk VA Business Licenses Scraper — New Business Leads](https://apify.com/groundplanes/norfolk-va-business-licenses)
- [Berkeley CA Business Licenses Scraper — Local B2B Leads](https://apify.com/groundplanes/berkeley-ca-business-licenses)
- [New Orleans Business Licenses Scraper — New Business Leads](https://apify.com/groundplanes/nola-occupational-business-licenses)

# Actor input Schema

## `caseTypes` (type: `array`):

Partial match on case type, e.g. Vacant Building, Weeds/Debris, Structure, Refuse. Empty = all.

## `neighborhoods` (type: `array`):

Pittsburgh neighborhoods, e.g. Hazelwood, Carrick. Partial match. Empty = all.

## `onlyViolationsFound` (type: `boolean`):

Skip cases where no violation was found (unfounded complaints).

## `onlyCourtCases` (type: `boolean`):

Keep only cases taken to court / with a docket number.

## `investigatedSince` (type: `string`):

Default: 14 days ago.

## `maxItems` (type: `integer`):

Maximum violation records to return.

## Actor input object example

```json
{
  "onlyViolationsFound": true,
  "onlyCourtCases": false,
  "maxItems": 200
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/pittsburgh-code-violations").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/pittsburgh-code-violations").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call groundplanes/pittsburgh-code-violations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/pittsburgh-code-violations"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jF94uaLwwSlAQrLaf/builds/FOlxTK4GaG92NyKWL/openapi.json
