Chicago Food Inspections Scraper avatar

Chicago Food Inspections Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Chicago Food Inspections Scraper

Chicago Food Inspections Scraper

Scrape City of Chicago food establishment inspection records from the public Socrata Open Data API. Search by name, address, ZIP, ward, community area, risk, result, facility/inspection type, date range, or near-me radius. Lookup by license number or inspection ID.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 hours ago

Last modified

Share

Scrape City of Chicago food establishment inspection records from the public Chicago Data Portal (Socrata Open Data) API. Search by facility name, address, ZIP code, ward, community area, risk category, inspection result, facility type, and inspection type, filter by inspection date range, or find inspections within a radius of a map coordinate. Look up full inspection history by business license number or fetch exact records by inspection ID. HTTP-only via the public data.cityofchicago.org JSON API — no auth, no proxy, no login.

What this actor does

  • Three modes: search, byLicense, byInspectionIds
  • Ward & community area filters — narrow results to any of Chicago's 50 City Council wards or 77 official community areas
  • Near-me radius search — find inspections within a chosen distance of a latitude/longitude
  • Full-text violation search — search across itemized violation descriptions and comments
  • Itemized violations — each cited violation is parsed out into its own code / description / comments
  • Geolocation — latitude/longitude included when the city has geocoded the address
  • Empty fields are omitted

Output per inspection

  • inspectionId — Chicago's internal inspection record ID
  • dbaName — "doing business as" name; akaName (when it differs from dbaName)
  • licenseNumber — City of Chicago business license number
  • facilityType — e.g. Restaurant, Grocery Store, School, Bakery, Long Term Care
  • riskLevelRisk 1 (High), Risk 2 (Medium), or Risk 3 (Low)
  • address, city, state, zipCode
  • ward — Chicago City Council ward number (1-50)
  • communityArea, communityAreaNumber — one of Chicago's 77 official community areas (e.g. LOGAN SQUARE, 22)
  • inspectionDateYYYY-MM-DD
  • inspectionType — e.g. Canvass, License, Complaint, Suspected Food Poisoning
  • resultsPass, Fail, Pass w/ Conditions, Out of Business, No Entry, Not Ready, Business Not Located
  • violations[] — itemized: code, description, comments per cited violation
  • violationCount — number of violations cited on this inspection
  • latitude, longitude — when geocoded by the city
  • sourceUrl — direct link to this record in the source API
  • recordType: "inspection", scrapedAt

Input

FieldTypeDefaultDescription
modestringsearchsearch / byLicense / byInspectionIds
facilityNamestringPartial match on DBA/AKA name (mode=search)
addressstringPartial match on street address
citystringExact city match (almost all rows are CHICAGO)
zipCodestringExact 5-digit ZIP
wardstringChicago City Council ward, 1-50 (mode=search)
communityAreastringOne of Chicago's 77 official community areas (mode=search)
riskLevelstringRisk 1 (High) / Risk 2 (Medium) / Risk 3 (Low)
resultsstringPass / Fail / Pass w/ Conditions / Out of Business / No Entry / Not Ready / Business Not Located
facilityTypestringPartial match, e.g. Restaurant, Bakery, School
inspectionTypestringPartial match, e.g. Canvass, Complaint, License
dateFrom / dateTostringInspection date range, YYYY-MM-DD
keywordstringFull-text search across violation descriptions
latitude / longitudenumberCenter point for a "near me" radius search (mode=search)
radiusKmnumber1Radius in kilometers around latitude/longitude (0.1-50)
licenseNumbersarrayLicense numbers to fetch history for (mode=byLicense)
inspectionIdsarrayExact inspection IDs (mode=byInspectionIds)
sortAscendingboolfalseOldest-first instead of newest-first
maxItemsint50Hard cap (1–10000)

Example: recent failed restaurant inspections

{
"mode": "search",
"facilityType": "Restaurant",
"results": "Fail",
"maxItems": 50
}

Example: high-risk inspections in a ZIP code with rodent violations

{
"mode": "search",
"zipCode": "60607",
"riskLevel": "Risk 1 (High)",
"keyword": "rodent",
"maxItems": 100
}

Example: high-risk inspections in a specific ward

{
"mode": "search",
"ward": "27",
"riskLevel": "Risk 1 (High)",
"maxItems": 100
}

Example: inspections in a community area

{
"mode": "search",
"communityArea": "LOGAN SQUARE",
"results": "Fail",
"maxItems": 50
}

Example: inspections within 500 meters of a location

{
"mode": "search",
"latitude": 41.8781,
"longitude": -87.6298,
"radiusKm": 0.5,
"maxItems": 50
}

Example: full inspection history for a business license

{
"mode": "byLicense",
"licenseNumbers": ["3045838"]
}

Example: exact inspection lookup

{
"mode": "byInspectionIds",
"inspectionIds": ["2639573", "2639574"]
}

Use cases

  • Food safety research — analyze violation patterns across facility types or neighborhoods
  • Restaurant/franchise due diligence — pull a chain's full inspection history by license number
  • Journalism & public health reporting — surface repeat Fail results or specific violation types
  • Insurance & risk underwriting — screen a food business's compliance record before writing a policy
  • Real estate / commercial leasing — check a prospective tenant location's food-safety history
  • Academic research — bulk-export inspection data for epidemiological or urban studies

FAQ

What's the data source? The City of Chicago's official open-data Socrata API (data.cityofchicago.org), Food Inspections dataset, maintained by the Chicago Department of Public Health's Food Protection Program. This actor is an independent third-party tool and is not affiliated with the City of Chicago.

How far back does the data go? January 1, 2010 to the present, updated by the city on a rolling basis (typically daily).

Are there rate limits? The public Socrata endpoint has generous limits for read-only queries; the actor paginates with small delays to stay well within them.

Why is facilityType a free-text field instead of a dropdown? The city's raw data has 100+ inconsistently-cased facility type variants (e.g. both Tavern and TAVERN occur). The field does a case-insensitive partial match, so both typing restaurant and Restaurant return the same rows. Common values are listed in the field description.

What's the difference between dbaName and akaName? dbaName is the legal "doing business as" name on file; akaName is a commonly-used alternate name, only included when it's different from dbaName.

Why are some violation entries missing a code? A small number of rows use non-standard free text in the violations column that doesn't follow the city's usual <code>. <title> - Comments: <text> format; those are still included with only a description.

What does Pass w/ Conditions mean? The facility passed but must correct specific priority-foundation violations within a set timeframe, verified on a follow-up inspection.

How fresh is the data? The city's portal is typically updated daily with newly completed inspections.

Where do ward and communityArea come from? The city's own dataset doesn't publish these directly — it geocodes each address and stamps it with the ward and community-area boundary it falls inside. This actor resolves that geocode against Chicago's official ward map (50 wards) and community-area map (77 areas) to return the actual ward number and neighborhood name. A record has no ward/communityArea only when the city hasn't geocoded that inspection's address.

How does the "near me" radius search work? Provide latitude, longitude, and optionally radiusKm (default 1 km) — the actor returns inspections whose geocoded address falls within that great-circle distance of the point you gave. Only inspections with a geocoded address can match.