NYC Restaurant Inspection Scraper avatar

NYC Restaurant Inspection Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
NYC Restaurant Inspection Scraper

NYC Restaurant Inspection Scraper

Scrape the official NYC DOHMH Restaurant Inspection Results open dataset. Search or filter by borough, cuisine, grade, inspection type, critical flag, ZIP code, or date range; look up a restaurant's full inspection history by CAMIS ID. Free public Socrata API, no login required.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Scrape the official NYC Department of Health and Mental Hygiene (DOHMH) Restaurant Inspection Results open dataset. Search or filter New York City restaurant inspections by borough, cuisine, letter grade, inspection type, critical violation flag, ZIP code, or date range — or pull a restaurant's complete inspection history by its CAMIS ID. Powered by the public NYC Open Data (Socrata) API. No login, no API key, no proxy required.

What this actor does

  • Two modes: search (filter/browse) and byCamis (exact restaurant lookup)
  • Rich filters: borough, cuisine, letter grade, critical-violation flag, inspection action/type, ZIP code, inspection date range, score range, restaurant-name keyword
  • Search near a location — filter to restaurants within a radius (in meters) of any latitude/longitude point
  • Full-text search across restaurant and cuisine text fields
  • Every inspection row — one record per cited violation/inspection event, so a single restaurant can appear multiple times across its inspection history
  • Geo + district data — latitude/longitude, community board, council district, census tract, BIN, BBL, NTA
  • Empty fields are omitted — a restaurant with no assigned grade simply has no grade field, never a placeholder

Output per inspection record

  • camis — unique NYC restaurant identifier
  • dba — restaurant name ("doing business as")
  • boro — borough (Manhattan, Brooklyn, Queens, Bronx, Staten Island)
  • address, street, zipcode, phone
  • cuisineDescription
  • inspectionDate, inspectionType, action
  • violationCode, violationDescription, criticalFlag
  • score, grade, gradeDate
  • recordDate — when NYC Open Data last refreshed this row
  • latitude, longitude
  • communityBoard, councilDistrict, censusTract, bin, bbl, nta
  • sourceUrl — link to the restaurant on NYC's public ABC Eats grading lookup
  • recordType: "inspection", scrapedAt

Input

FieldTypeDefaultDescription
modestringsearchsearch (filter/browse) or byCamis (exact lookup)
searchQuerystringFull-text search across restaurant/cuisine text fields (mode=search)
dbaKeywordstringCase-insensitive substring match on restaurant name
camisIdsarrayCAMIS IDs to fetch inspection history for (mode=byCamis)
boroughstringanyManhattan / Brooklyn / Queens / Bronx / Staten Island
cuisineDescriptionstringanyOne of ~90 DOHMH cuisine classifications
gradestringanyA / B / C / Not Yet Graded / Grade Pending (2 variants)
criticalFlagstringanyCritical / Not Critical / Not Applicable
actionTypestringanyInspection outcome/action
inspectionTypestringanyDOHMH inspection program + phase (36 combinations)
inspectionDateFrom / inspectionDateTostringISO date range (YYYY-MM-DD)
zipcodestring5-digit NYC ZIP
minScore / maxScoreintInspection score bounds (0–200; higher = more violation points)
nearLatitude / nearLongitudenumberCenter point for a radius search. Both must be set together to activate the filter.
nearRadiusMetersint500Radius (1–50,000 m) around nearLatitude/nearLongitude. Only applied when both coordinates are set.
sortBystringinspectionDateDescSort order — inspection date, score, restaurant name, borough, ZIP code, or cuisine
appTokenstringOptional free Socrata app token for higher rate limits
maxItemsint50Hard cap on emitted records (1–10000)

Example: browse the latest inspections in Manhattan with a failing grade

{
"mode": "search",
"borough": "Manhattan",
"grade": "C",
"maxItems": 50
}

Example: full inspection history for a specific restaurant

{
"mode": "byCamis",
"camisIds": ["41235305"]
}

Example: critical violations for pizza restaurants in a date range

{
"mode": "search",
"cuisineDescription": "Pizza",
"criticalFlag": "Critical",
"inspectionDateFrom": "2025-01-01",
"inspectionDateTo": "2025-12-31",
"maxItems": 200
}

Example: keyword search for a restaurant chain

{
"mode": "search",
"dbaKeyword": "starbucks",
"maxItems": 100
}

Example: restaurants within 500m of Times Square

{
"mode": "search",
"nearLatitude": 40.758,
"nearLongitude": -73.9855,
"nearRadiusMeters": 500,
"maxItems": 100
}

Use cases

  • Food safety research — track violation trends by cuisine, borough, or time period
  • Consumer apps — surface a restaurant's grade and violation history before a visit
  • Real estate / business intelligence — assess food-service density and compliance by neighborhood
  • Journalism — investigate closures, repeat violators, or grading patterns
  • Academic research — bulk-export inspection data for public health studies

FAQ

What is the data source? The NYC Department of Health and Mental Hygiene's Restaurant Inspection Results dataset, published on NYC Open Data (Socrata, dataset ID 43nn-pn8j) and updated regularly by the city.

Is this affiliated with NYC or DOHMH? No. This is an independent, third-party actor built on NYC's public open-data API.

Why do some records have no grade field? Only certain inspection types receive a letter grade. Ungraded inspections simply omit the field rather than showing a placeholder.

Why does one restaurant appear multiple times? Each row in the source dataset represents one violation cited during one inspection. A single inspection with multiple violations produces multiple rows, and each visit to a restaurant is a separate inspection.

What does the inspection score mean? Lower is better — DOHMH assigns points for each violation, and the cumulative score determines the letter grade (roughly: 0–13 = A, 14–27 = B, 28+ = C).

How fresh is the data? NYC Open Data refreshes this dataset frequently (typically daily). Each record includes a recordDate showing when it was last synced upstream.

Are there rate limits? The Socrata API allows unauthenticated access with reasonable limits. Supplying a free Socrata app token (optional) raises those limits, but the actor works without one.

How does the "search near a location" filter work? Set both nearLatitude and nearLongitude (and optionally nearRadiusMeters, default 500m) to only return inspections within that radius of a point. Setting only one of the two coordinates disables the filter — both are required together. This is combined with all other filters (borough, grade, date range, etc.) using AND.

What fields are NOT included in the output? The source dataset includes four :@computed_region_* columns (internal Socrata IDs mapping each row to a police precinct, community district, borough boundary, and city council district boundary). These are opaque numeric IDs that only resolve to anything meaningful via a separate GIS boundary-file join, so they're excluded — the human-readable communityBoard and councilDistrict fields are included instead.