{
  "openapi": "3.0.1",
  "info": {
    "title": "France Schools Directory: Schools, Colleges, Lycees (Open Data)",
    "description": "Directory of French schools, collèges, lycées and other education institutions: search by area, type, public/private or name, lookup by UAI, nearby GPS search and counts per department or academy. Official open data, unofficial tool, institution-level data only.",
    "version": "0.1",
    "x-build-id": "FbjXpZGUbNPV404cm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shadow-tools~france-schools-directory/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shadow-tools-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/shadow-tools~france-schools-directory/runs": {
      "post": {
        "operationId": "runs-sync-shadow-tools-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/shadow-tools~france-schools-directory/run-sync": {
      "post": {
        "operationId": "run-sync-shadow-tools-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "lookup",
              "nearby",
              "stats"
            ],
            "type": "string",
            "description": "Pick one. \"search\" = use to list institutions matching filters (department, academy, region, postcode, commune, type, status, name words, features) or the whole of France. \"lookup\" = use when you already know UAI identifiers (7 digits + 1 letter, e.g. \"0750811Z\") and want their records. \"nearby\" = use when you have GPS coordinates (latitude and longitude in decimal degrees) and want institutions within radiusKm, closest first. \"stats\" = use to count institutions (per type, status, department, academy, region or nature with groupBy) for the same filters, without institution details. Allowed values: search, lookup, nearby, stats. Default: search.",
            "default": "search"
          },
          "type": {
            "title": "Institution type",
            "maxItems": 8,
            "type": "array",
            "description": "Types to keep, as a list, e.g. [\"Lycée\", \"Collège\"]. Any of them matches (OR). Exact values: Ecole, Collège, Lycée, EREA, Médico-social, Service Administratif, Information et orientation, Autre. Accents optional (\"college\" works). Empty = all types (about 68,500 institutions in France: 48,000 écoles, 9,200 collèges, 5,600 lycées).",
            "items": {
              "type": "string",
              "enum": [
                "Ecole",
                "Collège",
                "Lycée",
                "EREA",
                "Médico-social",
                "Service Administratif",
                "Information et orientation",
                "Autre"
              ]
            }
          },
          "status": {
            "title": "Public or private",
            "enum": [
              "any",
              "public",
              "private"
            ],
            "type": "string",
            "description": "Keep only public or only private institutions, e.g. \"public\". Allowed values: any (default, no filter), public, private. Institutions with no status in the source are only returned with any.",
            "default": "any"
          },
          "department": {
            "title": "Department",
            "maxItems": 50,
            "type": "array",
            "description": "French department codes or names as a list, e.g. [\"75\", \"2A\"] or [\"Rhône\"]. Codes: two digits (\"69\"), \"2A\"/\"2B\" for Corsica, three digits overseas (\"974\"). Any of them matches (OR). Names must be exact, with accents as in the source (\"Rhône\", \"Côte-d'Or\"). Empty = all of France.",
            "items": {
              "type": "string"
            }
          },
          "academy": {
            "title": "Academy",
            "maxItems": 20,
            "type": "array",
            "description": "School academies (education districts) as a list of names or 2-digit codes, e.g. [\"Lyon\"] or [\"10\"]. Names must be exact (\"Lyon\", \"Aix-Marseille\", \"Orléans-Tours\"). Any of them matches (OR). Empty = all academies.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "maxItems": 20,
            "type": "array",
            "description": "Regions as a list of names or 2-digit codes, e.g. [\"Bretagne\"] or [\"53\"]. Names must be exact, as in the source (\"Ile-de-France\", \"Auvergne-Rhône-Alpes\"). Any of them matches (OR). Empty = all regions.",
            "items": {
              "type": "string"
            }
          },
          "postcode": {
            "title": "Postcode",
            "maxItems": 100,
            "type": "array",
            "description": "5-digit postal codes as a list, e.g. [\"69003\", \"75011\"]. Any of them matches (OR). Empty = no postcode filter.",
            "items": {
              "type": "string"
            }
          },
          "commune": {
            "title": "Commune",
            "maxItems": 50,
            "type": "array",
            "description": "Commune name words as a list, e.g. [\"Lyon\", \"Saint-Étienne\"]. Matches by words, accents and case ignored (\"Paris\" also matches \"Paris 11e Arrondissement\" and \"Le Touquet-Paris-Plage\": add a postcode or department to be precise). Empty = no commune filter.",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "title": "Name contains",
            "type": "string",
            "description": "Words that must appear in the institution name, e.g. \"victor hugo\" or \"jean moulin\" (accents and case ignored, all words must match). Names of institutions only. Empty = no name filter."
          },
          "uai": {
            "title": "UAI identifiers (lookup mode)",
            "maxItems": 500,
            "type": "array",
            "description": "Institution identifiers (UAI, 7 digits + 1 capital letter) as a list, e.g. [\"0750811Z\", \"0690023A\"]. Required in lookup mode (up to 500), ignored otherwise. Unknown identifiers are listed in the run SUMMARY note.",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "title": "Required features",
            "maxItems": 15,
            "type": "array",
            "description": "Characteristics the institution must have, as a list, e.g. [\"canteen\", \"boarding\"]. ALL listed features are required (AND). Allowed values: generalTrack, technologicalTrack, professionalTrack, canteen, boarding, apprenticeship, postBac, ulis, segpa, sectionSport, sectionArts, sectionInternational, sectionEuropean, lyceeDesMetiers, agriculturalLycee. Empty = no feature filter.",
            "items": {
              "type": "string",
              "enum": [
                "generalTrack",
                "technologicalTrack",
                "professionalTrack",
                "canteen",
                "boarding",
                "apprenticeship",
                "postBac",
                "ulis",
                "segpa",
                "sectionSport",
                "sectionArts",
                "sectionInternational",
                "sectionEuropean",
                "lyceeDesMetiers",
                "agriculturalLycee"
              ]
            }
          },
          "latitude": {
            "title": "Latitude (nearby mode)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Latitude of the search centre in decimal degrees, e.g. 45.764 for Lyon. Required in nearby mode, ignored otherwise. Used in memory only: it is not written to the dataset or the run SUMMARY."
          },
          "longitude": {
            "title": "Longitude (nearby mode)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Longitude of the search centre in decimal degrees, e.g. 4.835 for Lyon. Required in nearby mode, ignored otherwise. Used in memory only: it is not written to the dataset or the run SUMMARY."
          },
          "radiusKm": {
            "title": "Radius in km (nearby mode)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Search radius around the point in kilometres, between 0.1 and 100, e.g. 5. Used only in nearby mode. Default: 5.",
            "default": 5
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "name",
              "uai",
              "distance"
            ],
            "type": "string",
            "description": "Order of the institutions, e.g. \"name\". Allowed values: name (alphabetical; default for search), uai (by identifier; default for lookup), distance (closest first, nearby mode only; default there). Ignored in stats mode."
          },
          "groupBy": {
            "title": "Group counts by (stats mode)",
            "enum": [
              "none",
              "type",
              "status",
              "department",
              "academy",
              "region",
              "nature"
            ],
            "type": "string",
            "description": "Only for stats mode: one count record per group, e.g. \"department\" to compare the 100+ departments. Allowed values: none (default, one record with the total), type, status, department, academy, region, nature (detailed category such as COLLEGE or LYCEE PROFESSIONNEL).",
            "default": "none"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of records returned (institutions, or count records), an integer between 1 and 10000, e.g. 20. Default: 20.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}