NYC Restaurant Health Inspection Monitor (DOHMH Grades JSON)
Pricing
from $1.20 / 1,000 inspection row delivereds
NYC Restaurant Health Inspection Monitor (DOHMH Grades JSON)
Monitor official NYC Open Data restaurant inspections (DOHMH): one row per inspection and violation with score, grade, action, violation codes and descriptions, borough, cuisine, address and coordinates. Filter by date, borough, cuisine or grade. Establishment data only, no personal contact fields.
Pricing
from $1.20 / 1,000 inspection row delivereds
Rating
0.0
(0)
Developer
Steadfetch
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
This Actor returns official New York City restaurant inspection results published by the NYC Department of Health and Mental Hygiene (DOHMH) on the NYC Open Data Socrata API: one structured JSON row per inspection or violation, with the score, grade, action, violation code and description, and the establishment borough, address and coordinates. It is meant for compliance, food-safety and location analytics work that needs the inspection grain the City actually publishes. No browser, no login and no API key are required.
Tested daily. Last verified: 2026-10-30
What it does
The Actor queries the DOHMH New York City Restaurant Inspection Results dataset (Socrata resource 43nn-pn8j) and writes one dataset item per inspection or violation row.
- Date window:
sinceanduntilfilter oninspection_date; whensinceis omitted the run covers the last 30 days. - Filters:
borough,cuisineandgrade(A, B or C) narrow the query and are applied against the source. Whengradeis set, rows without a grade are not returned. - Normalization: scores and coordinates become numbers, dates become
YYYY-MM-DD, and missing or placeholder values becomenull(for example the1900-01-01placeholder and0/0coordinates). - Deduplication: the key is
camis+inspection_date+violation_code, applied inside a run and across monitor runs. - Mode:
fullreturns every matching row;monitorstores delivered keys in the Actor key-value store and emits only rows never delivered before for the same borough, cuisine and grade scope. - Validation: every item is checked against
.actor/dataset_schema.jsonbefore it reaches the dataset; withstrictSchematrue (the default) an invalid item fails the run. - Privacy: establishment data only. The source
phonecolumn is never selected and no phone, email, officer or other personal contact field is published.
How to use
- Open the Actor in the Apify Console or the CLI and set the filters you need (
since,borough,cuisine,grade,maxResults,mode). - Run it with the default example input to pull a small, recent slice of inspections.
- To watch for new rows over time, set
modetomonitorand schedule the run; already delivered keys are skipped. - Read results from the dataset, the
overviewview, or through the API.
Run the shipped example input from the CLI:
$apify call steadfetch/nyc-restaurant-inspections-extractor --input='{"since":"2026-09-01","maxResults":10}'
Input
Input fields
| Field | Type | Required | Default/Prefill | Description | Example |
|---|---|---|---|---|---|
since | string | No | none (last 30 days) | Optional ISO date (YYYY-MM-DD). Only rows with inspection_date on or after this date are returned. | 2026-09-01 |
until | string | No | none | Optional ISO date (YYYY-MM-DD). Only rows with inspection_date on or before this date are returned. | 2026-10-20 |
borough | string | No | none | Optional NYC borough, case-insensitive: Manhattan, Brooklyn, Queens, Bronx or Staten Island. | Manhattan |
cuisine | string | No | none | Optional cuisine description as published by DOHMH, case-insensitive (for example American, Pizza, Chinese). | Pizza |
grade | string | No | none | Optional inspection grade, one of A, B, C. Rows without a grade are not returned when set. | A |
maxResults | integer | No | 100 | Maximum number of inspection rows to save (minimum 1, maximum 5000). | 10 |
mode | string | No | full | full returns every matching row; monitor returns only rows never emitted before in the same borough, cuisine and grade scope. | monitor |
strictSchema | boolean | No | true | Fail the run when an item does not match the output schema. | true |
Example input
{"since": "2026-09-01","maxResults": 10}
A wider, filtered monitor run using other documented fields:
{"since": "2026-09-01","borough": "Manhattan","cuisine": "Pizza","grade": "A","maxResults": 50,"mode": "monitor"}
Output
Example output
{"url": "https://data.cityofnewyork.us/resource/43nn-pn8j.json?camis=50193639","title": "GENESIS HOUSE RESTAURANT","scrapedAt": "2026-10-20T08:00:00.000Z","camis": "50193639","business_name": "GENESIS HOUSE RESTAURANT","borough": "Manhattan","building": "123","street": "W 45 ST","zipcode": "10036","cuisine_description": "American","inspection_date": "2026-09-15","action": "Violations were cited in the following area(s).","violation_code": "10F","violation_description": "Non-food contact surface improperly constructed","critical_flag": "Not Critical","score": 12,"grade": "A","grade_date": "2026-09-20","latitude": 40.759,"longitude": -73.989,"source_url": "https://data.cityofnewyork.us/resource/43nn-pn8j.json?camis=50193639"}
Output fields
| Field | Type | Description |
|---|---|---|
url | string | Public NYC Open Data API URL for this establishment (camis filter). |
title | string or null | Business name, mirrored for the common Steadfetch envelope. |
scrapedAt | string | ISO 8601 UTC timestamp of the run. |
camis | string | Unique establishment identifier used by DOHMH. |
business_name | string | Establishment business name as published by DOHMH. |
borough | string or null | NYC borough. |
building | string or null | Building / street number. |
street | string or null | Street name. |
zipcode | string or null | ZIP code. |
cuisine_description | string or null | DOHMH cuisine label. |
inspection_date | string | Inspection date (YYYY-MM-DD). The placeholder 1900-01-01 is never emitted. |
action | string or null | Inspection action text. |
violation_code | string or null | Violation code. |
violation_description | string or null | Violation description. |
critical_flag | string or null | Violation criticality flag. |
score | number or null | Inspection score as published. Higher is worse. |
grade | string or null | Letter grade as published. |
grade_date | string or null | Date the grade was assigned (YYYY-MM-DD). Placeholder 1900-01-01 dates are emitted as null. |
latitude | number or null | WGS84 latitude. Null when the source reports no valid coordinate. |
longitude | number or null | WGS84 longitude. Null when the source reports no valid coordinate. |
source_url | string | Public NYC Open Data API URL for this establishment. |
Pricing
This Actor uses Apify pay-per-event pricing with the two synthetic platform events from .actor/pay_per_event.json:
apify-actor-start: 0.00005 USD per run. This is the Apify-recommended default and it includes the first 5 seconds of compute per run.apify-default-dataset-item: 0.003 USD per row, that is 3.00 USD per 1,000 results. Measured cost: a 1,000-row run takes about 4.0 seconds at the 256 MB minimum memory on one free Socrata request (about 0.00006 USD of compute per 1,000 rows), well under the 0.10 USD target and leaving a gross margin above 99%.
There is no custom per-item event, so a saved row is never double-billed. Items that fail schema validation and runs that return nothing are not billed as dataset items.
Works on the Apify free plan - about 1,666 inspection rows for the $5 monthly credit ((5.00 USD - 0.0002 USD run-start at the default 4 GB memory) / 0.003 USD per row).
Other Steadfetch Actors
- UK Food Hygiene Ratings - comparable hygiene scores when you track food-safety compliance across markets.
- FDA Recall Monitor - food and drug recalls that overlap with inspected establishments' supply chains.
- CPSC Recall Monitor - consumer product safety recalls to pair with venue-level compliance alerts.
- Federal Register Monitor - US regulatory filings that set the rules behind this inspection data.
FAQ
Do I need an API key or login?
No. The NYC Open Data Socrata endpoint is public and keyless. An optional SOCRATA_APP_TOKEN Actor secret can raise Socrata rate limits; it is never part of the input and is never logged.
Does it use a browser? No. The source is a JSON API, so plain HTTP is used instead of rendering the web front end.
Does it return personal data?
No. Only establishment fields are returned. The source phone column is not selected and no contact field (phone, email, officer) is published.
When am I charged?
Once per run start (apify-actor-start) and once per inspection row saved to the dataset (apify-default-dataset-item). Errors, retries, duplicates and the 1900-01-01 placeholder are not billed as results.
How does monitor mode avoid charging twice?
It stores the dedup keys it delivered in the Actor key-value store. On the next run with the same borough, cuisine and grade scope it skips those keys before pushing, so they are not billed again. Use mode full to re-pull the whole window each run.
What are the limits?
maxResults defaults to 100 and can be set up to 5000. When grade is set, only graded rows are returned.
Support
Report bugs through the Issues tab on this Actor's Apify Store page or through the steadfetch actors repository issues. Please include the run ID and the input you used so the run can be reproduced.
Maintenance
Target: tested daily. The Actor is registered for the Steadfetch daily catalog QA (enablement pending as of 2026-10-22); tests run in CI on every push. When the scheduled runs are enabled they check that the NYC Open Data API is reachable and that the output still matches the published schema. Failures are reported as issues in the Steadfetch Actors repository.