# Restaurant Health Inspection Scraper - NYC, Chicago, Austin (`punkrecordsdata/restaurant-health-inspection-aggregator`) Actor

Restaurant health inspections, violations and restaurant profiles across NYC, Chicago and Austin, normalized into one dataset. Export to CSV, Excel, JSON.

- **URL**: https://apify.com/punkrecordsdata/restaurant-health-inspection-aggregator.md
- **Developed by:** [PunkRecordsData](https://apify.com/punkrecordsdata) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.20 / 1,000 inspection records

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/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

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner" alt="PunkRecordsData" width="100%" />
</p>

## 🍽️ Restaurant Health Inspection Scraper: NYC, Chicago & Austin, PunkRecordsData

> 🚀 **Restaurant health inspections, individual violations, and restaurant profiles across NYC, Chicago and Austin, normalized into one dataset.** Search by name once and get results from all 3 city health departments in a single run, no login, no API key.

Scrape restaurant health inspection data straight from each city's own open-data portal: New York City's DOHMH inspection results, Chicago's Food Inspections dataset, and Austin's Food Establishment Inspection Scores. Each city publishes a different schema (letter grades vs. pass/fail vs. color-banded scores, one row per violation vs. one row per visit); this Actor normalizes all three into one consistent set of fields plus every individual violation, so you're not writing three different parsers.

Built for the [Apify platform](https://apify.com): screen a restaurant chain across cities in one run, or schedule a weekly pull to catch new inspection results as each city publishes them.

### 📋 What the Restaurant Health Inspection Scraper does

Give it a restaurant name (like "pizza") and it searches all 3 selected cities' official inspection data and returns a normalized inspection record per real visit: restaurant, address, date, result (grade, pass/fail, or score category depending on the city), and numeric score where the city publishes one. Where a city's data supports it, it also returns every individual violation cited at that inspection, and a deduplicated restaurant profile computed once per unique restaurant in the run, not once per inspection.

> 💡 **Why it matters:** most restaurant inspection scrapers on the market return a flat list of scores per city and stop there, whether they cover one city or several. This one also breaks out individual violations and restaurant profiles as their own billable data, real depth most competitors don't offer regardless of city count.

### 📊 Output

Real sample fields from a verified run searching "pizza", one of 3 record types identified by `recordType`.

**`inspection-record`** (primary, one row per real inspection visit):

| Field | Type | Example |
|---|---|---|
| 🏙️ `city` | string | `New York City` / `Chicago` / `Austin` |
| 🍽️ `restaurantName` | string | `D'ANNA'S PIZZA & DELI` |
| 📅 `inspectionDate` | string | `2026-09-10` |
| 🎓 `result` | string | NYC letter grade, Chicago Pass/Fail, or Austin's color-banded score category |
| 🔢 `score` | string | `27` (NYC/Austin numeric score; `N/A` where the city doesn't publish one) |
| ⚠️ `violationCount` | number/string | `6` (or `N/A` where the source has no violation-level data) |

**`violation-record`** (one row per individual violation, NYC and Chicago only):

```json
{ "city": "New York City", "restaurantName": "D'ANNA'S PIZZA & DELI", "violationCode": "04L",
  "violationDescription": "Evidence of mice or live mice in establishment's food or non-food areas.", "criticalFlag": "Critical" }
```

**`restaurant-profile-record`** (one row per unique restaurant in the run):

```json
{ "city": "New York City", "restaurantId": "50137045", "restaurantName": "D'ANNA'S PIZZA & DELI", "address": "169-08 CROCHERON AVENUE", "zipCode": "11358" }
```

Every field a city's own source genuinely doesn't publish returns `"N/A"`, never an invented value. You always know why a field is empty.

### ✨ Why choose this Actor

- **3 real data types, one run**: inspection results, individual violations, and deduplicated restaurant profiles, not just a flat score list.
- **Normalized across 3 different government schemas.** NYC, Chicago and Austin each publish inspections in a genuinely different shape (letter grade vs. pass/fail vs. color-banded score; one row per violation vs. one row per visit); this Actor does that normalization work for you.
- **Violation-level detail included** for NYC and Chicago, exactly the specific code and description cited, not just a pass/fail summary.
- **Government data, directly sourced.** Every field comes straight from each city's own open-data portal, no login or API key required anywhere.

### 📈 How it compares to alternatives

Measured against the closest published restaurant inspection actors on the Apify Store, including multi-city ones:

| Actor | Cities | Primary price | Billable events |
|---|---|---|---|
| Single-city scrapers (5+ actors) | 1 | $3.00-5.00/1k | 1, flat score list |
| Multi-city scrapers (2 actors found, up to 7 cities) | 2-7 | $3.60-4.00/1k | 1, flat score list, even at 7 cities |
| **This Actor** | 3 (NYC, Chicago, Austin) | See Store pricing | **3** (inspection, violation, restaurant profile), all raw government source data |

### 🚀 How to use

1. Create a free [Apify account](https://console.apify.com). New accounts get $5 in free credit.
2. Open the Restaurant Health Inspection Scraper and enter a restaurant name (e.g. "pizza"), and pick one or more cities.
3. Click **Start** and wait for the run to finish.
4. Download your data as CSV, Excel, JSON or XML, or pull it via the API.

### 💼 Business use cases

**Restaurant review & discovery apps**
Show real health inspection scores and specific violations alongside restaurant listings.

**Food safety compliance & consulting**
Track a chain's inspection history and violation patterns across multiple cities in one place.

**Insurance & risk underwriting**
Screen a restaurant's violation history before underwriting a liability policy.

**Journalism & consumer advocacy**
Cross-reference violation codes and critical-flag rates across cities for public-health reporting.

### 🔌 Automating Restaurant Health Inspection Scraper

Connect this Actor to **Make**, **Zapier**, **Slack** or **Airbyte** to push new inspection results into a spreadsheet, database or channel automatically. Schedule a weekly run per city to catch new inspections as each health department publishes them.

### 🌟 Beyond business use cases

**Research:** public-health and food-safety research using real inspection and violation data.
**Personal projects:** check a restaurant's health record before dining out.
**Non-profit:** food-safety transparency and consumer-advocacy projects.
**Experimentation:** train violation-prediction or risk-scoring models against real multi-city inspection data.

### 🤖 Ask an AI assistant about this scraper

Paste this Actor's Store page into ChatGPT, Claude or Perplexity and ask: "Does this restaurant inspection scraper include individual violations, or just a pass/fail score?" The README and input schema are structured so AI assistants can answer accurately from the page alone.

### ❓ Frequently Asked Questions

**Which cities does this cover?**
New York City, Chicago and Austin today, each from that city's own official open-data portal.

**Does this include individual violations, or just a score?**
Both, where the source supports it. NYC and Chicago publish violation-level detail (code, description, critical flag); Austin's own dataset only publishes a score and color-banded category, no violation breakdown, a real ceiling of that source, not a gap in this Actor.

**Why do NYC, Chicago and Austin results look different?**
Each city publishes a genuinely different schema: NYC uses letter grades (A/B/C) and numeric scores, Chicago uses Pass/Fail/Not Ready results with a risk level, Austin uses a numeric score with a color-banded category. This Actor normalizes the shared fields (restaurant, address, date, result) while keeping each city's own labels intact.

**Do I need an API key for any of these cities?**
No. Every field comes from each city's own public open-data API; no login, session or API key required anywhere.

**How is the restaurant profile billed if the same restaurant has multiple inspections in one run?**
Once. `restaurant-profile-record` is computed and billed once per unique restaurant encountered in the run, never re-billed for every inspection.

**What happens if a restaurant name doesn't match anything?**
The Actor returns zero rows for that city rather than an error, and logs which city returned nothing.

**How fresh is the data?**
As fresh as each city's own portal. NYC and Chicago's datasets update within days of a real inspection; freshness varies slightly by city.

**Can more cities be added?**
The normalization pattern (Socrata-family open-data portals) generalizes to other cities that publish the same way; reach out if a specific city not listed here matters for your use case.

### 🔌 Integrate with any app

Every run's output is available as CSV, Excel, JSON or XML, or through Apify's API and client libraries for Python and JavaScript.

### 🔗 Recommended Actors

Browse the rest of the [PunkRecordsData](https://apify.com/punkrecordsdata) catalog for more scrapers covering government data, sports data, and social media intelligence.

> 💡 **Pro Tip:** browse the complete [PunkRecordsData collection](https://apify.com/punkrecordsdata).

**🆘 Need Help?** contact.punkrecordsdata@gmail.com

> **⚠️ Disclaimer:** This is an independent tool, not affiliated with, endorsed by, or sponsored by the City of New York, the City of Chicago, or the City of Austin. It collects only publicly available data.

# Actor input Schema

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

Which city health department(s) to search. Each is a real, independently-updated open-data portal — schemas differ per city (see README), normalized in the output.

## `restaurantName` (type: `string`):

Free-text search across restaurant/business names, e.g. "pizza". Leave blank to pull the most recent inspections for the selected cities instead.

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

Free users: limited to 10 items (preview). Paid users: optional, max 1,000,000. Shared across all record types and cities.

## Actor input object example

```json
{
  "cities": [
    "nyc",
    "chicago",
    "austin"
  ],
  "restaurantName": "pizza",
  "maxItems": 10
}
```

# Actor output Schema

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

Key fields: city, restaurant, date, result

## `fullData` (type: `string`):

Complete dataset with every field for all 3 record types

# 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",
        "austin"
    ],
    "restaurantName": "pizza",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("punkrecordsdata/restaurant-health-inspection-aggregator").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",
        "austin",
    ],
    "restaurantName": "pizza",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("punkrecordsdata/restaurant-health-inspection-aggregator").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",
    "austin"
  ],
  "restaurantName": "pizza",
  "maxItems": 10
}' |
apify call punkrecordsdata/restaurant-health-inspection-aggregator --silent --output-dataset

```

## MCP server setup

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

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/erpLwfznhlIpnmBEP/builds/2FxZXJIXXnj7mpZRR/openapi.json
