{
  "openapi": "3.0.1",
  "info": {
    "title": "Denmark Restaurant Inspections: Smiley Food Safety",
    "description": "Danish restaurant and food business inspection results from the Fødevarestyrelsen Smiley food safety scheme: up to four inspections per business, result labels, CVR, P-number, address and industry. Filter by postal code or result, or get only changed units. No API key needed.",
    "version": "0.1",
    "x-build-id": "uMlvvBi60TIy5NA3u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nordicdata~dk-smiley-inspections/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nordicdata-dk-smiley-inspections",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nordicdata~dk-smiley-inspections/runs": {
      "post": {
        "operationId": "runs-sync-nordicdata-dk-smiley-inspections",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nordicdata~dk-smiley-inspections/run-sync": {
      "post": {
        "operationId": "run-sync-nordicdata-dk-smiley-inspections",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Danish postal codes or ranges, for example 8000 or 1000-2999 for central Copenhagen. Leave empty for all of Denmark.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Postal town names as written in the source, for example Aarhus C or Odense M. Case does not matter.",
            "items": {
              "type": "string"
            }
          },
          "smileyIndustries": {
            "title": "Smiley industries",
            "type": "array",
            "description": "The industry groups Fødevarestyrelsen uses on findsmiley.dk. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Restauranter, kantiner, takeaway, værtshuse m.fl.",
                "Dagligvareforretninger",
                "Hospitals- og institutionskøkkener",
                "Transportvirksomheder, engros",
                "Lagre og grossister uden fremstilling",
                "Delikatesseforretninger og takeaway uden servering",
                "Emballagevirksomheder m.fl.",
                "Kontorvirksomheder m.fl.",
                "Bagere og bagerafdelinger",
                "Slagtere og slagterafdelinger",
                "Virksomheder, detailbranche endnu ikke tildelt",
                "Fremstilling af færdigretter m.m.",
                "Keramikere, glaspustere m.fl.",
                "Fiske- og vildtforretninger og fiskeafdelinger",
                "Fremstilling af øl, vand, spiritus m.m.",
                "Fremstilling af fisk og muslinger m.m.",
                "Virksomheder, engrosbranche endnu ikke tildelt",
                "Fremstilling af kødprodukter",
                "Kosttilskud, tilsætningsstoffer og særlig ernæring",
                "Fremstilling af mejeriprodukter",
                "Slagterier",
                "Transportvirksomheder, detail",
                "Kædekontrolhovedkontorer",
                "Slagtebusser",
                "Animalske produkter (ikke kød, mælk, æg, fisk)",
                "Fremstilling af ægprodukter"
              ]
            }
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "retail (detail) sells to consumers and shows smiley faces. wholesale (engros) sells to other businesses.",
            "items": {
              "type": "string",
              "enum": [
                "retail",
                "wholesale"
              ],
              "enumTitles": [
                "Retail (detail)",
                "Wholesale (engros)"
              ]
            }
          },
          "cvrNumbers": {
            "title": "CVR numbers",
            "type": "array",
            "description": "Keep only units owned by these CVR numbers (8 digits). One CVR can own many units.",
            "items": {
              "type": "string"
            }
          },
          "latestResults": {
            "title": "Latest result",
            "type": "array",
            "description": "Keep units whose latest inspection has one of these results.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "none"
              ],
              "enumTitles": [
                "1 No remarks",
                "2 Warning",
                "3 Order, ban or daily fines",
                "4 Fine, police report, quarantine or approval withdrawn",
                "No inspection yet"
              ]
            }
          },
          "inspectedSince": {
            "title": "Latest inspection on or after",
            "type": "string",
            "description": "YYYY-MM-DD. Keep units whose latest inspection is on or after this date."
          },
          "excludeAdvertisingProtected": {
            "title": "Leave out advertising protected units",
            "type": "boolean",
            "description": "Drop units flagged with reklamebeskyttelse. The flag stays in every row either way.",
            "default": false
          },
          "onlyChangedSinceLastRun": {
            "title": "Only units that changed since the last run",
            "type": "boolean",
            "description": "Compare with a snapshot saved by the previous run and output only new, changed and removed units. The first run saves the baseline and outputs nothing. Schedule the actor daily to get new inspections.",
            "default": false
          },
          "snapshotName": {
            "title": "Snapshot name",
            "type": "string",
            "description": "Name of the saved snapshot. Use one name per schedule. Letters, digits, - and _.",
            "default": "default"
          },
          "includeRemoved": {
            "title": "Report removed units",
            "type": "boolean",
            "description": "Add a free row with changeType removed when a unit leaves the file.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. The whole file holds about 59,000 units.",
            "default": 1000
          },
          "sourceFormat": {
            "title": "Source file",
            "enum": [
              "xlsx",
              "xml"
            ],
            "type": "string",
            "description": "Both files hold the same data.",
            "default": "xlsx"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}