# Chicago Food Inspection Scraper (`copious_atoll/chicago-food-inspections`) Actor

Extract Chicago food inspection data. Search by name, type, zip, result, risk level. Returns violations, scores, inspection dates, GPS coordinates. Socrata API, no proxy needed.

- **URL**: https://apify.com/copious\_atoll/chicago-food-inspections.md
- **Developed by:** [Grim R](https://apify.com/copious_atoll) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Chicago Food Inspection Scraper

Extract Chicago food inspection data from the official City of Chicago Open Data portal. Search thousands of inspection records by facility name, facility type, zip code, inspection result, risk level, or date range. Returns violation details, results, risk levels, inspection dates, addresses, and GPS coordinates for every inspected food establishment in Chicago.

> **Disclaimer:** This actor is unofficial and is not affiliated with, sponsored by, or endorsed by the City of Chicago, the Chicago Department of Public Health, or the Chicago Data Portal.

### What data can you extract from Chicago food inspections?

Each inspection record includes:

- **Facility name** (DBA) and AKA name
- **License number** for the establishment
- **Facility type** (Restaurant, Grocery Store, Bakery, Daycare, etc.)
- **Risk level** (Risk 1 High, Risk 2 Medium, Risk 3 Low)
- **Full address** with street, city, state, and zip code
- **Inspection date** and inspection type (Canvass, Complaint, License, etc.)
- **Inspection result** (Pass, Fail, Pass w/ Conditions, No Entry, etc.)
- **Violation details** — full text of every violation cited during the inspection
- **GPS coordinates** (latitude/longitude) for mapping and geospatial analysis

### How to search Chicago food inspections

**By facility name:** Search for any establishment (e.g., "mcdonalds", "starbucks"). Partial matches supported.

**By facility type:** Filter to Restaurant, Grocery Store, Bakery, Daycare, School, Liquor, or other types.

**By zip code:** Focus on a specific Chicago neighborhood or area.

**By inspection result:** Show only Pass, Fail, or Pass w/ Conditions results.

**By risk level:** Filter by Risk 1 (High), Risk 2 (Medium), or Risk 3 (Low) establishments.

**By date range:** Limit to inspections after a specific date.

### Output example

```json
{
    "inspection_id": "2632708",
    "dba_name": "HOMEWOOD SUITES",
    "aka_name": "HOMEWOOD SUITES",
    "license_": "3073831",
    "facility_type": "Restaurant",
    "risk": "Risk 2 (Medium)",
    "address": "40 E GRAND AVE",
    "city": "CHICAGO",
    "state": "IL",
    "zip": "60611",
    "inspection_date": "2026-03-18T00:00:00.000",
    "inspection_type": "License",
    "results": "Pass",
    "violations": "51. PLUMBING INSTALLED; PROPER BACKFLOW DEVICES - Comments: BACKFLOW PREVENTION DEVICE NOT LOCATED ON ICE MACHINE WATER LINE...",
    "latitude": "41.89179678289696",
    "longitude": "-87.62649273716487",
    "fullAddress": "40 E GRAND AVE, CHICAGO, IL 60611",
    "source": "Chicago Department of Public Health — Food Inspections",
    "sourceUrl": "https://data.cityofchicago.org/Health-Human-Services/Food-Inspections/4ijn-s7e5"
}
```

### How much does it cost to scrape Chicago food inspections?

This actor uses **pay-per-event pricing**. You pay per inspection record returned.

- **$0.00005 per actor start** (Apify default)
- **Per-record charge** based on the number of inspection results
- **No proxy costs** — this wraps a free City of Chicago Open Data API, no proxy needed

The API is fast — 1,000 records return in under 3 seconds.

### Who uses Chicago food inspection data?

- **Restaurant chains** — benchmark hygiene compliance across Chicago locations and competitors
- **Real estate investors** — evaluate food establishment compliance in target neighborhoods before purchasing commercial property
- **Food industry consultants** — identify common violations by facility type, risk level, or zip code to advise clients
- **Insurance companies** — risk assessment for restaurant and food establishment clients based on inspection history
- **Journalists and researchers** — investigate food safety trends and patterns across Chicago neighborhoods
- **App developers** — build restaurant discovery or health-conscious dining apps with official inspection data
- **Marketing agencies** — target food establishments by result, risk level, or location for B2B outreach campaigns

### Chicago food inspection data freshness

The City of Chicago Open Data API is updated regularly by the Department of Public Health. New inspection results typically appear within a few business days of the inspection.

### Input parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| facilityName | string | Search by facility name (partial match) |
| facilityType | select | Restaurant, Grocery Store, Bakery, Daycare, etc. |
| zipCode | string | Filter by zip code |
| inspectionResult | select | Pass, Fail, Pass w/ Conditions |
| riskLevel | select | Risk 1 (High), Risk 2 (Medium), Risk 3 (Low) |
| dateFrom | string | Inspections after this date (YYYY-MM-DD) |
| maxResults | integer | Max records to return (1-5000, default 50) |

### Integrations

Export your data as JSON, CSV, or Excel. Schedule daily runs to monitor new inspections. Use webhooks to trigger alerts when specific establishments receive new violations or fail inspections.

This actor works as an **MCP server** — AI agents can discover and use it to access Chicago food inspection data programmatically.

# Actor input Schema

## `facilityName` (type: `string`):

Search by facility name (DBA). Partial match supported.

## `facilityType` (type: `string`):

Filter by facility type.

## `zipCode` (type: `string`):

Filter by zip code (e.g., 60614).

## `inspectionResult` (type: `string`):

Filter by inspection result.

## `riskLevel` (type: `string`):

Filter by risk level.

## `dateFrom` (type: `string`):

Only return inspections after this date (YYYY-MM-DD).

## `maxResults` (type: `integer`):

Maximum inspection records to return.

## Actor input object example

```json
{
  "facilityName": "mcdonalds",
  "facilityType": "",
  "inspectionResult": "",
  "riskLevel": "",
  "dateFrom": "2024-01-01",
  "maxResults": 50
}
```

# 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 = {
    "facilityName": "mcdonalds",
    "dateFrom": "2024-01-01",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("copious_atoll/chicago-food-inspections").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 = {
    "facilityName": "mcdonalds",
    "dateFrom": "2024-01-01",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("copious_atoll/chicago-food-inspections").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 '{
  "facilityName": "mcdonalds",
  "dateFrom": "2024-01-01",
  "maxResults": 50
}' |
apify call copious_atoll/chicago-food-inspections --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,copious_atoll/chicago-food-inspections"
        }
    }
}

```

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/JvfQF7bsX6jLKNncs/builds/U1PVUeHRuazz3AWie/openapi.json
