{
  "openapi": "3.0.1",
  "info": {
    "title": "France Schools Directory",
    "description": "Official directory of French schools: primary, middle and high schools with address, phone, institutional email, website, SIRET, public or private status, boarding, sections and GPS. Filter by department, town or academy. Monitor new or changed schools. Unofficial.",
    "version": "0.1",
    "x-build-id": "ZKiIfrWEaVDetVCgg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/euroscrape~france-schools-directory/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-euroscrape-france-schools-directory",
        "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/euroscrape~france-schools-directory/runs": {
      "post": {
        "operationId": "runs-sync-euroscrape-france-schools-directory",
        "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/euroscrape~france-schools-directory/run-sync": {
      "post": {
        "operationId": "run-sync-euroscrape-france-schools-directory",
        "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": {
          "locations": {
            "title": "📍 Departments, post codes or towns",
            "type": "array",
            "description": "French department codes (\"69\", \"2A\", \"971\"), post codes (\"69003\") or town names (\"Annecy\"). Any of them matches. Leave empty for all France.",
            "items": {
              "type": "string"
            }
          },
          "academies": {
            "title": "🏛️ Academies",
            "type": "array",
            "description": "School districts (académies). Combined with the locations above (both must match). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Aix-Marseille",
                "Amiens",
                "Besançon",
                "Bordeaux",
                "Clermont-Ferrand",
                "Corse",
                "Créteil",
                "Dijon",
                "Grenoble",
                "Guadeloupe",
                "Guyane",
                "La Réunion",
                "Lille",
                "Limoges",
                "Lyon",
                "Martinique",
                "Mayotte",
                "Montpellier",
                "Nancy-Metz",
                "Nantes",
                "Nice",
                "Normandie",
                "Nouvelle Calédonie",
                "Orléans-Tours",
                "Paris",
                "Poitiers",
                "Polynésie Française",
                "Reims",
                "Rennes",
                "Saint Pierre et Miquelon",
                "Strasbourg",
                "Toulouse",
                "Versailles",
                "Wallis et Futuna"
              ],
              "enumTitles": [
                "Aix-Marseille",
                "Amiens",
                "Besançon",
                "Bordeaux",
                "Clermont-Ferrand",
                "Corse",
                "Créteil",
                "Dijon",
                "Grenoble",
                "Guadeloupe",
                "Guyane",
                "La Réunion",
                "Lille",
                "Limoges",
                "Lyon",
                "Martinique",
                "Mayotte",
                "Montpellier",
                "Nancy-Metz",
                "Nantes",
                "Nice",
                "Normandie",
                "Nouvelle Calédonie",
                "Orléans-Tours",
                "Paris",
                "Poitiers",
                "Polynésie Française",
                "Reims",
                "Rennes",
                "Saint Pierre et Miquelon",
                "Strasbourg",
                "Toulouse",
                "Versailles",
                "Wallis et Futuna"
              ]
            }
          },
          "types": {
            "title": "🏫 School types",
            "type": "array",
            "description": "Establishment types to keep. Default: primary, middle and high schools. Empty list = every type.",
            "items": {
              "type": "string",
              "enum": [
                "Ecole",
                "Collège",
                "Lycée",
                "EREA",
                "Médico-social",
                "Information et orientation",
                "Service Administratif",
                "Autre"
              ],
              "enumTitles": [
                "Primary school",
                "Middle school",
                "High school",
                "Adapted secondary school (EREA)",
                "Medico-social institute",
                "Guidance centre",
                "Administrative service",
                "Other"
              ]
            },
            "default": [
              "Ecole",
              "Collège",
              "Lycée"
            ]
          },
          "status": {
            "title": "Public or private",
            "enum": [
              "all",
              "public",
              "private"
            ],
            "type": "string",
            "description": "Keep public schools, private schools, or both.",
            "default": "all"
          },
          "features": {
            "title": "🔎 Required features",
            "type": "array",
            "description": "Keep only schools that have ALL the selected features, as declared in the official directory.",
            "items": {
              "type": "string",
              "enum": [
                "nurserySchool",
                "elementarySchool",
                "canteen",
                "boarding",
                "specialNeedsUnit",
                "adaptedClasses",
                "generalTrack",
                "technologicalTrack",
                "vocationalTrack",
                "postBac",
                "apprenticeship",
                "adultEducation",
                "internationalSection",
                "europeanSection",
                "sportsSection",
                "artsOption",
                "cinemaOption",
                "theatreOption",
                "agricultural",
                "military",
                "tradesLabel",
                "priorityEducation"
              ],
              "enumTitles": [
                "Nursery classes",
                "Elementary classes",
                "Canteen",
                "Boarding",
                "Special needs unit (ULIS)",
                "Adapted classes (SEGPA)",
                "General track",
                "Technological track",
                "Vocational track",
                "Post-baccalaureate courses",
                "Apprenticeship",
                "Adult education (GRETA)",
                "International section",
                "European section",
                "Sports section",
                "Arts option",
                "Cinema option",
                "Theatre option",
                "Agricultural high school",
                "Military high school",
                "\"Lycée des métiers\" label",
                "Priority education (REP / REP+)"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum schools",
            "minimum": 1,
            "maximum": 80000,
            "type": "integer",
            "description": "Stop after this many schools. The first 10 of each run are free.",
            "default": 100
          },
          "monitorName": {
            "title": "🔔 Monitor name",
            "type": "string",
            "description": "Give a name and schedule the run: each run then returns only schools that are new or whose record changed since the previous run with this name."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Token of your Telegram bot, for alerts on new or changed schools."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Chat that receives the alerts."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Discord channel webhook that receives the alerts."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack incoming webhook that receives the alerts."
          },
          "webhookUrl": {
            "title": "Webhook URL (Make, Zapier, n8n…)",
            "type": "string",
            "description": "Receives one POST per run with the new or changed schools: {\"count\": N, \"items\": [...]}."
          },
          "maxNotifications": {
            "title": "Maximum alerts per run",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Upper limit of alert messages sent in one run.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}