{
  "openapi": "3.0.1",
  "info": {
    "title": "France Restaurant Hygiene Ratings & New Openings",
    "description": "Official food hygiene inspection results (Alim'confiance) and new restaurants, bars, bakeries and food trucks from the BODACC: new openings and businesses sold to new owners, by department or city, daily. Get only new ones on a schedule. No login, no API key.",
    "version": "1.0",
    "x-build-id": "9Ze1ecKan7maEF94F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/digital_influx~france-restaurant-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-digital_influx-france-restaurant-leads",
        "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/digital_influx~france-restaurant-leads/runs": {
      "post": {
        "operationId": "runs-sync-digital_influx-france-restaurant-leads",
        "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/digital_influx~france-restaurant-leads/run-sync": {
      "post": {
        "operationId": "run-sync-digital_influx-france-restaurant-leads",
        "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": {
          "mode": {
            "title": "What to get",
            "enum": [
              "both",
              "inspections",
              "new-businesses"
            ],
            "type": "string",
            "description": "Hygiene inspection results (Alim'confiance), new food businesses (BODACC: new openings and businesses sold to a new owner), or both in one run.",
            "default": "both"
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "French departments, as a code (75, 13, 69, 2A, 971) or a name (Paris, Bouches-du-Rhône, Rhône). Empty = all of France.",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Postal codes or their first digits: 75011, 750, 69001. Combined with departments, a row is kept when it is in one of the departments or one of the postal codes.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep only these cities (communes): Paris, Lyon, Marseille, Bordeaux. \"Paris\" also keeps \"Paris 11e Arrondissement\". Give the department too: a city alone searches all of France and takes longer.",
            "items": {
              "type": "string"
            }
          },
          "inspectionCategories": {
            "title": "Inspection categories",
            "type": "array",
            "description": "The kinds of food businesses inspected, as Alim'confiance groups them. Empty = all five.",
            "items": {
              "type": "string",
              "enum": [
                "restaurants",
                "collective-catering",
                "food-trades",
                "supermarkets",
                "farm-producers"
              ],
              "enumTitles": [
                "Restaurants (commercial catering)",
                "Collective catering (canteens, schools, hospitals)",
                "Food trades (bakeries, butchers, cheese and fish shops, caterers)",
                "Supermarkets and general food stores",
                "Farm producers"
              ]
            },
            "default": [
              "restaurants"
            ]
          },
          "results": {
            "title": "Inspection results",
            "type": "array",
            "description": "Keep only these results. Empty = all four.",
            "items": {
              "type": "string",
              "enum": [
                "very-satisfactory",
                "satisfactory",
                "to-improve",
                "urgent-correction"
              ],
              "enumTitles": [
                "Très satisfaisant (very satisfactory)",
                "Satisfaisant (satisfactory)",
                "A améliorer (to improve)",
                "A corriger de manière urgente (urgent correction needed)"
              ]
            }
          },
          "inspectedWithinDays": {
            "title": "Inspected within (days)",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Inspections of the last N days. Alim'confiance publishes one year of inspections, a day after they happen.",
            "default": 30
          },
          "businessTypes": {
            "title": "Types of new food business",
            "type": "array",
            "description": "Read from the activity the founder declared at the trade registry. Empty = all six.",
            "items": {
              "type": "string",
              "enum": [
                "food-truck",
                "fast-food",
                "restaurant",
                "bakery",
                "bar-cafe",
                "caterer"
              ],
              "enumTitles": [
                "Food truck",
                "Fast food, snack, kebab, burger",
                "Restaurant, brasserie, pizzeria",
                "Bakery, pastry, ice cream",
                "Bar, café, tea room",
                "Caterer, ready meals"
              ]
            }
          },
          "includeBusinessSales": {
            "title": "Include businesses sold to a new owner",
            "type": "boolean",
            "description": "Besides new openings, the restaurants, bars and shops bought by a new owner (with the price when it is published). Turn off for new openings only.",
            "default": true
          },
          "publishedWithinDays": {
            "title": "Published within (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Announcements of the last N days in the BODACC, the official journal of company registrations (5 issues a week). Each issue is a file of 3 to 12 MB, so a long window takes longer.",
            "default": 7
          },
          "includePersonNames": {
            "title": "Include names of people",
            "type": "boolean",
            "description": "Off by default: sole traders show only their trade name, and directors and former owners are left out. On: their names as the BODACC publishes them. Personal data: you are responsible for using it lawfully (GDPR, French data protection law).",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Newest first; with both kinds, taken in turns so both show. You also never pay more than the spending limit you set for the run. On the free Apify plan a run saves at most 50 rows.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new rows (for scheduled runs)",
            "type": "boolean",
            "description": "Save only inspections and businesses that earlier runs of this same search did not save. Schedule it daily or weekly to get the new ones. The memory is kept for 400 days in a key-value store named \"digital-influx-france-restaurant-leads\" in your account.",
            "default": false
          },
          "memoryName": {
            "title": "Memory name (optional)",
            "type": "string",
            "description": "By default each search has its own memory. Give a name to share one memory between tasks, or a new name to start over. Letters, digits, dot, dash and underscore."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}