Skip to the content

Scraper API

Building permits

permits.code_casesAvailable

Code enforcement cases

The city's newest code cases and building violations by property: number, type, code section, status, opened and closed dates, address and description.

Give it a US city or county, and optionally dates, an address, a case number or a word.

1 unit a run, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a run
Inputs
8, 1 required
Record
16 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/permits.code_cases/runs

{
"input": {
"city": "new_york",
"opened_from": "2026-11-01",
"opened_to": "2026-11-20",
"max_results": 3
}
}

sent, and answered

a record of the run16 fields

{
city: "new_york"
city_name: "New York"
state: "NY"
case_number: "2824600"
type: "C-CONSTRUCTION OTHER OPTIONAL"
code: "C"
status: "V-DOB VIOLATION - ACTIVE"
opened_date: "2026-11-20"
closed_date: null
… 7 more fields

ok1 unit a run

A record this scraper returned for this input. The first 9 of its 16 fields are set down here; the whole record is below.

data.cityofchicago.org
The page Code enforcement cases reads, as a browser shows it
The page this scraper reads, photographed in a browser on 23 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Spot distressed properties
Follow new cases by address to see which buildings keep collecting violations.
Sell remediation work
Read new violations by type and code and offer the repair trades they call for.
Track a building's record
Read a property's cases over time, with their status and closed_date, before you buy or insure it.

What you send

A US city or county, and optionally dates, an address, a case number or a word. These are its 8 inputs, as its schema has them.

addressstring Optional
Only cases whose address holds this text.
max_resultsinteger Optional
Rows a page, newest first, up to 200.Default 25
offsetinteger Optional
How many rows to skip, to read the next page.Default 0
citystring Required
The city or county: chicago, new_york, los_angeles, austin, seattle, new_orleans, cincinnati, montgomery_county_md, norfolk or buffalo.
opened_fromstring Optional
Only cases opened on or after this day.
opened_tostring Optional
Only cases opened on or before this day.
case_numberstring Optional
One case, by its number at the city.
keywordstring Optional
Only cases whose type or description holds this text.

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/permits.code_cases/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"city":"new_york","opened_from":"2026-11-01","opened_to":"2026-11-20","max_results":3}}'

# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
from enrichednow import EnrichedNow

client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY

# Start a run, wait for it to end, and get its records
result = client.scrape("permits.code_cases", {
    "city": "new_york",
    "opened_from": "2026-11-01",
    "opened_to": "2026-11-20",
    "max_results": 3,
})
print(result.run.id, result.run.status, result.run.record_count)

# Read its records: pages are fetched as you go
for record in result.records:
    print(record)

Install it with pip install enrichednow, then save as run.py and run python3 run.py

import EnrichedNow from "enrichednow";

const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY

// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("permits.code_cases", {
  city: "new_york",
  opened_from: "2026-11-01",
  opened_to: "2026-11-20",
  max_results: 3,
});
console.log(run.id, run.status, run.record_count);

// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);

Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	enrichednow "github.com/enrichednow/enrichednow-go"
)

func main() {
	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
	defer cancel()

	// Start a run, wait for it to end, and get its records
	run, records, err := client.Scrape(ctx, "permits.code_cases", map[string]any{"city": "new_york", "opened_from": "2026-11-01", "opened_to": "2026-11-20", "max_results": 3})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(run.ID, run.Status, run.RecordCount)

	// Read its records: pages are fetched as you go
	for records.Next() {
		fmt.Println(string(records.Current()))
	}
	if err := records.Err(); err != nil {
		log.Fatal(err)
	}
}

Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;

public class Run {
    public static void main(String[] args) {
        EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY

        // Start a run, wait for it to end, and get its records
        ScrapeResult result = client.scrape("permits.code_cases", Map.of("city", "new_york", "opened_from", "2026-11-01", "opened_to", "2026-11-20", "max_results", 3));
        System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());

        // Read its records: pages are fetched as you go
        for (Map<String, Object> record : result.records()) {
            System.out.println(record);
        }
    }
}

Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

enrichednow run permits.code_cases --input city=new_york --input opened_from=2026-11-01 --input opened_to=2026-11-20 --input max_results=3

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

The city's newest code cases and building violations by property: number, type, code section, status, opened and closed dates, address and description. A record has 16 fields. One we could not read is null, never an empty string or a zero.

A record permits.code_cases returned
{
  "city": "new_york",
  "city_name": "New York",
  "state": "NY",
  "case_number": "2824600",
  "type": "C-CONSTRUCTION OTHER OPTIONAL",
  "code": "C",
  "status": "V-DOB VIOLATION - ACTIVE",
  "opened_date": "2026-11-20",
  "closed_date": null,
  "address": "54 NORTH MOORE STREET",
  "postal_code": null,
  "latitude": null,
  "longitude": null,
  "description": "OBSERVED VERTICAL CRACK AT TOP ELEVATOR SHAFT. NO EXTERIOR DAMAGE DONE TO STRUCTURE. CONSTRUCTION PREMISE 56 NORTH MOORE STREET, CONTAIN PERMITS ON RECORD#M01375120-I1-GC AT TIME OF INSPECTION. OBSERVED WORKERS AT ADJACENT ON ROOF LEVEL BUT … [truncated]",
  "source_url": "https://data.cityofnewyork.us/d/3h2n-5cm9",
  "fetched_at": "2026-11-23T23:15:35.765648Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

Values shortened for this page: description: 272 characters, the first 240 shown.

The fields of a record

citystring
The key of the city or county, e.g. chicago.
city_namestring
The city or county as it is written, e.g. Chicago.
statestring
The US state, as two letters.
case_numberstring or null
The case's or the violation's number at the city.
typestring or null
The type of case or violation, in the city's own words.
codestring or null
The code section or ordinance cited, where the city publishes it.
statusstring or null
The case's status, in the city's own words.
opened_datestring or null
The day the case was opened or the violation recorded, YYYY-MM-DD.
closed_datestring or null
The day it was closed, resolved or corrected, YYYY-MM-DD, where the city publishes it.
addressstring or null
The address of the property.
postal_codestring or null
The ZIP code of the property.
latitudenumber or null
The property's latitude.
longitudenumber or null
The property's longitude.
descriptionstring or null
The description of the violation, as recorded.
source_urlstring
The city's public page for this data.
fetched_atdatetime
When the city's portal was asked, in UTC.

The whole schema, in its reference

Units and limits

Counted per request
Billed per request: a run that returns data costs 1 unit, however many records it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • The record describes the property: no owner, complainant or inspector is named.
  • What each city publishes differs: a field it does not publish is null.
  • Los Angeles's table holds its open cases.

The bounds its schema sets

max_results
1 to 200; 25 unless you say otherwise
offset
0 to 50,000; 0 unless you say otherwise
city
chicago, new_york, los_angeles, austin, seattle, new_orleans, cincinnati, montgomery_county_md, norfolk, buffalo

Scraper API pricing: how units workThe five ways a run ends

Questions

What does Code enforcement cases return?

The city's newest code cases and building violations by property: number, type, code section, status, opened and closed dates, address and description. A record has 16 fields, among them city, city_name, state, case_number, type and code. A value that could not be read is null, never an empty string or a zero.

What do I send?

A US city or county, and optionally dates, an address, a case number or a word. The input city is required. Optional: address, max_results, offset, opened_from, opened_to, case_number and keyword.

How is it counted?

Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: max_results 1 to 200 (25 unless you say otherwise); offset 0 to 50,000 (0 unless you say otherwise); city chicago, new_york, los_angeles, austin, seattle, new_orleans, cincinnati, montgomery_county_md, norfolk, buffalo. A run may take up to 5 minutes.

What does it not do?

The record describes the property: no owner, complainant or inspector is named. What each city publishes differs: a field it does not publish is null. Los Angeles's table holds its open cases.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id permits.code_cases and the same input. It costs what the same API call costs.

Used in this playbook

A playbook runs Code enforcement cases as one of its steps and hands back the finished list. Its runs of this scraper cost what they cost here, and the playbook adds nothing.

  • Real estate

    Property Distress Signals

    Properties in a US city with recent code violations, distress permits or a stale listing, stacked by address and ranked.

Building permits

US building permits and code-enforcement cases from the official open data of 20 cities and counties, in one record shape, by property, never naming an owner.

  • Building permits

    permits.search

    A US city or county, and optionally dates, an address, a contractor, a permit number or a word. The city's newest permits in one shape: number, type, trade, status, issue and application dates, address, value, description, and the contractor's business and licence where published.

Building permits on the line-up

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.