# NYC + Chicago Restaurant Inspections Scraper (`maximedupre/restaurant-inspections`) Actor

Search NYC and Chicago restaurant inspections in one normalized format. Filter by establishment, outcome, date, or recent records, then review source-published grades, scores, violations, source details, and missing fields.

- **URL**: https://apify.com/maximedupre/restaurant-inspections.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Business, Developer tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.15 / 1,000 inspections

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 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

### 🧾 Restaurant inspections for public-health research

Restaurant operators, food-safety researchers, journalists, and data teams can use this Actor to search New York City and Chicago restaurant inspections. It returns one normalized row per inspection with source-published outcomes, dates, grades or scores, violations, locations, and source details, so you can review public records in one shape. Coverage is limited to the selected jurisdictions and what their sources publish.

- Find public records with [**Where Can I Find Restaurant Health Inspection Reports**](https://apify.com/maximedupre/restaurant-inspections/examples/where-can-i-find-restaurant-health-inspection-reports) for New York City or Chicago.
- Review source-published NYC grades and scores with [**NYC Restaurant Grades Lookup**](https://apify.com/maximedupre/restaurant-inspections/examples/nyc-restaurant-grades-lookup).
- Check Chicago outcomes, dates, locations, and violations with [**Chicago Food Inspection Reports**](https://apify.com/maximedupre/restaurant-inspections/examples/chicago-food-inspection-reports).
- Build a report from published counts, summaries, and violation details with [**Health Code Violations Report**](https://apify.com/maximedupre/restaurant-inspections/examples/health-code-violations-report).
- Find records by name, outcome, or date with [**Restaurant Inspections Lookup**](https://apify.com/maximedupre/restaurant-inspections/examples/restaurant-inspections-lookup).
- Review NYC inspection dates, types, and published violations with [**Health Inspection NYC**](https://apify.com/maximedupre/restaurant-inspections/examples/health-inspection-nyc).

#### 🧭 See normalized inspection records

Each dataset row represents one inspection record found in a selected public source. The row keeps the source-published wording and puts common details into the same shape: establishment identity and location, inspection facts, jurisdiction context, source details, and data quality.

Grades, scores, risk levels, identifiers, coordinates, and violation details appear when a source publishes them. Missing source values stay unavailable. `dataQuality.status` shows `complete` or `partial`, and `dataQuality.missingFields` names fields the source did not publish. Use `jurisdiction.comparabilityNote` when you need context about local grade or score scales.

#### ▶️ Run a filtered inspection search

**Run flow**

1. Choose New York City, Chicago, or both in `jurisdictions`.
2. Add the same filter set for every selected jurisdiction.
3. Set `maxItems`, or leave it empty to return all available results until each selected source is exhausted.
4. Open the default dataset to review structured rows and source details.

**Source limits**

This Actor covers the two jurisdictions named in the input schema. Results are bounded by the records each source publishes. A source can use different outcome, grade, score, or violation fields, so keep the source and jurisdiction context with each row.

#### ⚙️ Input

The required field is `jurisdictions`. All other fields are optional. The same filters apply to every selected jurisdiction.

| Field | Type | What it does |
| --- | --- | --- |
| `jurisdictions` | array of strings | Required. Choose `New York City`, `Chicago`, or both. |
| `maxItems` | integer | Stops after this many inspection records. Leave it empty to return all available results until each selected source is exhausted. |
| `establishmentNames` | array of strings | Keeps records whose establishment name contains at least one value in this list. |
| `outcomes` | array of strings | Keeps records with one of these source-published outcomes or statuses. An empty list keeps all outcomes. |
| `startDate` | date string | Keeps inspections on or after this date. Use `YYYY-MM-DD`. |
| `endDate` | date string | Keeps inspections on or before this date. Use `YYYY-MM-DD`. |
| `recentOnly` | boolean | Keeps recent or newly observed inspections when turned on. |

**Default input example**

This example uses the default input from a successful run.

```json
{
  "jurisdictions": [
    "New York City"
  ],
  "maxItems": 5
}
```

**Filter notes**

Use `establishmentNames` for one or more partial-name filters. Use `outcomes` with the wording used by the selected source. Leave optional filters empty or unset when you want the full available date range and all source-published outcomes.

#### 🧾 Output

The default dataset contains one normalized inspection-record shape. Optional values may be absent when a selected source does not publish them.

Each run also returns a `dataset` URL for the default dataset.

**Run output**

| Field | Type | What it does |
| --- | --- | --- |
| `dataset` | URL string | Links to the normalized inspection records in the default dataset. |

**Inspection record fields**

| Field | Type | What it does |
| --- | --- | --- |
| `establishment` | object | Restaurant or food-establishment details. |
| `establishment.name` | string | Establishment name. |
| `establishment.type` | string | Source-published facility type. |
| `establishment.licenseId` | string | Source-published license or permit identifier. |
| `establishment.facilityId` | string | Source-published facility identifier. |
| `establishment.address` | object | Establishment address when published. |
| `establishment.address.street` | string | Street address. |
| `establishment.address.city` | string | City in the address. |
| `establishment.address.state` | string | State in the address. |
| `establishment.address.postalCode` | string | Postal code in the address. |
| `establishment.coordinates` | object | Establishment coordinates when published. |
| `establishment.coordinates.latitude` | number | Latitude. |
| `establishment.coordinates.longitude` | number | Longitude. |
| `inspection` | object | Source-published inspection details. |
| `inspection.id` | string | Source identifier for the inspection record. |
| `inspection.date` | date string | Date when the inspection took place. |
| `inspection.type` | string | Source-published inspection type. |
| `inspection.outcome` | string | Source-published inspection outcome or status. |
| `inspection.grade` | string | Source-published letter grade when available. |
| `inspection.score` | number | Source-published numeric health score when available. |
| `inspection.riskLevel` | string | Source-published facility or inspection risk level. |
| `inspection.violationCount` | integer | Number of violations published for the inspection. |
| `inspection.summary` | string | Source-published violation summary text. |
| `inspection.violations` | array of objects | Individual violations published for the inspection. |
| `inspection.violations[].code` | string | Source-published violation code. |
| `inspection.violations[].description` | string | Source-published violation description. |
| `inspection.violations[].isCritical` | boolean | Whether the source marks the violation as critical. |
| `jurisdiction` | object | City or county public-health jurisdiction context. |
| `jurisdiction.name` | string | Jurisdiction name. |
| `jurisdiction.type` | string | Source-published jurisdiction type. |
| `jurisdiction.state` | string | US state for the jurisdiction when published. |
| `jurisdiction.comparabilityNote` | string | Note about comparing this jurisdiction's grades or scores with another scale. |
| `source` | object | Public inspection source details. |
| `source.name` | string | Name of the public inspection source. |
| `source.sourceUrl` | URL | Source URL when published. |
| `source.recordUrl` | URL | URL for this inspection record when published. |
| `source.observedAt` | date-time string | Time when the source record was observed. |
| `dataQuality` | object | Short status for the values in this record. |
| `dataQuality.status` | string | `complete` when useful fields are present, or `partial` when the source left fields out. |
| `dataQuality.missingFields` | array of strings | Normalized field paths the source did not publish. |

**Example inspection record**

This genuine row comes from the current beta build's successful default-input run. It is shown as returned; optional fields that are absent from the source are listed in `dataQuality.missingFields`.

```json
{
  "establishment": {
    "name": "PRET A MANGER",
    "type": "Soups/Salads/Sandwiches",
    "facilityId": "50146150",
    "address": {
      "street": "62 WEST   45 STREET",
      "city": "Manhattan",
      "state": "NY",
      "postalCode": "10036"
    },
    "coordinates": {
      "latitude": 40.756195280284,
      "longitude": -73.981385740102
    }
  },
  "inspection": {
    "date": "2026-08-04",
    "type": "Cycle Inspection / Initial Inspection",
    "outcome": "Violations were cited in the following area(s).",
    "grade": "A",
    "score": 11,
    "violationCount": 2,
    "summary": "Cold TCS food item held above 41 °F; smoked or processed fish held above 38 °F; intact raw eggs held above 45 °F; or reduced oxygen packaged (ROP) TCS foods held above required temperatures except during active necessary preparation. | Anti-siphonage or back-flow prevention device not provided where required; equipment or floor not properly drained; sewage disposal system in disrepair or not functioning properly. Condensation or liquid waste improperly disposed of.",
    "violations": [
      {
        "code": "02G",
        "description": "Cold TCS food item held above 41 °F; smoked or processed fish held above 38 °F; intact raw eggs held above 45 °F; or reduced oxygen packaged (ROP) TCS foods held above required temperatures except during active necessary preparation.",
        "isCritical": true
      },
      {
        "code": "10B",
        "description": "Anti-siphonage or back-flow prevention device not provided where required; equipment or floor not properly drained; sewage disposal system in disrepair or not functioning properly. Condensation or liquid waste improperly disposed of.",
        "isCritical": false
      }
    ]
  },
  "jurisdiction": {
    "name": "New York City",
    "type": "city",
    "state": "NY",
    "comparabilityNote": "New York City's DOHMH grades and scores use the NYC inspection scale; compare them directly only within this jurisdiction."
  },
  "source": {
    "name": "NYC DOHMH Restaurant Inspection Results",
    "sourceUrl": "https://data.cityofnewyork.us/resource/43nn-pn8j.json",
    "observedAt": "2026-08-05T23:44:49.853Z"
  },
  "dataQuality": {
    "status": "partial",
    "missingFields": [
      "establishment.licenseId",
      "inspection.id",
      "inspection.riskLevel",
      "source.recordUrl"
    ]
  }
}
```

#### 💳 Pricing

**Per-record pricing**

You pay for each inspection record saved to the dataset. The current event price is shown on the Store page for your Apify pricing tier. A run that saves no inspection records does not trigger this per-record event, and filtered-out records are not saved.

#### 🔌 Integrations

**Dataset and API**

Open the default dataset from the run page to inspect the normalized rows. The dataset and its API provide structured access to the fields in the Output section.

**Video walkthrough**

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Which jurisdictions can I select?

The input supports New York City, Chicago, or both. The same filter set applies to every selected jurisdiction.

##### Does a row include health code violations?

When the source publishes them, a row includes a violation count, summary, and individual violation codes and descriptions. A source can also mark an individual violation as critical. These fields can be unavailable in a source row.

##### What if a source does not publish a field?

The value stays unavailable instead of being invented. `dataQuality.status` can be `partial`, and `dataQuality.missingFields` lists the missing normalized field paths.

##### Are NYC grades and Chicago outcomes directly comparable?

No single scale should be assumed. Keep each source's outcome, grade, or score with its jurisdiction, and read `jurisdiction.comparabilityNote` before making a comparison.

##### Can I use this for restaurant health scores near me?

Only within the supported jurisdictions. Choose New York City or Chicago, then filter by establishment name or another available input; the Actor does not infer your location.

##### What does an empty `maxItems` value do?

It returns all available results until each selected source is exhausted. Use a number when you want to stop after a set number of saved records.

##### Can I search Hartford or another city?

Not with this Actor. Its public input supports New York City and Chicago, so choose a source that covers the city you need.

##### Does this Actor make a safety or compliance decision?

No. It returns source-published inspection data and context. Review the source record and make your own research, safety, or business decision.

### 📝 Changelog

**0.1: Richer inspection details and easier filtering**

- Added richer inspection details, source record links, and clearer ways to discover and filter NYC and Chicago records.

**0.0: Initial release**

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~restaurant-inspections/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [US Restaurant Health Inspection Scores](https://apify.com/filingradar/us-restaurant-inspections) — Compare normalized NYC and Chicago inspection rows with grades, scores, and violation flags.
- [US Restaurant Inspections Scraper: Food Establishments](https://apify.com/scrapers_lat/usa-restaurant-inspections-scraper) — Export broader US inspection fields when you need more jurisdictions.
- [Restaurant Inspection Data Scraper - 7 US Cities](https://apify.com/maydit/us-restaurant-inspections-scraper) — Review normalized inspection data across seven cities.
- [Chicago Restaurant Inspections](https://apify.com/deepztack/chicago-restaurant-inspections) — Focus on Chicago outcomes, facility types, risk levels, addresses, and dates.
- [NYC Restaurant Inspection Results Scraper](https://apify.com/automation-lab/nyc-restaurant-inspection-results-scraper) — Review NYC grades, violations, scores, and location fields.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `jurisdictions` (type: `array`):

Choose New York City, Chicago, or both. Each choice uses that jurisdiction's public inspection source.

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

Stop after this many records across the selected jurisdictions. Leave it empty to return all available records until each selected source is exhausted.

## `establishmentNames` (type: `array`):

Add partial establishment names to keep matching records. The same list applies to every selected jurisdiction; leave it empty to skip this filter.

## `outcomes` (type: `array`):

Keep records with one of these source-published outcomes or statuses. Use wording from the selected source; leave the list empty to keep all outcomes.

## `startDate` (type: `string`):

Keep inspections on or after this source inspection date. Use YYYY-MM-DD.

## `endDate` (type: `string`):

Keep inspections on or before this source inspection date. Use YYYY-MM-DD.

## `recentOnly` (type: `boolean`):

Turn this on to keep inspections from the last 30 days. It can narrow an older start date.

## Actor input object example

```json
{
  "jurisdictions": [
    "New York City"
  ],
  "maxItems": 5
}
```

# Actor output Schema

## `dataset` (type: `string`):

A dataset of normalized restaurant and food-establishment inspection records from the selected jurisdictions.

# 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 = {
    "jurisdictions": [
        "New York City"
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/restaurant-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 = {
    "jurisdictions": ["New York City"],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/restaurant-inspections").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 '{
  "jurisdictions": [
    "New York City"
  ],
  "maxItems": 5
}' |
apify call maximedupre/restaurant-inspections --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Gj5CWd29H3G05yJIe/builds/Lltp4m7N4k2ILU4wX/openapi.json
