Civic records API

Code Violation API

The Code Violation API returns service-request records about code violations, including notices, inspection findings, unsafe conditions, and corrective work. The dataset contains about 109,000 records, with coverage concentrated in Chicago and Illinois. Records include dates, categories, statuses, locations, departments, and neighborhood context such as population, land use, and flood risk.

United States · JSON, GeoJSON, CSV, Parquet

POSThttps://api.outerview.ai/v1/stream
curl https://api.outerview.ai/v1/stream \
  -X POST \
  -H "Authorization: Bearer $OUTERVIEW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "code violation",
    "region_id": "135721",
    "limit": 50
  }'

Key facts

  • The Code Violation API contains about 108,500 records.
  • Chicago accounts for 91.6% of the listed coverage.
  • Illinois accounts for 91.8% of records, and California accounts for 8.2%.
  • The API offers JSON, GeoJSON, CSV, and Parquet formats.

Quick start

  1. 1. Create an account and generate an API key on the developer platform.
  2. 2. Send it as a Bearer token in the Authorization header.
  3. 3. Query by place, radius or date (the example searches Chicago).

Bulk download

GET https://api.outerview.ai/api/v1/beacon/code-violation/download?format=geojson

Add &region_slug=… to limit to one place. Formats: csv, geojson, parquet.

Sample records

Real records from the data, trimmed to the main fields.

10 records
CityDateTypeStatusLatitudeLongitude
San Francisco2026-11-25RPD GeneralClosed37.77-122.433
Baltimore2026-11-23FIR-Fire Code ViolationClosed39.299-76.614
Baltimore2026-11-22FIR-Fire Code ViolationNew39.283-76.65
Dallas2026-11-20Landlord Retaliation After Reported Code Violation - CAONew32.891-96.728
Baltimore2026-11-20FIR-Fire Code ViolationNew39.329-76.662
Baltimore2026-11-18FIR-Fire Code ViolationNew39.281-76.632
Baltimore2026-11-18FIR-Fire Code ViolationNew39.344-76.644
Dallas2026-11-16Landlord Retaliation After Reported Code Violation - CAOIn Progress32.916-96.75
Baltimore2026-11-16FIR-Fire Code ViolationNew39.286-76.584
San Francisco2026-11-15RPD GeneralClosed37.72-122.404

Code violation service-request data

Code violation records describe reported or identified failures to meet required rules or standards. They can represent warning notices, inspection findings, unsafe conditions, or corrective work.

Developers, researchers, civic teams, and data buyers can use these records to study reported issues, follow case status, and connect service requests with location and neighborhood context.

Coverage across the United States

The dataset contains about 108,500 records from the United States. Coverage is concentrated in Illinois, which accounts for 91.8% of records, and California, with 8.2%.

Chicago accounts for 91.6% of records, followed by San Francisco at 7.3% and San Diego at 0.9%. Other listed cities include Calumet Park, Lemon Grove, Blue Island, and Burbank.

Fields in each record

Records include source, date, year, month, category, subtype, status, department, and closed_at. Date, year, category, status, and closed_at are populated in all records; month is populated in 99%, and subtype and department in 98%.

Location fields include latitude and longitude, both populated in all records. Additional context includes nearby population, elevation, settlement class, climate group, tree canopy, flood zone, home value, household income, and land-use categories. These contextual fields have varying completeness.

  • sourceSource dataset
  • dateDate of the record
  • yearYear
  • latitudeLatitude
  • longitudeLongitude
  • categoryRecord category
  • statusCurrent status
  • closed_atDate closed
  • monthMonth
  • subtypeRecord subtype
  • departmentDepartment
  • ghsl_pop_1km_2020How many people live here (people)
  • elevation_mHeight above sea level (m)
  • settlement_classCity, town or countryside
  • climate_groupClimate group
  • nlcd_tree_canopy_pctTree cover (%)
  • flood_zoneFlood risk
  • acs_median_home_value_usdTypical home value (USD)
  • acs_median_household_income_usdTypical household income (USD (2024 dollars))
  • land_use_categoriesLand use

Filter records and choose an output

Filter by region, radius, date, or fields to focus on relevant records. Use streaming for live queries, or bulk download for whole datasets.

Available formats are JSON, GeoJSON, CSV, and Parquet. The data comes from city and county open-data portals.

What you can build

Map reported violations by category or status; monitor new, in-progress, and closed cases; compare patterns across neighborhoods; analyze how reports vary by month or year; and combine violation locations with population, housing, land-use, or flood context.

Access and plans

The API supports JSON, GeoJSON, CSV, and Parquet. Access requires an API key, with a free tier available.

Paid plans provide higher limits and bulk downloads for whole datasets. No plan prices are stated here.

Frequently asked questions

Is there an API for code violations in Chicago?

Yes. The Code Violation API includes records for Chicago, which accounts for 91.6% of the dataset. Records can include dates, categories, statuses, locations, departments, and contextual geographic fields.

Which cities are covered by the Code Violation API?

The listed coverage includes Chicago, San Francisco, San Diego, Calumet Park, Lemon Grove, Blue Island, and Burbank. Chicago and San Francisco account for the largest stated shares, at 91.6% and 7.3% respectively.

How often is the code violation data updated?

A data refresh frequency is not specified. The records come from city and county open-data portals, and each record includes a date field; that field describes the record date, not the API's update schedule.

What fields does the Code Violation API return?

The API includes fields such as source, date, year, category, subtype, status, department, closed_at, latitude, and longitude. It also includes contextual fields for population, elevation, settlement class, climate, tree cover, flood risk, home value, income, and land use.

Can I filter code violations by location or date?

Yes. Queries can be filtered by region, radius, date, or fields. These filters let you focus on a geographic area or time period, or select particular record attributes.

Can I get code violation records as GeoJSON?

Yes. GeoJSON is one of the available formats, alongside JSON, CSV, and Parquet. The records include latitude and longitude, which support working with their geographic locations.

Can I download the full code violation dataset?

Yes. Bulk downloads are available on paid plans for whole datasets. The dataset contains about 108,500 records, and supported formats include JSON, GeoJSON, CSV, and Parquet.

Does the API include whether a violation was closed?

Yes. Records include a current status field and a closed_at field. Status examples in the supplied records include Closed, New, and In Progress; closed_at records the date of closure when available.

Start building with the Code Violation API

Free to try. Paid plans raise limits and unlock bulk downloads.