# NYC Restaurant Health Inspection Scraper (`copious_atoll/nyc-restaurant-inspections`) Actor

Extract NYC restaurant health inspection data. Search by name, borough, cuisine, zip code, or grade. Returns violations, scores, grades, inspection dates, and GPS coordinates. 296K+ records from NYC Open Data.

- **URL**: https://apify.com/copious\_atoll/nyc-restaurant-inspections.md
- **Developed by:** [Grim R](https://apify.com/copious_atoll) (community)
- **Categories:** Business
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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?

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

## NYC Restaurant Health Inspection Scraper

Extract New York City restaurant health inspection data from the official NYC Open Data portal. Search 296,000+ inspection records by restaurant name, borough, zip code, cuisine type, grade, or date range. Returns violation details, scores, grades, addresses, and GPS coordinates.

> **Disclaimer:** This actor is unofficial and is not affiliated with, sponsored by, or endorsed by the NYC Department of Health and Mental Hygiene (DOHMH) or NYC Open Data.

### What data can you extract from NYC restaurant inspections?

Each inspection record includes:

- **Restaurant name** (DBA) and unique CAMIS ID
- **Full address** with building, street, borough, and zip code
- **Cuisine type** (Italian, Chinese, American, Pizza, Mexican, etc.)
- **Inspection date** and inspection type
- **Grade** (A, B, C) and numeric **score**
- **Violation code** and full **violation description**
- **Critical flag** (Critical vs Non-Critical violations)
- **GPS coordinates** (latitude/longitude) for mapping
- **Census tract**, community board, and council district

### How to search NYC restaurant inspections

**By restaurant name:** Search for any restaurant (e.g., "chipotle", "shake shack"). Partial matches supported.

**By borough:** Filter to Manhattan, Brooklyn, Queens, Bronx, or Staten Island.

**By zip code:** Focus on a specific neighborhood.

**By cuisine type:** Find all Italian restaurants, Chinese restaurants, pizza places, etc.

**By grade:** Show only A-rated, B-rated, or C-rated restaurants.

**Critical violations only:** Filter to only show inspections with critical health violations.

**By date range:** Limit to inspections after a specific date.

### Output example

```json
{
    "camis": "50119362",
    "dba": "LIL FRANKIE'S GROCERY",
    "boro": "Manhattan",
    "building": "21",
    "street": "1 AVENUE",
    "zipcode": "10003",
    "phone": "2124200050",
    "cuisine_description": "Sandwiches",
    "inspection_date": "2026-03-18T00:00:00.000",
    "action": "Violations were cited in the following area(s).",
    "violation_code": "06F",
    "violation_description": "Wiping cloths not stored clean and dry, or in a sanitizing solution, between uses.",
    "critical_flag": "Critical",
    "score": "9",
    "grade": "A",
    "grade_date": "2026-03-18T00:00:00.000",
    "inspection_type": "Cycle Inspection / Initial Inspection",
    "latitude": "40.723519783072",
    "longitude": "-73.988256817111",
    "fullAddress": "21 1 AVENUE, Manhattan, NY 10003",
    "source": "NYC DOHMH Restaurant Inspection Results"
}
```

### How much does it cost to scrape NYC restaurant inspections?

This actor uses **pay-per-event pricing**. You pay per inspection record returned.

- **$0.00005 per actor start** (Apify default)
- **Per-record charge** based on the number of inspection results
- **No proxy costs** — this wraps a free NYC Open Data API, no proxy needed

The API is fast — 1,000 records return in under 2 seconds.

### Who uses NYC restaurant inspection data?

- **Restaurant chains** — benchmark hygiene standards across locations and competitors
- **Real estate investors** — assess food establishment compliance in target neighborhoods
- **Food industry consultants** — identify common violations by cuisine type or area
- **Insurance companies** — risk assessment for restaurant clients
- **Journalists and researchers** — investigate food safety patterns across NYC
- **App developers** — build restaurant review apps with official health scores
- **Marketing agencies** — target restaurants by grade, location, or cuisine for B2B outreach

### NYC restaurant inspection data freshness

The NYC Open Data API is updated daily by the Department of Health and Mental Hygiene. New inspection results typically appear within 1-2 business days of the inspection.

### Input parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| restaurantName | string | Search by restaurant name (partial match) |
| borough | select | Manhattan, Brooklyn, Queens, Bronx, Staten Island |
| zipCode | string | Filter by zip code |
| cuisineType | string | Filter by cuisine (Italian, Chinese, Pizza, etc.) |
| gradeFilter | select | Filter by grade: A, B, or C |
| criticalOnly | boolean | Only return critical violations |
| dateFrom | string | Inspections after this date (YYYY-MM-DD) |
| maxResults | integer | Max records to return (1-5000, default 50) |

### Integrations

Export your data as JSON, CSV, or Excel. Schedule daily runs to monitor new inspections. Use webhooks to trigger alerts when specific restaurants receive new violations.

This actor works as an **MCP server** — AI agents can discover and use it to access NYC restaurant inspection data programmatically.

# Actor input Schema

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

Search by restaurant name (DBA). Partial match supported.

## `borough` (type: `string`):

Filter by NYC borough.

## `zipCode` (type: `string`):

Filter by zip code (e.g., 10001).

## `cuisineType` (type: `string`):

Filter by cuisine (e.g., Italian, Chinese, Pizza, Mexican, American).

## `gradeFilter` (type: `string`):

Filter by inspection grade.

## `criticalOnly` (type: `boolean`):

Only return inspections with critical violations.

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

Only return inspections after this date (YYYY-MM-DD).

## `maxResults` (type: `integer`):

Maximum inspection records to return.

## Actor input object example

```json
{
  "restaurantName": "chipotle",
  "borough": "",
  "gradeFilter": "",
  "criticalOnly": false,
  "dateFrom": "2025-01-01",
  "maxResults": 50
}
```

# 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 = {
    "restaurantName": "chipotle",
    "dateFrom": "2025-01-01",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("copious_atoll/nyc-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 = {
    "restaurantName": "chipotle",
    "dateFrom": "2025-01-01",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("copious_atoll/nyc-restaurant-inspections").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 '{
  "restaurantName": "chipotle",
  "dateFrom": "2025-01-01",
  "maxResults": 50
}' |
apify call copious_atoll/nyc-restaurant-inspections --silent --output-dataset

```

## MCP server setup

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

```

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/tydeMWEDAEkUOFgCP/builds/EDdNELP6DtKVbUZIU/openapi.json
