# Chicago Food Inspections Scraper (`crawlerbros/chicago-food-inspections-scraper`) Actor

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.

- **URL**: https://apify.com/crawlerbros/chicago-food-inspections-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, MCP servers
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Inspections Scraper

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`
- `riskLevel` — `Risk 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`)
- `inspectionDate` — `YYYY-MM-DD`
- `inspectionType` — e.g. `Canvass`, `License`, `Complaint`, `Suspected Food Poisoning`
- `results` — `Pass`, `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

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `byLicense` / `byInspectionIds` |
| `facilityName` | string | – | Partial match on DBA/AKA name (mode=search) |
| `address` | string | – | Partial match on street address |
| `city` | string | – | Exact city match (almost all rows are `CHICAGO`) |
| `zipCode` | string | – | Exact 5-digit ZIP |
| `ward` | string | – | Chicago City Council ward, `1`-`50` (mode=search) |
| `communityArea` | string | – | One of Chicago's 77 official community areas (mode=search) |
| `riskLevel` | string | – | `Risk 1 (High)` / `Risk 2 (Medium)` / `Risk 3 (Low)` |
| `results` | string | – | `Pass` / `Fail` / `Pass w/ Conditions` / `Out of Business` / `No Entry` / `Not Ready` / `Business Not Located` |
| `facilityType` | string | – | Partial match, e.g. `Restaurant`, `Bakery`, `School` |
| `inspectionType` | string | – | Partial match, e.g. `Canvass`, `Complaint`, `License` |
| `dateFrom` / `dateTo` | string | – | Inspection date range, `YYYY-MM-DD` |
| `keyword` | string | – | Full-text search across violation descriptions |
| `latitude` / `longitude` | number | – | Center point for a "near me" radius search (mode=search) |
| `radiusKm` | number | `1` | Radius in kilometers around `latitude`/`longitude` (0.1-50) |
| `licenseNumbers` | array | – | License numbers to fetch history for (mode=byLicense) |
| `inspectionIds` | array | – | Exact inspection IDs (mode=byInspectionIds) |
| `sortAscending` | bool | `false` | Oldest-first instead of newest-first |
| `maxItems` | int | `50` | Hard cap (1–10000) |

#### Example: recent failed restaurant inspections

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

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

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

#### Example: high-risk inspections in a specific ward

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

#### Example: inspections in a community area

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

#### Example: inspections within 500 meters of a location

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

#### Example: full inspection history for a business license

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

#### Example: exact inspection lookup

```json
{
  "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.

# Actor input Schema

## `mode` (type: `string`):

What to fetch.

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

Partial, case-insensitive match against the establishment's DBA or AKA name (mode=search).

## `address` (type: `string`):

Partial, case-insensitive match against the street address (mode=search).

## `city` (type: `string`):

Exact, case-insensitive city match. Nearly all rows are `CHICAGO`; a small number cover neighboring suburbs (mode=search).

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

Exact 5-digit ZIP code (mode=search).

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

Chicago's risk-based inspection frequency category.

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

Outcome of the inspection.

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

Partial, case-insensitive match against facility type. Common values: Restaurant, Grocery Store, School, Bakery, Children's Services Facility, Daycare (2 - 6 Years), Long Term Care, Catering, Liquor, Mobile Food Preparer, Hospital, Golden Diner, Wholesale, Shared Kitchen, Tavern, Special Event. Free text -- any substring the city has used is matched (110+ variants exist in the raw data).

## `inspectionType` (type: `string`):

Partial, case-insensitive match against inspection type. Common values: Canvass, License, Canvass Re-Inspection, Complaint, License Re-Inspection, Complaint Re-Inspection, Short Form Complaint, Non-Inspection, Suspected Food Poisoning, Consultation, Tag Removal. Free text -- any substring the city has used is matched.

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

Only include inspections on/after this date (YYYY-MM-DD).

## `dateTo` (type: `string`):

Only include inspections on/before this date (YYYY-MM-DD).

## `keyword` (type: `string`):

Full-text search across the violation descriptions (e.g. `rodent`, `mold`, `hot water`).

## `ward` (type: `string`):

Chicago City Council ward (1-50) the establishment falls in, resolved from the city's ward boundary map (mode=search).

## `communityArea` (type: `string`):

One of Chicago's 77 official community areas, resolved from the city's community-area boundary map (mode=search).

## `latitude` (type: `number`):

Center latitude for a "near me" radius search. Combine with `longitude` and `radiusKm`.

## `longitude` (type: `number`):

Center longitude for a "near me" radius search. Combine with `latitude` and `radiusKm`.

## `radiusKm` (type: `number`):

Search radius in kilometers around `latitude`/`longitude`. Only applied when both are set. Default 1 km.

## `licenseNumbers` (type: `array`):

City of Chicago business license numbers to fetch full inspection history for.

## `inspectionIds` (type: `array`):

Exact inspection ID(s) to fetch.

## `sortAscending` (type: `boolean`):

Sort by inspection date oldest-first instead of newest-first.

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "facilityName": "",
  "riskLevel": "",
  "results": "",
  "facilityType": "",
  "inspectionType": "",
  "ward": "",
  "communityArea": "",
  "radiusKm": 1,
  "licenseNumbers": [],
  "inspectionIds": [],
  "sortAscending": false,
  "maxItems": 50
}
```

# Actor output Schema

## `inspections` (type: `string`):

Dataset containing all scraped Chicago food inspection records.

# 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 = {
    "mode": "search",
    "facilityName": "",
    "riskLevel": "",
    "results": "",
    "facilityType": "",
    "inspectionType": "",
    "ward": "",
    "communityArea": "",
    "radiusKm": 1,
    "licenseNumbers": [],
    "inspectionIds": [],
    "sortAscending": false,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/chicago-food-inspections-scraper").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 = {
    "mode": "search",
    "facilityName": "",
    "riskLevel": "",
    "results": "",
    "facilityType": "",
    "inspectionType": "",
    "ward": "",
    "communityArea": "",
    "radiusKm": 1,
    "licenseNumbers": [],
    "inspectionIds": [],
    "sortAscending": False,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/chicago-food-inspections-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "search",
  "facilityName": "",
  "riskLevel": "",
  "results": "",
  "facilityType": "",
  "inspectionType": "",
  "ward": "",
  "communityArea": "",
  "radiusKm": 1,
  "licenseNumbers": [],
  "inspectionIds": [],
  "sortAscending": false,
  "maxItems": 50
}' |
apify call crawlerbros/chicago-food-inspections-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/chicago-food-inspections-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Chicago Food Inspections Scraper",
        "description": "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.",
        "version": "1.0",
        "x-build-id": "H2EVgNfxdcitGR25Z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~chicago-food-inspections-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-chicago-food-inspections-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~chicago-food-inspections-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-chicago-food-inspections-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~chicago-food-inspections-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-chicago-food-inspections-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "byLicense",
                            "byInspectionIds"
                        ],
                        "type": "string",
                        "description": "What to fetch.",
                        "default": "search"
                    },
                    "facilityName": {
                        "title": "Facility name",
                        "type": "string",
                        "description": "Partial, case-insensitive match against the establishment's DBA or AKA name (mode=search).",
                        "default": ""
                    },
                    "address": {
                        "title": "Address",
                        "type": "string",
                        "description": "Partial, case-insensitive match against the street address (mode=search)."
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "Exact, case-insensitive city match. Nearly all rows are `CHICAGO`; a small number cover neighboring suburbs (mode=search)."
                    },
                    "zipCode": {
                        "title": "ZIP code",
                        "type": "string",
                        "description": "Exact 5-digit ZIP code (mode=search)."
                    },
                    "riskLevel": {
                        "title": "Risk category",
                        "enum": [
                            "",
                            "Risk 1 (High)",
                            "Risk 2 (Medium)",
                            "Risk 3 (Low)"
                        ],
                        "type": "string",
                        "description": "Chicago's risk-based inspection frequency category.",
                        "default": ""
                    },
                    "results": {
                        "title": "Inspection result",
                        "enum": [
                            "",
                            "Pass",
                            "Pass w/ Conditions",
                            "Fail",
                            "Out of Business",
                            "No Entry",
                            "Not Ready",
                            "Business Not Located"
                        ],
                        "type": "string",
                        "description": "Outcome of the inspection.",
                        "default": ""
                    },
                    "facilityType": {
                        "title": "Facility type",
                        "type": "string",
                        "description": "Partial, case-insensitive match against facility type. Common values: Restaurant, Grocery Store, School, Bakery, Children's Services Facility, Daycare (2 - 6 Years), Long Term Care, Catering, Liquor, Mobile Food Preparer, Hospital, Golden Diner, Wholesale, Shared Kitchen, Tavern, Special Event. Free text -- any substring the city has used is matched (110+ variants exist in the raw data).",
                        "default": ""
                    },
                    "inspectionType": {
                        "title": "Inspection type",
                        "type": "string",
                        "description": "Partial, case-insensitive match against inspection type. Common values: Canvass, License, Canvass Re-Inspection, Complaint, License Re-Inspection, Complaint Re-Inspection, Short Form Complaint, Non-Inspection, Suspected Food Poisoning, Consultation, Tag Removal. Free text -- any substring the city has used is matched.",
                        "default": ""
                    },
                    "dateFrom": {
                        "title": "Inspection date from",
                        "type": "string",
                        "description": "Only include inspections on/after this date (YYYY-MM-DD)."
                    },
                    "dateTo": {
                        "title": "Inspection date to",
                        "type": "string",
                        "description": "Only include inspections on/before this date (YYYY-MM-DD)."
                    },
                    "keyword": {
                        "title": "Keyword (violations full-text)",
                        "type": "string",
                        "description": "Full-text search across the violation descriptions (e.g. `rodent`, `mold`, `hot water`)."
                    },
                    "ward": {
                        "title": "Ward",
                        "enum": [
                            "",
                            "1",
                            "2",
                            "3",
                            "4",
                            "5",
                            "6",
                            "7",
                            "8",
                            "9",
                            "10",
                            "11",
                            "12",
                            "13",
                            "14",
                            "15",
                            "16",
                            "17",
                            "18",
                            "19",
                            "20",
                            "21",
                            "22",
                            "23",
                            "24",
                            "25",
                            "26",
                            "27",
                            "28",
                            "29",
                            "30",
                            "31",
                            "32",
                            "33",
                            "34",
                            "35",
                            "36",
                            "37",
                            "38",
                            "39",
                            "40",
                            "41",
                            "42",
                            "43",
                            "44",
                            "45",
                            "46",
                            "47",
                            "48",
                            "49",
                            "50"
                        ],
                        "type": "string",
                        "description": "Chicago City Council ward (1-50) the establishment falls in, resolved from the city's ward boundary map (mode=search).",
                        "default": ""
                    },
                    "communityArea": {
                        "title": "Community area",
                        "enum": [
                            "",
                            "ROGERS PARK",
                            "WEST RIDGE",
                            "UPTOWN",
                            "LINCOLN SQUARE",
                            "NORTH CENTER",
                            "LAKE VIEW",
                            "LINCOLN PARK",
                            "NEAR NORTH SIDE",
                            "EDISON PARK",
                            "NORWOOD PARK",
                            "JEFFERSON PARK",
                            "FOREST GLEN",
                            "NORTH PARK",
                            "ALBANY PARK",
                            "PORTAGE PARK",
                            "IRVING PARK",
                            "DUNNING",
                            "MONTCLARE",
                            "BELMONT CRAGIN",
                            "HERMOSA",
                            "AVONDALE",
                            "LOGAN SQUARE",
                            "HUMBOLDT PARK",
                            "WEST TOWN",
                            "AUSTIN",
                            "WEST GARFIELD PARK",
                            "EAST GARFIELD PARK",
                            "NEAR WEST SIDE",
                            "NORTH LAWNDALE",
                            "SOUTH LAWNDALE",
                            "LOWER WEST SIDE",
                            "LOOP",
                            "NEAR SOUTH SIDE",
                            "ARMOUR SQUARE",
                            "DOUGLAS",
                            "OAKLAND",
                            "FULLER PARK",
                            "GRAND BOULEVARD",
                            "KENWOOD",
                            "WASHINGTON PARK",
                            "HYDE PARK",
                            "WOODLAWN",
                            "SOUTH SHORE",
                            "CHATHAM",
                            "AVALON PARK",
                            "SOUTH CHICAGO",
                            "BURNSIDE",
                            "CALUMET HEIGHTS",
                            "ROSELAND",
                            "PULLMAN",
                            "SOUTH DEERING",
                            "EAST SIDE",
                            "WEST PULLMAN",
                            "RIVERDALE",
                            "HEGEWISCH",
                            "GARFIELD RIDGE",
                            "ARCHER HEIGHTS",
                            "BRIGHTON PARK",
                            "MCKINLEY PARK",
                            "BRIDGEPORT",
                            "NEW CITY",
                            "WEST ELSDON",
                            "GAGE PARK",
                            "CLEARING",
                            "WEST LAWN",
                            "CHICAGO LAWN",
                            "WEST ENGLEWOOD",
                            "ENGLEWOOD",
                            "GREATER GRAND CROSSING",
                            "ASHBURN",
                            "AUBURN GRESHAM",
                            "BEVERLY",
                            "WASHINGTON HEIGHTS",
                            "MOUNT GREENWOOD",
                            "MORGAN PARK",
                            "OHARE",
                            "EDGEWATER"
                        ],
                        "type": "string",
                        "description": "One of Chicago's 77 official community areas, resolved from the city's community-area boundary map (mode=search).",
                        "default": ""
                    },
                    "latitude": {
                        "title": "Near latitude (mode=search)",
                        "minimum": -90,
                        "maximum": 90,
                        "type": "number",
                        "description": "Center latitude for a \"near me\" radius search. Combine with `longitude` and `radiusKm`."
                    },
                    "longitude": {
                        "title": "Near longitude (mode=search)",
                        "minimum": -180,
                        "maximum": 180,
                        "type": "number",
                        "description": "Center longitude for a \"near me\" radius search. Combine with `latitude` and `radiusKm`."
                    },
                    "radiusKm": {
                        "title": "Radius (km)",
                        "minimum": 0.1,
                        "maximum": 50,
                        "type": "number",
                        "description": "Search radius in kilometers around `latitude`/`longitude`. Only applied when both are set. Default 1 km.",
                        "default": 1
                    },
                    "licenseNumbers": {
                        "title": "License numbers (mode=byLicense)",
                        "type": "array",
                        "description": "City of Chicago business license numbers to fetch full inspection history for.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "inspectionIds": {
                        "title": "Inspection IDs (mode=byInspectionIds)",
                        "type": "array",
                        "description": "Exact inspection ID(s) to fetch.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "sortAscending": {
                        "title": "Sort ascending",
                        "type": "boolean",
                        "description": "Sort by inspection date oldest-first instead of newest-first.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Hard cap on emitted records.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
