# Boston Restaurant Inspections Scraper — Health Violations (`groundplanes/boston-food-establishment-inspections`) Actor

Scrape City of Boston restaurant and food establishment inspections (ISD Health Division) via the official data.boston.gov API: every cited violation with severity, status and inspector comments, result, license and address. Filter by date, neighborhood, ZIP, name, result. Export CSV, Excel, JSON.

- **URL**: https://apify.com/groundplanes/boston-food-establishment-inspections.md
- **Developed by:** [John](https://apify.com/groundplanes) (community)
- **Categories:** Lead generation, Business, Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 result rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

The **Boston restaurant inspections scraper** gives you one row per cited violation (or, with onePerInspection, one row per inspection) for **Boston, Massachusetts**, straight from the **City of Boston Inspectional Services Department (Health Division)** via the official data.boston.gov open-data API. No login or coding needed: run it in your browser, on a schedule, or through the Apify API, and export results as **JSON, CSV or Excel**.

Get **City of Boston** restaurant and food establishment health inspections as a clean, filterable list: every cited violation with its severity (Priority, Priority Foundation, Core), Pass/Fail status and the inspector's comments, plus the inspection result, business name, owner, food license, address, neighborhood and coordinates. Data comes from the **Inspectional Services Department (ISD) Health Division** through the official open-data API ([data.boston.gov dataset "Food Establishment Inspections"](https://data.boston.gov/dataset/food-establishment-inspections)). The portal marks the dataset as updated **daily** (last refresh at build time: 2026-10-18; newest inspection 2026-10-16).

### What you get

By default each row is **one cited violation (or one no-violation line) from one inspection, as published by the City of Boston** (~905,000 rows since 2006; about 3.8 rows per inspection). The source has no inspection ID, so rows carry a derived `inspectionKey` (license number + inspection time). Set `onePerInspection: true` to get **one row per inspection** with all of its violations in a `violations` list and counts by severity. Rows are sorted **newest inspection first**, then license number, with an `_id` tiebreak, so a single run does not skip or repeat rows. The city reloads the dataset daily (around 8:40 AM MST) and reassigns `_id`, so a run that spans the reload, or paging across separate runs, can shift slightly.

#### Sample output (real run, default mode)

```json
{
  "inspectionKey": "125889-20261016184132",
  "businessName": "Caffe Bene",
  "dbaName": null,
  "legalOwner": null,
  "licenseeLastName": "Chen & Chen Brothers Inc.",
  "licenseeFirstName": null,
  "licenseNumber": "125889",
  "licenseStatus": "Active",
  "licenseCategoryCode": "FS",
  "licenseCategory": "Eating & Drinking",
  "licenseIssuedDate": "2014-08-14",
  "licenseExpiresDate": "2026-12-31",
  "result": "HE_Pass",
  "inspectionDate": "2026-10-16",
  "inspectionDateTimeUtc": "2026-10-16T18:41:32Z",
  "violationCode": "590.003/3-304.14-C",
  "violationLevel": "*",
  "violationSeverity": "Core",
  "violationDescription": "Wiping Cloths Use Limitation (C)",
  "violationStatus": "Pass",
  "violationStatusDate": "2026-10-16",
  "inspectorComments": "Wiping cloths not stored in a sanitizing solution",
  "address": "333 MASSACHUSETTS AV",
  "neighborhood": "BOSTON",
  "state": "MA",
  "zip": "02115",
  "propertyId": "271270",
  "latitude": 42.34223999989077,
  "longitude": -71.08468000154136,
  "dataSource": "City of Boston Inspectional Services (Health Division) via data.boston.gov"
}
```

### Use cases

- **Food-safety, pest-control, cleaning and equipment vendors:** restaurants with recent Priority violations, e.g. `violationLevels: ["Priority"]`, `violationContains: ["pests", "mice"]`, `onePerInspection: true`.
- **Restaurant suppliers, POS and insurance sales:** active Boston food licenses by neighborhood and category.
- **Journalists and researchers:** violation trends by neighborhood, category or code.

### How to scrape Boston restaurant inspections

1. Click **Try for free** (or **Start**) on this page. A free Apify account is enough.
2. Leave the prefilled input to get a quick sample, or set the filters described below.
3. Set **maxItems** to cap how many rows (and how much) a run returns.
4. Click **Start** and wait a few seconds to a minute.
5. Download the results as JSON, CSV or Excel, or connect them to Google Sheets, Zapier, Make or a webhook.

### Input

| Field | Description |
|---|---|
| inspectedSince | Optional real date, YYYY-MM-DD (Boston local date). Invalid dates fail fast with a clear message. Empty = all, newest first |
| nameContains | Business, DBA, legal owner or licensee name (partial) |
| neighborhoods | `Boston`, `Dorchester`, `Roxbury`, `East Boston`, `Allston`, `Brighton`, `South Boston`, `Charlestown`, `Jamaica Plain`, ... (exact, case-insensitive) |
| zipCodes | e.g. `02115` (matches the first 5 characters; 4-digit source ZIPs like `2127` are zero-padded, and ZIP+4 values match) |
| results | Result code with or without `HE_`: `Fail`, `Pass`, `FailExt`, `Filed`, `Hearing`, `VolClos`, `NotReq`, `OutBus`, `TSOP`, `FAILNOR`, `Misc`; also matches the raw legacy values `Pass`, `Fail`, `Failed`, `PassViol`, `DATAERR` |
| licenseCategories | `FS` Eating & Drinking, `FT` Eating & Drinking w/ Take Out, `RF` Retail Food, `MFW` Mobile Food Walk On |
| violationLevels | `Priority` (\*\*\*), `Priority Foundation` (\*\*), `Core` (\*) |
| violationContains | Text in the violation description, inspector comments or code |
| violationsOnly | Default false. On drops rows with no violation code (~5% of 2026 rows) |
| onePerInspection | Default false. On = one row per inspection with a `violations` list |
| dedupeRows | Default true. Drops ~410 exact duplicate violation rows in the source (all from 2018 or earlier) |
| maxItems | Default 200 (rows, or inspections when onePerInspection is on) |

With `onePerInspection` on, the violation filters (`violationLevels`, `violationContains`, `violationsOnly`) select **inspections that have at least one matching violation**, and the row lists **all** violations of that inspection.

### Pricing (pay per event)

$3 per 1,000 rows ($0.003 each) plus Apify's minimal $0.00005 start fee. **Example:** 200 violation rows = 200 × $0.003 + $0.00005 ≈ **$0.60**; one month of rows (~3,000) ≈ $9, or the same month as ~1,000 inspections with `onePerInspection` ≈ $3. If a run hits your max charge limit, it stops cleanly and reports how many rows it delivered.

### Data caveats

Data is provided **as published by the City of Boston**. The portal calls this a "legacy dataset", but it is still refreshed daily. Timestamps are published in UTC; `inspectionDate`, `violationStatusDate` and the license dates are converted to the Boston local date (`inspectionDateTimeUtc` keeps the original time). `violationSeverity` is derived from the published level (\* Core, \*\* Priority Foundation, \*\*\* Priority, matching the (C)/(Pf)/(P) suffix in the description). Result codes are passed through unchanged (`HE_Pass`, `HE_Fail`, `HE_FailExt`, ...); an inspection marked `HE_Pass` can still list violations, each with its own Pass/Fail status. The source `city` field holds the neighborhood mailing name (`BOSTON` covers downtown, Back Bay, Fenway, North End, ...); a trailing `/` is removed. Coordinates outside Boston (or missing, ~5% of 2026 rows) are `null`. The licensee name fields are published inconsistently (sometimes a person, sometimes a company). About 0.7% of rows have no inspection date and sort last; with `onePerInspection` they are grouped by license + violation time (`inspectionKey` ends in `-nodate-<violation time>`). `HE_NotReq` rows (~24,000) are mostly administrative stamps rather than real inspections (only ~600 list a violation); exclude them with `results` if you only want inspections. A few older rows carry legacy result values without the `HE_` prefix (`Pass`, `Fail`, `Failed`, `PassViol`, `DATAERR`). A violation is an inspection finding; check `violationStatus` and later inspections for whether it was corrected.

### License and disclaimer

Source: City of Boston, Analyze Boston open data portal (data.boston.gov), Open Data Commons Public Domain Dedication and License (PDDL). This actor uses only the official public open-data API and is **not affiliated with or endorsed by** the City of Boston.

### FAQ

#### How much does it cost to scrape Boston restaurant inspections?

You pay $0.003 per result ($3 per 1,000) plus a $0.00005 start fee, and nothing else. That is the free-plan price: on paid Apify plans you pay less per result (Bronze 10%, Silver 20%, Gold and above 30% off). Apify's free plan includes $5 of monthly credit, which covers about 1,600 results. See **Pricing** above for a worked example.

#### Is it legal to scrape Boston restaurant inspections?

This Actor reads public records from the **City of Boston Inspectional Services Department (Health Division)** via the official data.boston.gov open-data API, using only public endpoints (no login, no CAPTCHA bypass, no private accounts). See the source/license section above for the dataset's terms. You are responsible for how you use the data; this is not legal advice.

#### How fresh is the data?

Each run reads the source live, so you get whatever the agency has published at that moment. How often the agency updates, and any known lag, is described in the data caveats/notes section above.

#### Can I use it via API, on a schedule, or with Google Sheets?

Yes. Every Apify Actor has a REST API and client libraries for Python and JavaScript. You can schedule daily or weekly runs, and send results to Google Sheets, Slack, Zapier, Make, n8n, webhooks, or an AI agent via the Apify MCP server.

#### I need another city, county or field. Can you add it?

Open an issue on the **Issues** tab with the city or data source you need. We build new public-records scrapers regularly.

### More public-records scrapers by Groundplanes

Same clean output, pay-per-result pricing and official public data sources:

#### Restaurant & food inspections

- [Maricopa County (Phoenix) Restaurant Inspections Scraper](https://apify.com/groundplanes/maricopa-restaurant-inspections)
- [Las Vegas Restaurant Inspections & Grades Scraper (SNHD)](https://apify.com/groundplanes/las-vegas-restaurant-inspections)
- [Pittsburgh Restaurant Inspections Scraper (Allegheny County)](https://apify.com/groundplanes/allegheny-restaurant-inspections)
- [Delaware Restaurant Inspections Scraper — Statewide Violations](https://apify.com/groundplanes/delaware-restaurant-inspections)
- [Boulder CO Restaurant Inspections Scraper — 2013–2026 Snapshot](https://apify.com/groundplanes/boulder-county-restaurant-inspections)
- [Montgomery County MD Restaurant & Food Inspections Scraper](https://apify.com/groundplanes/montgomery-md-food-inspections)
- [NY State Restaurant Inspections Scraper — NYSDOH, Non-NYC](https://apify.com/groundplanes/ny-state-food-service-inspections)
- [Santa Clara County Restaurant Inspections Scraper — San Jose](https://apify.com/groundplanes/santa-clara-county-restaurant-inspections)

#### Code violations & distressed property leads

- [Pittsburgh Code Violations Scraper — Distressed Property Leads](https://apify.com/groundplanes/pittsburgh-code-violations)
- [Orlando FL Code Enforcement Scraper — Code Violation Leads](https://apify.com/groundplanes/orlando-code-enforcement-cases)
- [New Orleans Code Violations Scraper — Code Enforcement Leads](https://apify.com/groundplanes/nola-code-enforcement-violations)

#### Business licenses & new business leads

- [Delaware Business Licenses Scraper — New Business Leads](https://apify.com/groundplanes/delaware-business-licenses)
- [Norfolk VA Business Licenses Scraper — New Business Leads](https://apify.com/groundplanes/norfolk-va-business-licenses)
- [Berkeley CA Business Licenses Scraper — Local B2B Leads](https://apify.com/groundplanes/berkeley-ca-business-licenses)
- [New Orleans Business Licenses Scraper — New Business Leads](https://apify.com/groundplanes/nola-occupational-business-licenses)

# Actor input Schema

## `inspectedSince` (type: `string`):

Optional real date, YYYY-MM-DD (Boston local date). Keeps inspections on or after this date. Empty = all ~905,000 rows since 2006, newest first (the last 30 days usually hold ~3,000 violation rows from ~1,000 inspections).

## `nameContains` (type: `string`):

Case-insensitive text matched against the business name, DBA name, legal owner and licensee name, e.g. Dunkin, Pizza, Chen.

## `neighborhoods` (type: `array`):

Neighborhood as published in the address 'city' field: Boston, Dorchester, Roxbury, East Boston, Allston, Brighton, South Boston, Charlestown, Jamaica Plain, Roslindale, Mission Hill, Hyde Park, Mattapan, West Roxbury. Case-insensitive, exact (a trailing '/' in the source is ignored). Empty = all. 'Boston' alone is about 53% of recent rows (downtown, Back Bay, Fenway, North End, ...).

## `zipCodes` (type: `array`):

5-digit ZIP codes, e.g. 02115, 02128. Matches the first 5 characters; 4-digit source ZIPs (e.g. 2127) are zero-padded. Empty = all.

## `results` (type: `array`):

Result code as published (HE\_ prefix optional): Fail, Pass, FailExt, Filed, Hearing, VolClos, NotReq, OutBus, TSOP, FAILNOR, Misc. Also matches raw legacy values (Pass, Fail, Failed, PassViol, DATAERR). Case-insensitive, exact. Empty = all. 2026 rows: Fail 42%, Pass 31%, FailExt 18%, Filed 4%, Hearing 3%, others under 2% each.

## `licenseCategories` (type: `array`):

FS (Eating & Drinking), FT (Eating & Drinking w/ Take Out), RF (Retail Food), MFW (Mobile Food Walk On); code or name. Empty = all. 2026 rows: FS 55%, FT 35%, RF 8%, MFW 1%.

## `violationLevels` (type: `array`):

Priority (***), Priority Foundation (**), Core (*); name, short code (P, Pf, C) or stars. Empty = all. Rows without a violation code (about 5% of 2026 rows) are dropped when this is set. With onePerInspection on, keeps inspections that have at least one matching violation.

## `violationContains` (type: `array`):

Case-insensitive text matched against the violation description, inspector comments and code, e.g. pests, mice, temperature, handwashing, 3-501. With onePerInspection on, keeps inspections that have at least one matching violation.

## `violationsOnly` (type: `boolean`):

Drops rows that carry no violation code (inspections recorded with no violation line, about 5% of 2026 rows). With onePerInspection on, keeps only inspections with at least one cited violation.

## `onePerInspection` (type: `boolean`):

The source has one row per cited violation (about 3 per inspection). On = one row per inspection (license + inspection time) with all its violations in a `violations` list plus counts by severity.

## `dedupeRows` (type: `boolean`):

The source contains ~410 exact duplicate violation rows (371 groups with the same inspection, code, comments, status and times; all from 2018 or earlier, ~0.05%). On = keep one copy.

## `maxItems` (type: `integer`):

Maximum rows to return (newest inspection first). With onePerInspection on, this counts inspections.

## Actor input object example

```json
{
  "violationsOnly": false,
  "onePerInspection": true,
  "dedupeRows": true,
  "maxItems": 200
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "onePerInspection": true,
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/boston-food-establishment-inspections").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "onePerInspection": True,
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/boston-food-establishment-inspections").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "onePerInspection": true,
  "maxItems": 200
}' |
apify call groundplanes/boston-food-establishment-inspections --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/boston-food-establishment-inspections"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AKJyfezE4FOvtTQsK/builds/vVBUjEEJNYndNeem4/openapi.json
