Skip to main content
POST
Given a New York City establishment id (CAMIS) or part of a trade name, return the matching food service establishments with their health inspections from the New York City Department of Health and Mental Hygiene: name, address, borough, ZIP code, cuisine and location, then for each inspection its date, type, score, letter grade with its date, the action taken and the violations cited, each with its code, description and whether it is critical. Give at least one of establishment_id and name; the id takes precedence when both are given. name matches anywhere in the trade name, ignoring case; zipcode narrows either search. Inspections are newest first, at most limit per establishment. The call reads the 200 newest violation rows that match, so a name shared by many establishments may leave out older inspections: add zipcode or use the id; when those rows all fall on one date the call fails as invalid input for the same reason. An establishment not yet inspected has an empty inspections list. Dates are YYYY-MM-DD and a value the source does not give is null. No match is a completed result with an empty establishments list.

Authentication

Requires x402 payment in the payment-signature header.

Request Body

string
The city’s establishment id (CAMIS), for example 40732665; takes precedence over name. establishment_id must be digits.
string
Part of the trade name, matched anywhere in it and ignoring case, for example Katz’s Delicatessen. 2 to 100 characters.
string
Five-digit ZIP code of the establishment. zipcode must be five digits.
integer
Most inspections to return per establishment. From 1 to 20. Defaults to 5.

Response (200 OK)

Top-level envelope: success (boolean) and data (object). All fields below are nested under data.
string
Durable job ID for audit and lookup
string
Job status: completed
string
Always business_health_inspections
object
The answer, described under Result below
object
Where the answer came from and when
string
The public body the data comes from. Always New York City Department of Health and Mental Hygiene.
string
public when the data comes from a public body, commercial otherwise
string
When the lookup was made, as an ISO 8601 UTC time
string
The newest date the city ran its daily extract (record_date, YYYY-MM-DD) among the rows read, or null when no row matched

Result

Nested under data.result.
object[]
The matching establishments, the most recently inspected first, then those not inspected yet; empty when none matches.
string
The city’s establishment id (CAMIS).
string
The trade name. null when the source gives no value.
string
Building number and street. null when the source gives no value.
string
The borough, for example Manhattan. null when the source gives no value.
string
Five-digit ZIP code. null when the source gives no value.
string
The cuisine the city records, for example Sandwiches. null when the source gives no value.
number
Latitude, or null when the city could not place the address.
number
Longitude, or null when the city could not place the address.
object[]
Inspections, newest first (same-day inspections by type), at most limit; empty when the establishment has not been inspected yet.
string
Date of the inspection, YYYY-MM-DD.
string
Program and kind of inspection, for example Cycle Inspection / Initial Inspection. null when the source gives no value.
number
Points for the violations found (lower is better), or null when the inspection was not scored.
string
Letter grade given at this inspection: A, B or C; N not yet graded; Z grade pending; P grade pending on reopening after a closure. Null when none was given. null when the source gives no value.
string
Date of the grade, YYYY-MM-DD, or null.
string
What the city did at the inspection, in its words. null when the source gives no value.
object[]
The violations cited, by code; empty when none was recorded.
string
The violation code the city uses, for example 04N.
string
What the inspector cited, in the city’s words. null when the source gives no value.
boolean
Whether the city flags the violation as critical.
See Pricing for this tool’s price. A wallet (x402) call receives it in the 402 quote before anything is charged; a call paid from prepaid credits is charged when the API accepts the request and answers 200.

Notes

  • Results return inline. The finished job stays available at /v1/requests/{request_id}