# Norway Restaurant Hygiene Inspections (Mattilsynet Smilefjes) (`andreaajohansen/norway-restaurant-hygiene`) Actor

Get official Norwegian restaurant food-safety inspection results (smilefjes) from Mattilsynet open data. Filter by city, postcode, municipality, org number or grade. No login.

- **URL**: https://apify.com/andreaajohansen/norway-restaurant-hygiene.md
- **Developed by:** [Andre Aa Johansen](https://apify.com/andreaajohansen) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Norway Restaurant Hygiene Inspections (Mattilsynet Smilefjes)

Get official food-safety inspection results for Norwegian restaurants, cafés, bars and other places that serve food. The results come from the **smilefjes** (smiley) scheme run by Mattilsynet, the Norwegian Food Safety Authority. This Actor reads Mattilsynet's own daily open-data CSV. There is no login, no API key, and the inspection data is not scraped from HTML.

Every place in Norway that serves food to eat on the premises is covered by the smilefjes scheme. After each inspection the restaurant must display a poster with a smiling face, a straight mouth or a sad face. This dataset is the same information as that poster, for about 8,700 places and 45,000 inspections since 2016.

This tool is an independent product. It is **not affiliated with, endorsed by, or maintained by Mattilsynet**.

### What data you get

Each dataset row is a clean JSON object with English field names and typed values (numbers, booleans, ISO dates), plus `smilefjesUrl`, `sourceUrl` and `fetchedAt`.

- **Restaurant**: name, 9-digit organisation number, address, postcode, post town, plus municipality name and number and county derived from the postcode.
- **Inspection**: date, case reference, visit type (ordinary or follow-up), total grade 0–3, an English grade label, the smiley (`smiling`, `straight`, `sad`) and a `hasViolationsRequiringFollowUp` flag.
- **Theme grades**: routines and management, premises and equipment, food handling and preparation, labelling and traceability.
- **History** (optional, on by default): a compact list of the restaurant's earlier inspections with date and grade.
- **Requirement points** (optional): the individual checks in the inspection, for example hand washing, cold chain, allergen labelling or pest control, each with an `ok` / `violation` / `notAssessed` status and Mattilsynet's Norwegian result text.
- **Link** to the restaurant's public page on smilefjes.mattilsynet.no.

Grades: **0** no violations, **1** minor violations with no follow-up needed (both give a smiling face), **2** violations that need follow-up (straight mouth), **3** serious violations (sad face).

### How to use it

Open the Input tab and set any filters you need:

- **City / post town**, **postcode** or **municipality**: for example `Oslo`, `0150` (or `01` as a prefix), `Bærum` or `3201`. Separate several values with commas.
- **Organisation number**: the 9-digit Enhetsregisteret number of the operator, useful for chains.
- **Restaurant name contains**: for example `sushi` or `burger king`.
- **Minimum / maximum grade**: set minimum grade `2` to find places that did not get a smiling face.
- **Inspection date from / to**: limit to a period, for example the last 12 months.
- **Only latest inspection per restaurant** (default on): one row per place with its current result. Turn it off to get every inspection, including follow-ups.
- **Include requirement points**: adds the detailed checklist. This is slower, so keep **Maximum results** modest when you use it.
- **Maximum results**: defaults to 100. Newest inspections come first.

Press Start with the prefilled input (Oslo, 25 results) and you get rows in a few seconds. Export the dataset as JSON, CSV or Excel, or pull it through the Apify API.

### Example output

```json
{
  "restaurantId": "Z2311281150229771035KEMGM",
  "name": "Sushi og Thai Ensjø",
  "orgNumber": "931725300",
  "addressLine1": "Gladengveien 7",
  "postcode": "0661",
  "city": "Oslo",
  "municipalityNumber": "0301",
  "municipalityName": "Oslo",
  "countyName": "Oslo",
  "inspectionId": "Z2611171906372660240UOPAJ",
  "inspectionDate": "2026-11-17",
  "visitType": "ordinary",
  "isFollowUp": false,
  "grade": 1,
  "gradeLabel": "Minor violations, no follow-up required",
  "smiley": "smiling",
  "hasViolationsRequiringFollowUp": false,
  "routinesAndManagementGrade": 1,
  "premisesAndEquipmentGrade": 1,
  "foodHandlingAndPreparationGrade": 1,
  "labellingAndTraceabilityGrade": 0,
  "inspectionCount": 2,
  "inspectionHistory": [
    { "date": "2026-11-17", "grade": 1, "visitType": "ordinary" },
    { "date": "2024-01-24", "grade": 0, "visitType": "ordinary" }
  ],
  "smilefjesUrl": "https://smilefjes.mattilsynet.no/spisested/oslo/sushi_og_thai_ensjo.Z2311281150229771035KEMGM/",
  "source": "Mattilsynet (smilefjes open data, CC BY 4.0)",
  "fetchedAt": "2026-11-20T08:07:55.000Z"
}
```

With **Include requirement points** on, each row also gets `requirementPoints`, `violationCount` and `inspectionSummaryNo`, for example:

```json
{ "themeEn": "Premises and equipment", "nameNo": "Generelt, planløsning, standard og vedlikehold", "nameEn": "General layout, standard and maintenance", "status": "violation", "serious": false, "resultTextNo": "Mangler ved hygienisk standard på lokaler, innredning eller utstyr." }
```

### Who it is for

- **Suppliers to the restaurant trade** (cleaning, pest control, hygiene training, kitchen equipment, food-safety software) looking for places that just received a straight mouth or a sad face.
- **Food-delivery, booking and review platforms** that want to show the official hygiene result next to each listing.
- **Journalists and researchers** tracking food-safety trends by city, municipality or chain.
- **Franchise and chain managers** monitoring every outlet under their organisation numbers.
- **Investors and landlords** checking a restaurant operator before signing.

Schedule the Actor daily or weekly with a date filter to get a feed of new inspections.

### Pricing

This Actor currently has no Actor-specific fee; you only pay for the Apify platform usage of your run. It downloads one CSV file and needs no browser, so a typical run with the default input costs a fraction of a cent. If pricing is added later it will be shown on the Pricing tab of the Actor page before you run it.

### Data source and licence

Source: [Smilefjestilsyn på serveringssteder](https://data.norge.no/datasets/288aa74c-e3d3-492e-9ede-e71503b3bfd9), Mattilsynet, from the daily CSV at `https://smilefjes.mattilsynet.no/api/tilsyn.csv`, licensed under [Creative Commons Attribution 4.0 (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/).

Requirement points come from Mattilsynet's kravpunkter dataset (`https://smilefjes.mattilsynet.no/api/kravpunkter.csv`, [NLOD 2.0](https://data.norge.no/nlod/no/2.0)). When that file is unavailable, the Actor reads the same information from the restaurant's public page on smilefjes.mattilsynet.no, politely and only for the rows you asked for.

Municipality and county names are derived from postcodes using the public [Posten/Bring postcode register](https://www.bring.no/tjenester/adressetjenester/postnummer).

You may reuse the data, including commercially, if you credit Mattilsynet as the source and do not imply that Mattilsynet endorses you or your product.

**Source / Kilde: Mattilsynet (smilefjes.mattilsynet.no), CC BY 4.0.**

### FAQ

**Is this official Mattilsynet software?** No. It is an independent Actor that reads Mattilsynet's open data. The poster at the restaurant and smilefjes.mattilsynet.no are the authoritative sources.

**Do I need an API key or login?** No.

**How fresh is the data?** Mattilsynet rebuilds the CSV every night. Each run downloads the current file and stamps `fetchedAt`. Mattilsynet withdraws inspections that are overturned on appeal, so refresh your copy regularly rather than keeping old results forever.

**Why does a restaurant show grade 1 but a smiling face?** That is how the scheme works: grades 0 and 1 both give a smiling face. Grade 2 gives a straight mouth and grade 3 a sad face.

**Why does a requirement point say `ok` when the inspection grade is 1?** The public page groups grade 0 and 1 points as "no violation that needs follow-up", so page-based requirement points only separate `ok` from `violation` (grade 2 or 3). Theme grades in the main row keep the full 0–3 scale.

**Why is the municipality empty for a few rows?** About 100 inspections have no postcode, or the postcode no longer exists in the postcode register. The Actor leaves the field empty rather than guessing.

**Does the dataset contain personal data?** It contains business inspection results only. Some small businesses are sole proprietorships whose trading name includes the owner's name, exactly as Mattilsynet publishes it. You are responsible for using such rows lawfully under GDPR.

**Why do so few restaurants have grade 2 or 3 right now?** A straight mouth or sad face usually triggers a follow-up visit within weeks, and most places then return to a smiling face. With **Only latest inspection per restaurant** on, you see today's posters, so only a few dozen places in all of Norway show grade 2 or 3 at any time. To find every violation event, turn that option off, set minimum grade `2` and pick a date range.

**What if a run returns nothing?** Check the spelling of the city or municipality (Norwegian letters such as ø and å matter), that organisation numbers have nine digits, and that your grade and date filters are not too narrow.

### Disclaimer

Records are provided as published by Mattilsynet, without warranty of completeness or fitness for a particular purpose. Inspection results describe the situation on the day of the inspection. This Actor is not a substitute for Mattilsynet's own publications, and you are responsible for how you use the data and for complying with CC BY 4.0, NLOD and applicable law.

# Actor input Schema

## `city` (type: `string`):

Post town as printed in the address, for example Oslo, Bergen, Trondheim or Tromsø. Case-insensitive exact match. Separate several with commas. Leave empty for all of Norway.

## `postcode` (type: `string`):

4-digit Norwegian postcode, for example 0150. Separate several with commas. A shorter value works as a prefix, so 01 matches 0100–0199.

## `municipality` (type: `string`):

Municipality name (for example Bærum, Tromsø, Lillestrøm) or 4-digit municipality number (for example 3201). Separate several with commas. Derived from the postcode via the Posten/Bring postcode register.

## `orgNumber` (type: `string`):

9-digit Norwegian organisation number (Enhetsregisteret) of the business that runs the restaurant. Separate several with commas.

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

Case-insensitive text that must appear in the restaurant name, for example sushi, burger king or kebab.

## `minGrade` (type: `integer`):

Only keep inspections with a total grade at or above this. 0 = no violations, 1 = minor violations (still a smiling face), 2 = violations requiring follow-up (straight mouth), 3 = serious violations (sad face). Use 2 to find restaurants that did not get a smiling face.

## `maxGrade` (type: `integer`):

Only keep inspections with a total grade at or below this. Use 1 to keep only restaurants with a smiling face.

## `dateFrom` (type: `string`):

Earliest inspection date (inclusive), YYYY-MM-DD. Data starts in 2016.

## `dateTo` (type: `string`):

Latest inspection date (inclusive), YYYY-MM-DD.

## `onlyLatestPerRestaurant` (type: `boolean`):

On (default): one row per restaurant with its most recent inspection inside your date range, which is the result on the door poster today. Grade filters apply to that latest result. Off: one row per inspection, including older and follow-up visits.

## `includeInspectionHistory` (type: `boolean`):

When returning the latest inspection per restaurant, also add a compact list of earlier inspections (date, grade, visit type).

## `includeRequirementPoints` (type: `boolean`):

Add the individual requirement points checked in each returned inspection (for example hand washing, cold chain, allergen labelling) with their result. Slower: uses Mattilsynet's kravpunkter CSV, or the public smilefjes page when the CSV is unavailable.

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

Stop after this many output rows, newest inspections first. Raise it (up to 50,000) for a full extract; Norway has about 8,700 inspected restaurants and 45,000 inspections since 2016.

## Actor input object example

```json
{
  "city": "Oslo",
  "onlyLatestPerRestaurant": true,
  "includeInspectionHistory": true,
  "includeRequirementPoints": false,
  "maxItems": 25
}
```

# Actor output Schema

## `overview` (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 = {
    "city": "Oslo",
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("andreaajohansen/norway-restaurant-hygiene").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 = {
    "city": "Oslo",
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("andreaajohansen/norway-restaurant-hygiene").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 '{
  "city": "Oslo",
  "maxItems": 25
}' |
apify call andreaajohansen/norway-restaurant-hygiene --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,andreaajohansen/norway-restaurant-hygiene"
        }
    }
}
```

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/Aon97NhzUcES3SUGe/builds/vAv73i7bbsLE4pecM/openapi.json
