# Restaurant Inspections Scraper: Health Scores and Violations (`tacps126/restaurant-inspections-scraper`) Actor

Restaurant and food inspections from US cities and counties (New York, Chicago, King County, Montgomery County and more) in one format: business, address, result, score, grade and each violation. Filter by keyword; get only new inspections on a schedule. $2 per 1,000 inspections.

- **URL**: https://apify.com/tacps126/restaurant-inspections-scraper.md
- **Developed by:** [Tapaswai Choudhary](https://apify.com/tacps126) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 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/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 Inspections Scraper

Restaurant and food establishment inspections from US cities and counties, in one format. Each inspection
comes with the business, address, inspection type, result, score or grade, and every violation cited, read
from the health department's own official open-data table.

### At a glance

- **Areas:** New York City, New York State (outside NYC), Chicago, Austin, King County (Seattle), Montgomery
  County (MD), Cincinnati, Delaware and Marin County (CA). Any other city or county that publishes its food
  inspections on an open-data site: paste the table's address.
- **One row per inspection:** tables that publish one row per violation are merged, so each inspection
  carries its full list of violations (code, description, and whether it was critical where the area marks
  it) and a count.
- **Filters:** inspected in the last N days, keywords in the business name, facility type, cuisine, result
  or violations (fail, mice, temperature, school...), words to leave out.
- **Monitoring:** turn on *Only new since last run* and put the run on a schedule to get each new inspection
  once.
- **Price:** $2 per 1,000 inspections, plus a small start fee per run. Empty runs cost only the start fee.

### Who uses it

- Pest control, cleaning, food safety training and equipment companies looking for places that just failed
  or were cited.
- Restaurant suppliers, delivery and POS sales teams building lists of active food businesses.
- Journalists, local news sites and apps that publish inspection results.
- Insurers, landlords and investors checking a place's record.

### Input

| Field | What it does |
|---|---|
| Cities | One or more cities or counties from the list |
| Other cities | Address of a food inspections table on an open-data site |
| Inspected in the last (days) | How far back to look (default 30) |
| Keywords / Exclude keywords | Words in the business name, facility type, cuisine, result or violations |
| Max inspections per city / in total | Newest inspections first |
| Only new since last run | For scheduled monitoring |

Example: inspections in New York City and Chicago from the last 7 days that cite mice or rats.

```json
{
  "cities": ["new-york", "chicago"],
  "issuedWithinDays": 7,
  "keywords": ["mice", "rats", "rodent"]
}
```

### Output

One row per inspection. Fields an area does not publish are left out.

```json
{
  "jurisdiction": "New York",
  "state": "NY",
  "businessId": "50187207",
  "businessName": "EXAMPLE EXPRESS",
  "cuisine": "Californian",
  "inspectionDate": "2026-11-10",
  "inspectionType": "Cycle Inspection / Initial Inspection",
  "result": "Violations were cited in the following area(s).",
  "score": 42,
  "address": "2169 BROADWAY",
  "locality": "Manhattan",
  "zip": "10024",
  "phone": "2125550100",
  "latitude": 40.78,
  "longitude": -73.98,
  "violationCount": 2,
  "violations": [
    { "code": "04L", "description": "Evidence of mice or live mice in establishment's food or non-food areas.", "critical": true },
    { "code": "10F", "description": "Non-food contact surface or equipment not kept clean.", "critical": false }
  ],
  "source": "https://data.cityofnewyork.us/d/43nn-pn8j"
}
```

What `score` and `grade` mean depends on the area: in New York a lower score is better and grades are A, B
and C; in Austin the score is out of 100. `result` is the area's own wording (Pass, Fail, Satisfactory...).
Austin publishes scores only, without violations.

### Questions

**How fresh is the data?** As fresh as each health department's table. Most update daily or weekly; Austin
updates about once a month, so use a longer window there.

**An area I need is missing.** If it has an open-data site, paste the address of its inspections table under
*Other cities*. If that does not work, open an issue with the area name.

**Is this personal data?** Inspection results are public records about businesses. Use them within the law
that applies to you.

# Actor input Schema

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

Cities and counties to read. Each one's inspections come from its own official open-data table.

## `datasetUrls` (type: `array`):

A city or county that is not in the list: paste the address of its food inspections table on its open-data site (the address ends in an id like abcd-1234). The columns are recognised automatically.

## `issuedWithinDays` (type: `integer`):

Only inspections from this many days.

## `keywords` (type: `array`):

Keep inspections whose business name, facility type, cuisine, result or violations have any of these words, for example fail, mice, pizza, school.

## `excludeKeywords` (type: `array`):

Drop inspections whose business name, facility type, cuisine, result or violations have any of these words.

## `maxItemsPerCity` (type: `integer`):

Newest first.

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

The run stops at this many inspections.

## `onlyNew` (type: `boolean`):

Return only rows that earlier runs with the same monitor name did not return. Use it with a schedule.

## `monitorName` (type: `string`):

A name for this monitor, so several schedules keep separate histories. Leave empty to keep one history per set of inputs.

## `tenantId` (type: `string`):

Optional. Keeps histories of different teams or clients apart.

## `debug` (type: `boolean`):

Write more detail to the log.

## Actor input object example

```json
{
  "cities": [
    "chicago"
  ],
  "issuedWithinDays": 7,
  "maxItemsPerCity": 500,
  "maxItems": 100,
  "onlyNew": false,
  "debug": false
}
```

# Actor output Schema

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

The produced items (default dataset items).

# 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": [
        "chicago"
    ],
    "issuedWithinDays": 7,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("tacps126/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": ["chicago"],
    "issuedWithinDays": 7,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("tacps126/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": [
    "chicago"
  ],
  "issuedWithinDays": 7,
  "maxItems": 100
}' |
apify call tacps126/restaurant-inspections-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tacps126/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/n53ZwmcreAwBxhWZ0/builds/tsE8QSvVE8CqN5VcF/openapi.json
