Query the Socrata SODA API resource tvy3-wexg (Health Inspection Scores, 2024-present) filtering by dba (doing-business-as name) or permit_number to locate the facility
Review facility_rating_status (e.g., Pass, Conditional Pass) and inspection_date for the most recent inspection
If facility_rating_status indicates issues, pull violation_count and violation_codes for the specific deficiencies cited
Cross-reference permit_type to confirm the facility category matches what you expect (e.g., restaurant vs. take-out vs. other food facility types)
Re-query periodically since this dataset is updated monthly and only covers 2024-present records
Known gotchas
REGULATED: this is SF Department of Public Health inspection data; a 'Conditional Pass' or open violations should be treated as a real compliance signal, not just a data quirk
This dataset only covers 2024 onward - older inspection history lives in a separate 'Health Inspection Scores (2016-2019)' dataset with a different resource ID
violation_codes is a single unstructured string listing multiple code/description pairs - parsing requires splitting on the numeric code patterns rather than treating it as one clean field
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?