NYC Restaurant Health Inspections Scraper
Pricing
Pay per usage
Go to Apify Store

NYC Restaurant Health Inspections Scraper
Search NYC restaurant health inspection grades and violations. Get grades, inspection dates, and violation details. For food safety research.
Pricing
Pay per usage
Rating
0.0
(0)
Developer

Fortuitous Pirate
Maintained by Community
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
NYC Restaurant Inspections Scraper
Apify actor that fetches NYC DOHMH Restaurant Inspection Results from the NYC Open Data Socrata API.
Data Source
- API: NYC Open Data - DOHMH New York City Restaurant Inspection Results
- Endpoint: https://data.cityofnewyork.us/resource/43nn-pn8j.json
- Type: Socrata SODA API (no scraping required)
- Records: ~297,000 inspection records
Input Parameters
| Parameter | Type | Description |
|---|---|---|
borough | string | Filter by NYC borough (Manhattan, Brooklyn, Queens, Bronx, Staten Island) |
grade | string | Filter by inspection grade (A, B, C, N, P, Z) |
cuisineType | string | Filter by cuisine (e.g., "Chinese", "Italian") |
inspectionDateFrom | string | Inspections on/after this date (YYYY-MM-DD) |
inspectionDateTo | string | Inspections on/before this date (YYYY-MM-DD) |
maxItems | integer | Maximum records to fetch (default: 1000, max: 50000) |
Output Schema
Each record contains:
| Field | Description |
|---|---|
camis | Unique restaurant identifier |
dba | Business name (Doing Business As) |
boro | Borough (Manhattan, Brooklyn, Queens, Bronx, Staten Island) |
building | Building number |
street | Street name |
zipcode | ZIP code |
phone | Phone number |
cuisine_description | Type of cuisine |
inspection_date | Date of inspection (ISO format) |
action | Action taken by DOHMH |
violation_code | Violation code if any |
violation_description | Description of violation |
critical_flag | "Critical" or "Not Critical" |
score | Inspection score (lower is better) |
grade | Letter grade (A, B, C, N, P, Z) |
grade_date | Date grade was assigned |
inspection_type | Type of inspection |
latitude | Latitude coordinate |
longitude | Longitude coordinate |
Grade Meanings
- A: Score 0-13
- B: Score 14-27
- C: Score 28+
- N: Not Yet Graded (pending adjudication)
- P: Grade Pending (new restaurant, reinspection needed)
- Z: Grade Pending (reinspection scheduled)
Rate Limits
The Socrata API allows 1,000 requests per hour without an app token. This actor includes a 1-second delay between requests to stay well within limits.
Local Testing
npm installnode src/main.js
Check output in storage/datasets/default/.
Example Usage
Fetch A-graded Italian restaurants in Manhattan from 2025:
{"borough": "Manhattan","grade": "A","cuisineType": "Italian","inspectionDateFrom": "2025-01-01","maxItems": 100}