# Restaurant Health Inspection Scores & Violations API (`transparent_meteorite/restaurant-health-inspection-scores`) Actor

Restaurant health inspection scores, grades, violations and a new-restaurant signal from public open data for New York City, Chicago, King County WA, Montgomery County MD and Austin. One row per restaurant with a comparable 0-100 risk score. No login, no proxy.

- **URL**: https://apify.com/transparent_meteorite/restaurant-health-inspection-scores.md
- **Developed by:** [Detroit Web Agent - Open Data](https://apify.com/transparent_meteorite) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 60.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 inspection rows

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Restaurant Health Inspection Scores & Violations (Multi-City)

**Restaurant health inspection scores** and violations from official open data for New York City, Chicago, King County WA, Montgomery County MD and Austin TX: the latest inspection, top violations, a new-restaurant signal and a comparable 0-100 risk score per restaurant.

Pull restaurant health inspection scores, grades, critical violations and newly opened restaurant signals from official city and county open data into one clean table. Each row is a restaurant with its latest inspection, a plain-language list of the top violations, the business phone when the city publishes it, and a 0 to 100 risk score that is comparable across cities. Coverage today: New York City, Chicago, King County WA (Seattle area), Montgomery County MD and Austin TX. No login, no proxy, no scraping of review sites.

### What is Restaurant Health Inspection Scores & Violations (Multi-City)?

Restaurant health inspection scores, grades, violations and a new-restaurant signal from public open data for New York City, Chicago, King County WA, Montgomery County MD and Austin. One row per restaurant with a comparable 0-100 risk score. No login, no proxy. Run it from the Apify Console, the API or a schedule, and export the results as JSON, CSV, Excel or HTML.

### Output

One dataset row per restaurant inspection. Fields:

- `sourceCity`, `restaurantId`, `name`, `address`, `city`, `state`, `zip`, `area` (borough where published)
- `phone` (New York City and King County publish business phone numbers; Chicago, Montgomery County and Austin do not), `cuisine` (New York City), `facilityType` (Chicago, King County, Montgomery County)
- `inspectionDate`, `inspectionType`, `score`, `gradeOrResult`
- `criticalViolations`, `violationsCount`, `topViolations`, `closed`
- `isFirstInspection`, `firstInspectionDate`: the newly opened restaurant signal
- `daysSinceInspection`, `inspectionsInWindow`
- `riskScore` (0 to 100), `datasetUrl`, `sourceRecordUrl`, `scrapedAt`

Fields a city does not publish are `null`, never guessed.

#### Risk score formula

0 is a clean inspection and 100 is the worst. The inputs differ by city, so each city has its own documented formula that maps onto the same scale:

| City | Formula |
|---|---|
| New York City | 80% of (violation points / 60, capped at 1) plus 20% of (critical violations / 8, capped at 1), times 100. A closure by the health department sets a floor of 90. |
| Chicago | Base 10 for Pass, 45 for Pass w/ Conditions, 70 for Fail, plus 3 per cited violation (max +30). |
| King County | Inspection points / 60 (capped at 1) times 100. A business closure sets a floor of 90. |
| Montgomery County | Base 10 for Pass, 70 for Fail, 95 for Closed, plus 8 per risk factor not in compliance (max +30). |
| Austin | 100 minus the published inspection score. |

The scores are an honest way to sort within and across feeds, not an official rating. Each city defines a critical violation in its own way; the actor counts what the agency labels critical (New York), what falls in Chicago's critical group (violation numbers 1 to 14), and risk factors not in compliance (Montgomery County).

#### Newly opened restaurant signal

`isFirstInspection` is true when the restaurant had an opening style inspection inside your window: New York "Pre-permit" inspections, Chicago "License" inspections and Montgomery County "Pre-Opening" inspections. King County and Austin do not label opening inspections, so the field is `null` there. It is a strong signal that a restaurant is new or newly licensed, not proof of the opening day.

### Sample output

One row per restaurant (real row from a default run, phone omitted here):

```json
{
  "sourceCity": "New York City",
  "restaurantId": "50179356",
  "name": "KING KONG NYM",
  "address": "104 MOTT ST",
  "city": "New York",
  "area": "Manhattan",
  "state": "NY",
  "zip": "10013",
  "cuisine": "Chinese",
  "facilityType": null,
  "inspectionDate": "2026-10-21",
  "inspectionType": "Pre-permit (Operational) / Re-inspection",
  "score": 97,
  "gradeOrResult": "Not yet graded",
  "criticalViolations": 10,
  "violationsCount": 13,
  "topViolations": [
    "02B (critical): Hot TCS food item not held at or above 140 \u00b0F.",
    "02G (critical): Cold TCS food item held above 41 \u00b0F; smoked or processed fish held above 38 \u00b0F; intact raw eggs hel\u2026",
    "02H (critical): After cooking or removal from hot holding, TCS food not cooled by an approved method whereby the in\u2026"
  ],
  "closed": true,
  "riskScore": 100,
  "sourceRecordUrl": "https://data.cityofnewyork.us/resource/43nn-pn8j.json?camis=50179356",
  "isFirstInspection": true,
  "firstInspectionDate": "2026-10-21",
  "daysSinceInspection": 4,
  "inspectionsInWindow": 1,
  "datasetUrl": "https://data.cityofnewyork.us/d/43nn-pn8j",
  "scrapedAt": "2026-10-25T00:44:00.793Z"
}
```

### Input

| Field | What it does |
|---|---|
| `cities` | Feeds to read: `nyc`, `chicago`, `king-county`, `montgomery-md`, `austin`. Default `nyc` and `chicago`. |
| `daysBack` | Keep restaurants inspected in the last N days (1 to 365). Default 30. |
| `latestOnly` | On (default): one row per restaurant, its most recent inspection in the window. Off: one row per inspection. |
| `onlyCritical` | Keep only restaurants whose latest inspection cited a critical violation (or failed or closed, where the source gives no counts). |
| `onlyNewRestaurants` | Keep only restaurants with a pre-opening, initial-permit or new-license inspection in the window. |
| `restaurantsOnly` | On (default): drop schools, grocery stores and meat markets where the source labels facility type. |
| `minRiskScore` | Keep only rows at or above this 0 to 100 risk score. |
| `zipCodes` | Optional list of 5-digit ZIP codes. |
| `keyword` | Optional text matched against name, cuisine, facility type and address. |
| `maxItems` | Maximum rows to deliver. Default 100, hard cap 100,000. |

Bad or empty input never crashes a run. Unknown cities are ignored with a warning, and if nothing valid is left the actor falls back to New York City and Chicago. The key-value store record `OUTPUT` lists counts, the newest record date per feed, skipped feeds and warnings.

### Pricing

Pay per event: a tiny start fee of $0.00005 per run and $0.002 per inspection row delivered, which is $2.00 per 1,000 rows. You pay only for rows delivered and the run stops cleanly when your maximum charge is reached. Worked example: the default run of 100 rows costs about $0.20. A weekly list of 500 high-risk restaurants costs about $1.00.

### What does Restaurant Health Inspection Scores do?

It reads the public Socrata open data feeds published by each health department, checks that every feed is fresh (a feed whose newest record is more than 60 days old is skipped with a warning), and turns the raw records into a uniform format. New York publishes one row per violation and Chicago publishes violations as a long text blob, so the actor groups and parses them for you into a critical violation count, a violation count and the top three violations in short plain text. Montgomery County publishes compliance flags for about twenty risk factors, which the actor counts the same way. King County and Austin publish a score only, so their violation fields stay empty rather than invented.

The default run covers the last 30 days for New York City and Chicago and returns up to 100 restaurants, mixed across both cities, newest inspection first. You can filter to restaurants with critical violations, to restaurants with an opening inspection (a newly opened restaurant signal), to ZIP codes, to a keyword such as a cuisine, or to a minimum risk score.

**Run in 30 seconds**

1. Open the Actor and press **Try for free** (a free Apify account is enough).
2. Keep the prefilled input (New York City and Chicago, last 30 days, up to 100 rows) and press **Start**. A run takes well under a minute.
3. Open the **Output** tab. Use the table view or download CSV, Excel or JSON.

### Use cases

- Food service distributors and beverage suppliers: filter `onlyNewRestaurants` and get a weekly list of restaurants about to open, with business phone numbers in New York City, ready for outreach.
- POS, delivery and restaurant software sales teams: target newly licensed restaurants by ZIP code and cuisine, and prioritise by recent inspection date.
- Pest-control and food-safety consultants: set `minRiskScore` to 40 or more and `onlyCritical` on, then call restaurants that were just cited. Pair with `topViolations` to open the conversation with the exact problem.
- Insurers and brokers: compare risk scores across a portfolio of restaurant addresses and spot locations with repeat closures.
- Local journalists and food bloggers: list the latest failed or closed inspections in a city every morning.
- Automation idea (n8n, Make or Zapier): schedule a daily run with `daysBack` 2 and `onlyCritical` on, then send each new row to a Slack channel or a CRM as a lead with the restaurant name, phone and top violations.

### Limits

- Source refresh follows each agency. Records can appear days after the visit, and a restaurant's re-inspection may not be posted yet.
- New York City windows larger than about 90 days can hit a cap of 150,000 source rows per feed (newest first); the run adds a warning when this happens.
- Violation text is shortened to about 100 characters per item. Full text is in the source record.
- It does not rate food quality, read reviews or find owner contact details.
- Only the five listed feeds are covered. More cities can be added on request through the Issues tab.
- Data is reported as the agencies publish it. Check the source record before making decisions about a specific business.

### Related Actors

- [Local Business Leads](https://apify.com/transparent_meteorite/local-business-leads)
- [New Business Filings](https://apify.com/transparent_meteorite/new-business-filings)
- [State Liquor License New Applications](https://apify.com/transparent_meteorite/state-liquor-license-new-applications)
- [Building Permits Leads](https://apify.com/transparent_meteorite/building-permits-leads)

### FAQ

**Where does the data come from?**
From the official open data portals of each health department (Socrata datasets). The links are in `datasetUrl` and `sourceRecordUrl` on every row. Nothing comes from review sites.

**How fresh is it?**
New York City, Chicago, King County and Montgomery County update daily or within a day or two of an inspection. Austin publishes with a lag of several weeks, so the default 30 day window may return few Austin rows. A feed whose newest record is older than 60 days is skipped automatically.

**Why is one city missing violation details?**
King County and Austin publish a score only. Instead of guessing, those fields are `null`. The risk score still works.

**Can I get every inspection, not just the latest?**
Yes. Turn `latestOnly` off to get one row per inspection in the window.

**Does it include contact details?**
Only what the health department publishes about the business: name, address and, for New York City and King County, a business phone number. There are no emails and no personal data.

**How do I find newly opened restaurants?**
Turn on `onlyNewRestaurants`. It uses opening style inspection types published by New York City, Chicago and Montgomery County.

**Is a high risk score an official grade?**
No. The risk score is a transparent comparison score built from published numbers. Use the `gradeOrResult` column for the official grade or result.

**Did this actor do the job?** If it saved you time, a short honest review on the [Reviews tab](https://apify.com/transparent_meteorite/restaurant-health-inspection-scores/reviews) helps other people judge it. If something was off, open an Issue on this page with the input you used. I read every one and fix real bugs, usually the same day.

**This Actor vs delicious_zebu/yelp-business-info-scraper:** that one reads Yelp business pages, where health inspections are one part of a larger record. Choose this one for the official city and county inspection data with a risk score that is comparable across the five cities.

### Changelog

- 2026-10-25: Documentation updated: README refreshed.
- 2026-10-25: Initial release.
- 2026-10-25: Listing refresh: new Store icon, README reorganised (overview, data fields, pricing, FAQ) and changelog tab added. No code change.

# Changelog

This Actor's version history is a separate document: https://apify.com/transparent_meteorite/restaurant-health-inspection-scores/changelog.md

# Actor input Schema

## `cities` (type: `array`):

Which public inspection feeds to read. A feed whose newest record is older than 60 days is skipped with a warning.

## `daysBack` (type: `integer`):

Keep restaurants inspected in the last N days. Default 30. Large windows on New York City are capped at about 150,000 source rows.

## `latestOnly` (type: `boolean`):

On (default): one row per restaurant, its most recent inspection in the window. Off: one row per inspection.

## `onlyCritical` (type: `boolean`):

Keep only rows where the latest inspection cited at least one critical (public health) violation, or a failed or closed result where the source gives no counts.

## `onlyNewRestaurants` (type: `boolean`):

Keep only restaurants with a pre-opening, initial-permit or new-license inspection in the window. A newly opened restaurant signal for sales and supply teams.

## `restaurantsOnly` (type: `boolean`):

On (default): drop schools, grocery stores, meat markets and similar where the source labels the facility type. Off: keep every inspected food facility.

## `minRiskScore` (type: `integer`):

Optional 0 to 100. Keep only rows at or above this risk score. 40 or more is a good starting point for pest-control or food-safety leads.

## `zipCodes` (type: `array`):

Optional list of 5-digit ZIP codes, for example 10013 or 60661. Leave empty for all.

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

Optional text that must appear in the restaurant name, cuisine, facility type or address, for example "pizza" or "Chinese".

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

Stop after this many rows, newest inspection first. You pay only for rows delivered. Hard cap 100000.

## Actor input object example

```json
{
  "cities": [
    "nyc",
    "chicago"
  ],
  "daysBack": 30,
  "latestOnly": true,
  "onlyCritical": false,
  "onlyNewRestaurants": false,
  "restaurantsOnly": true,
  "minRiskScore": 0,
  "maxItems": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "cities": [
        "nyc",
        "chicago"
    ],
    "daysBack": 30,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("transparent_meteorite/restaurant-health-inspection-scores").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 = {
    "cities": [
        "nyc",
        "chicago",
    ],
    "daysBack": 30,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("transparent_meteorite/restaurant-health-inspection-scores").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 '{
  "cities": [
    "nyc",
    "chicago"
  ],
  "daysBack": 30,
  "maxItems": 100
}' |
apify call transparent_meteorite/restaurant-health-inspection-scores --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,transparent_meteorite/restaurant-health-inspection-scores"
        }
    }
}
```

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/G8008y76JNaGOEwUX/builds/LlC76nFhQ2iJA4rXq/openapi.json
