# US Restaurant Inspections Scraper (`scrapyx/us-restaurant-inspections-scraper`) Actor

Restaurant health inspections from New York City, Chicago and Austin official open data: grade or score, result, violations (critical flagged), address, phone and cuisine. Plus NYC restaurants awaiting their first inspection (newly opened).

- **URL**: https://apify.com/scrapyx/us-restaurant-inspections-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** Lead generation, Travel, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.84 / 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/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

## US Restaurant Inspections Scraper (NYC, Chicago, Austin)

**Restaurant health inspections** from the official open data of **New York
City, Chicago and Austin**: establishment name, address, inspection date and
type, result, grade (NYC) or score (Austin), and every violation cited —
with NYC's critical flag — plus NYC phone numbers and cuisine, and Chicago
facility type and risk level.

Also: a list of **new NYC restaurants not yet inspected** — in the city's
words, "new establishments that have not yet received an inspection"
(restaurants that have applied for a permit).

No key, no login, no proxy.

### What it is for

- **Restaurant-tech and supplier leads** — places that just failed an
  inspection (pest control, cleaning, training, equipment), or NYC
  restaurants awaiting their first inspection.
- **Consumer and media research** — grades and violations by neighbourhood
  or cuisine.

### Input

| field | what it does |
| --- | --- |
| `cities` | `nyc`, `chicago`, `austin` — one search each. |
| `dateFrom` / `dateTo` | Inspection dates. Default: the last 30 days. |
| `nycNotYetInspected` | NYC: list establishments with no inspection yet (dates ignored). |
| `nameContains`, `zipCodes` | Name words; ZIPs or prefixes. |
| `cuisineContains` | NYC cuisine, e.g. `pizza`, `chinese`, `coffee`. |
| `completedInspectionsOnly` | Chicago: leave out "No Entry", "Out of Business", "Not Ready" visits. |
| `sortBy` | Newest or oldest first. |
| `maxItems` | Per city, default 200; `0` = all. |

### Things about this data worth knowing

#### 1. New York lists each violation as its own row

In NYC's data an inspection with five violations is five rows (60 rows were
16 inspections in one sample). The Actor returns one row per inspection
with a `violations` list and counts of all and critical violations.

#### 2. "1900-01-01" means "not inspected yet"

3,808 NYC establishments carry the date 1 January 1900. NYC's dataset
description explains it: "new establishments that have not yet received an
inspection". They are kept out of date searches and
available on their own through `nycNotYetInspected`.

#### 3. NYC grades are more than A, B, C

Besides letter grades there are "N" (not yet graded), "Z" (grade pending)
and inspections that carry no grade at all — in September 2026 there were
more of those than B and C grades together. The Actor spells them out
(`NOT_YET_GRADED`, `GRADE_PENDING`) or leaves `grade` empty.

#### 4. Not every Chicago "result" is an inspection

Chicago records visits where no inspection happened — "No Entry", "Out of
Business", "Not Ready" (1,750 of 11,614 results in 2026). Rows carry
`inspected: false` for them, and `completedInspectionsOnly` removes them.
Chicago's violations arrive as one long text; the Actor splits them into
number, title and inspector comments.

#### 5. Austin publishes late

On 25 September 2026 Austin's newest inspection was 25 August, against 22–23
September for NYC and Chicago. Each city's summary shows `newestDateInData`.

### Output

One `INSPECTION` row per inspection (or `NOT_YET_INSPECTED` in that mode),
the city's record(s) under `source`, and one `SEARCH_SUMMARY` per city.

```json
{
  "recordType": "INSPECTION",
  "city": "chicago",
  "name": "BACCI CAFE AND PIZZERIA ON MILWAUKEE AVE. INC.",
  "facilityType": "Restaurant",
  "risk": "Risk 1 (High)",
  "address": "4367 N MILWAUKEE AVE",
  "zip": "60641",
  "inspectionDate": "2026-09-15",
  "inspectionType": "Complaint",
  "result": "Fail",
  "inspected": true,
  "violations": [
    {"number": "10", "title": "ADEQUATE HANDWASHING SINKS PROPERLY SUPPLIED AND ACCESSIBLE",
     "comments": "OBSERVED NO HAND SOAP AVAILABLE AT HANDSINK IN FRONT PREP AREA. ..."}
  ]
}
```

### Speed

1,000 records per request, one per second: 1,200 inspections from each of
NYC and Chicago plus Austin's 327 took 15 seconds.

# Actor input Schema

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

One search per city.

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

YYYY-MM-DD. Default: 30 days ago.

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

YYYY-MM-DD.

## `nycNotYetInspected` (type: `boolean`):

Instead of inspections, list NYC establishments that have a permit but no inspection yet -- mostly newly opened restaurants. Dates are ignored.

## `nameContains` (type: `string`):

Any case.

## `cuisineContains` (type: `string`):

e.g. 'pizza', 'chinese', 'coffee'.

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

3-5 digits.

## `completedInspectionsOnly` (type: `boolean`):

Leave out 'No Entry', 'Out of Business', 'Not Ready' visits.

## `sortBy` (type: `string`):

By inspection date.

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

0 = every match.

## `minRequestInterval` (type: `number`):

Never below 1 (the portals' robots.txt Crawl-delay).

## Actor input object example

```json
{
  "cities": [
    "nyc",
    "chicago",
    "austin"
  ],
  "dateFrom": "2026-09-01",
  "nycNotYetInspected": false,
  "completedInspectionsOnly": false,
  "sortBy": "newest",
  "maxItems": 200,
  "minRequestInterval": 1
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# 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"
    ],
    "dateFrom": "2026-09-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/us-restaurant-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 = {
    "cities": [
        "nyc",
        "chicago",
        "austin",
    ],
    "dateFrom": "2026-09-01",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/us-restaurant-inspections-scraper").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"
  ],
  "dateFrom": "2026-09-01"
}' |
apify call scrapyx/us-restaurant-inspections-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/us-restaurant-inspections-scraper"
        }
    }
}
```

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/XtBKQbbP8anbVjklh/builds/lisrBLnMGgEwZmPx1/openapi.json
