{
  "openapi": "3.1.0",
  "info": {
    "title": "NSW government schools, locations and enrolments query API",
    "version": "2026-10-02",
    "summary": "Filter, page and aggregate NSW government schools, locations and enrolments from NSW Department of Education.",
    "description": "The query API returns only the rows you ask for, as JSON, NDJSON or CSV, from the same typed rows as the files. It needs no key. The API allows 60 requests in 10 seconds from one address. Above that it answers 429 for 10 seconds with a `Retry-After` header, a `RateLimit-Policy` header and a JSON body that gives the limit. Every API answer carries the same `RateLimit-Policy`. A client should wait the `Retry-After` seconds, or read the files, which have no limit. Every JSON answer carries the version, licence and attribution. CSV and NDJSON answers carry them in response headers. NSW Department of Education has not endorsed this site. The whole site is described in https://publicdata.au/openapi.json.",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://publicdata.au"
    }
  ],
  "externalDocs": {
    "url": "https://publicdata.au/d/nsw-public-schools/#query"
  },
  "tags": [
    {
      "name": "query"
    }
  ],
  "paths": {
    "/api/v1/datasets/nsw-public-schools/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query NSW government schools, locations and enrolments",
        "operationId": "queryRows_nsw_public_schools",
        "description": "Rows of NSW government schools, locations and enrolments in the newest loaded version, filtered and paged. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "school_code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1001 to 8935."
          },
          {
            "name": "ageid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 6354 to 89907."
          },
          {
            "name": "school_name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "street",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "town_suburb",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "school_email",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "website",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "fax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "latest_year_enrolment_fte",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Full-time equivalent enrolments as reported to the ABS National Schools Statistics Collection, as at August. From 1.0 to 2318.0."
          },
          {
            "name": "indigenous_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of FTE students who identify as Aboriginal or Torres Strait Islander. The Department writes np where the student number is five or fewer; it is null here with a suppressed flag. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "lbote_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of students, by headcount, from a language background other than English, as at March. np where the student number is five or fewer. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "level_of_schooling",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central/Community School, Environmental Education Centre, Infants School, Other School, Primary School, Schools for Specific Purposes, Secondary School.",
            "examples": [
              "eq.Secondary School"
            ]
          },
          {
            "name": "selective_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Fully Selective, Not Selective, Partially Selective.",
            "examples": [
              "eq.Partially Selective"
            ]
          },
          {
            "name": "opportunity_class",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_specialty_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Agricultural, Comprehensive, Distance Education, Intensive English, Junior College, Language, Marine Technology, Performing Arts, Senior College, Sports, Technology, Visual Arts.",
            "examples": [
              "eq.Visual Arts"
            ]
          },
          {
            "name": "school_subtype",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Year 7 to Year 9"
            ]
          },
          {
            "name": "preschool_ind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "distance_education",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: C, N, S.",
            "examples": [
              "eq.S"
            ]
          },
          {
            "name": "intensive_english_centre",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Boys, Coed, Girls.",
            "examples": [
              "eq.Girls"
            ]
          },
          {
            "name": "late_opening_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "date_1st_teacher",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The date the first teacher was on duty, which the Department treats as the date the school opened. From 1849-01-01 to 2026-01-27."
          },
          {
            "name": "lga",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass Valley"
            ]
          },
          {
            "name": "electorate_from_2023",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "electorate_2015_2022",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "fed_electorate_from_2025",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "fed_electorate_2016_2024",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "operational_directorate",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Metropolitan North, Metropolitan South, Metropolitan South and West, Regional North, Regional North and West, Regional South and Connected Communities, Rural North, Rural South and West, Unassigned.",
            "examples": [
              "eq.Unassigned"
            ]
          },
          {
            "name": "principal_network",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass"
            ]
          },
          {
            "name": "operational_directorate_office",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wollongong"
            ]
          },
          {
            "name": "operational_directorate_office_phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: 131 536.",
            "examples": [
              "eq.131 536"
            ]
          },
          {
            "name": "operational_directorate_office_address",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Warilla Education Office, 30 Oldfield Street"
            ]
          },
          {
            "name": "facs_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter New England & Central Coast, Illawarra Shoalhaven & Southern NSW, Mid North Coast & Northern NSW, Murrumbidgee, Far West & Western NSW, South Eastern Sydney, Northern Sydney & Sydney, South Western Sydney, Unknown, Western Sydney & Nepean Blue Mountains.",
            "examples": [
              "eq.Western Sydney & Nepean Blue Mountains"
            ]
          },
          {
            "name": "local_health_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Far West, Hunter New England, Illawarra Shoalhaven, Mid North Coast, Murrumbidgee, Nepean Blue Mountains, Northern NSW, Northern Sydney, South Eastern Sydney, South Western Sydney, Southern NSW, Sydney, Unknown, Western NSW, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "aecg_region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Dharawal, Hunter, Lower North Coast, Lower South Coast, Manning, Metropolitan East, Metropolitan North, Metropolitan South West, Metropolitan West, North Western 1, North Western 2, Riverina 1, Riverina 2, Riverina 3, Upper North Coast, Upper South Coast, Western 1, Western 2, Western 3.",
            "examples": [
              "eq.Western 3"
            ]
          },
          {
            "name": "asgs_remoteness",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Inner Regional Australia, Major Cities of Australia, Outer Regional Australia, Remote Australia, Very Remote Australia.",
            "examples": [
              "eq.Very Remote Australia"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From -37.084209 to -28.16951."
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From 141.43997 to 159.069032."
          },
          {
            "name": "assets_unit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter/Central Coast, North Coast, North Western NSW, Northern Sydney, South Western Sydney, Southern NSW, Sydney, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "sa4",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Sydney - Sutherland"
            ]
          },
          {
            "name": "foei_value",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Family Occupation and Education Index, the Department's school-level index of educational disadvantage. A higher value means more disadvantage. From 0.0 to 277.0."
          },
          {
            "name": "date_extracted",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The night the file was extracted. Fields come from different update cycles, so not every field was refreshed on this date. Values: 2026-10-02.",
            "examples": [
              "eq.2026-10-02"
            ]
          },
          {
            "name": "support_classes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "select",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Fields to return, comma-separated. Every field when absent."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/nsw-public-schools/versions/{version}/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query NSW government schools, locations and enrolments",
        "operationId": "queryRows_nsw_public_schools_version",
        "description": "Rows of NSW government schools, locations and enrolments in one dated version, filtered and paged. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "A dated version loaded for queries, from the versions path. Answers for a dated version never change."
          },
          {
            "name": "school_code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1001 to 8935."
          },
          {
            "name": "ageid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 6354 to 89907."
          },
          {
            "name": "school_name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "street",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "town_suburb",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "school_email",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "website",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "fax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "latest_year_enrolment_fte",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Full-time equivalent enrolments as reported to the ABS National Schools Statistics Collection, as at August. From 1.0 to 2318.0."
          },
          {
            "name": "indigenous_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of FTE students who identify as Aboriginal or Torres Strait Islander. The Department writes np where the student number is five or fewer; it is null here with a suppressed flag. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "lbote_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of students, by headcount, from a language background other than English, as at March. np where the student number is five or fewer. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "level_of_schooling",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central/Community School, Environmental Education Centre, Infants School, Other School, Primary School, Schools for Specific Purposes, Secondary School.",
            "examples": [
              "eq.Secondary School"
            ]
          },
          {
            "name": "selective_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Fully Selective, Not Selective, Partially Selective.",
            "examples": [
              "eq.Partially Selective"
            ]
          },
          {
            "name": "opportunity_class",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_specialty_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Agricultural, Comprehensive, Distance Education, Intensive English, Junior College, Language, Marine Technology, Performing Arts, Senior College, Sports, Technology, Visual Arts.",
            "examples": [
              "eq.Visual Arts"
            ]
          },
          {
            "name": "school_subtype",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Year 7 to Year 9"
            ]
          },
          {
            "name": "preschool_ind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "distance_education",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: C, N, S.",
            "examples": [
              "eq.S"
            ]
          },
          {
            "name": "intensive_english_centre",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Boys, Coed, Girls.",
            "examples": [
              "eq.Girls"
            ]
          },
          {
            "name": "late_opening_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "date_1st_teacher",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The date the first teacher was on duty, which the Department treats as the date the school opened. From 1849-01-01 to 2026-01-27."
          },
          {
            "name": "lga",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass Valley"
            ]
          },
          {
            "name": "electorate_from_2023",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "electorate_2015_2022",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "fed_electorate_from_2025",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "fed_electorate_2016_2024",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "operational_directorate",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Metropolitan North, Metropolitan South, Metropolitan South and West, Regional North, Regional North and West, Regional South and Connected Communities, Rural North, Rural South and West, Unassigned.",
            "examples": [
              "eq.Unassigned"
            ]
          },
          {
            "name": "principal_network",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass"
            ]
          },
          {
            "name": "operational_directorate_office",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wollongong"
            ]
          },
          {
            "name": "operational_directorate_office_phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: 131 536.",
            "examples": [
              "eq.131 536"
            ]
          },
          {
            "name": "operational_directorate_office_address",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Warilla Education Office, 30 Oldfield Street"
            ]
          },
          {
            "name": "facs_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter New England & Central Coast, Illawarra Shoalhaven & Southern NSW, Mid North Coast & Northern NSW, Murrumbidgee, Far West & Western NSW, South Eastern Sydney, Northern Sydney & Sydney, South Western Sydney, Unknown, Western Sydney & Nepean Blue Mountains.",
            "examples": [
              "eq.Western Sydney & Nepean Blue Mountains"
            ]
          },
          {
            "name": "local_health_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Far West, Hunter New England, Illawarra Shoalhaven, Mid North Coast, Murrumbidgee, Nepean Blue Mountains, Northern NSW, Northern Sydney, South Eastern Sydney, South Western Sydney, Southern NSW, Sydney, Unknown, Western NSW, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "aecg_region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Dharawal, Hunter, Lower North Coast, Lower South Coast, Manning, Metropolitan East, Metropolitan North, Metropolitan South West, Metropolitan West, North Western 1, North Western 2, Riverina 1, Riverina 2, Riverina 3, Upper North Coast, Upper South Coast, Western 1, Western 2, Western 3.",
            "examples": [
              "eq.Western 3"
            ]
          },
          {
            "name": "asgs_remoteness",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Inner Regional Australia, Major Cities of Australia, Outer Regional Australia, Remote Australia, Very Remote Australia.",
            "examples": [
              "eq.Very Remote Australia"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From -37.084209 to -28.16951."
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From 141.43997 to 159.069032."
          },
          {
            "name": "assets_unit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter/Central Coast, North Coast, North Western NSW, Northern Sydney, South Western Sydney, Southern NSW, Sydney, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "sa4",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Sydney - Sutherland"
            ]
          },
          {
            "name": "foei_value",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Family Occupation and Education Index, the Department's school-level index of educational disadvantage. A higher value means more disadvantage. From 0.0 to 277.0."
          },
          {
            "name": "date_extracted",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The night the file was extracted. Fields come from different update cycles, so not every field was refreshed on this date. Values: 2026-10-02.",
            "examples": [
              "eq.2026-10-02"
            ]
          },
          {
            "name": "support_classes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "select",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Fields to return, comma-separated. Every field when absent."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/{slug}/aggregate": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Counts, sums, averages, minimums and maximums by group",
        "operationId": "aggregate",
        "description": "Groups and totals of any dataset in the newest loaded version. Filters work as they do on rows. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "nsw-public-schools"
              ]
            },
            "description": "The dataset's slug, as in its page URL `/d/<slug>/`."
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "On `aggregate`, fields to group by, comma-separated."
          },
          {
            "name": "metric",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "count"
            },
            "description": "On `aggregate`, `count`, `sum.field`, `avg.field`, `min.field` or `max.field`, comma-separated. `count` when absent."
          },
          {
            "name": "school_code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1001 to 8935."
          },
          {
            "name": "ageid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 6354 to 89907."
          },
          {
            "name": "school_name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "street",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "town_suburb",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "school_email",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "website",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "fax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "latest_year_enrolment_fte",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Full-time equivalent enrolments as reported to the ABS National Schools Statistics Collection, as at August. From 1.0 to 2318.0."
          },
          {
            "name": "indigenous_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of FTE students who identify as Aboriginal or Torres Strait Islander. The Department writes np where the student number is five or fewer; it is null here with a suppressed flag. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "lbote_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of students, by headcount, from a language background other than English, as at March. np where the student number is five or fewer. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "level_of_schooling",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central/Community School, Environmental Education Centre, Infants School, Other School, Primary School, Schools for Specific Purposes, Secondary School.",
            "examples": [
              "eq.Secondary School"
            ]
          },
          {
            "name": "selective_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Fully Selective, Not Selective, Partially Selective.",
            "examples": [
              "eq.Partially Selective"
            ]
          },
          {
            "name": "opportunity_class",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_specialty_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Agricultural, Comprehensive, Distance Education, Intensive English, Junior College, Language, Marine Technology, Performing Arts, Senior College, Sports, Technology, Visual Arts.",
            "examples": [
              "eq.Visual Arts"
            ]
          },
          {
            "name": "school_subtype",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Year 7 to Year 9"
            ]
          },
          {
            "name": "preschool_ind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "distance_education",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: C, N, S.",
            "examples": [
              "eq.S"
            ]
          },
          {
            "name": "intensive_english_centre",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Boys, Coed, Girls.",
            "examples": [
              "eq.Girls"
            ]
          },
          {
            "name": "late_opening_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "date_1st_teacher",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The date the first teacher was on duty, which the Department treats as the date the school opened. From 1849-01-01 to 2026-01-27."
          },
          {
            "name": "lga",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass Valley"
            ]
          },
          {
            "name": "electorate_from_2023",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "electorate_2015_2022",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "fed_electorate_from_2025",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "fed_electorate_2016_2024",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "operational_directorate",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Metropolitan North, Metropolitan South, Metropolitan South and West, Regional North, Regional North and West, Regional South and Connected Communities, Rural North, Rural South and West, Unassigned.",
            "examples": [
              "eq.Unassigned"
            ]
          },
          {
            "name": "principal_network",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass"
            ]
          },
          {
            "name": "operational_directorate_office",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wollongong"
            ]
          },
          {
            "name": "operational_directorate_office_phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: 131 536.",
            "examples": [
              "eq.131 536"
            ]
          },
          {
            "name": "operational_directorate_office_address",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Warilla Education Office, 30 Oldfield Street"
            ]
          },
          {
            "name": "facs_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter New England & Central Coast, Illawarra Shoalhaven & Southern NSW, Mid North Coast & Northern NSW, Murrumbidgee, Far West & Western NSW, South Eastern Sydney, Northern Sydney & Sydney, South Western Sydney, Unknown, Western Sydney & Nepean Blue Mountains.",
            "examples": [
              "eq.Western Sydney & Nepean Blue Mountains"
            ]
          },
          {
            "name": "local_health_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Far West, Hunter New England, Illawarra Shoalhaven, Mid North Coast, Murrumbidgee, Nepean Blue Mountains, Northern NSW, Northern Sydney, South Eastern Sydney, South Western Sydney, Southern NSW, Sydney, Unknown, Western NSW, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "aecg_region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Dharawal, Hunter, Lower North Coast, Lower South Coast, Manning, Metropolitan East, Metropolitan North, Metropolitan South West, Metropolitan West, North Western 1, North Western 2, Riverina 1, Riverina 2, Riverina 3, Upper North Coast, Upper South Coast, Western 1, Western 2, Western 3.",
            "examples": [
              "eq.Western 3"
            ]
          },
          {
            "name": "asgs_remoteness",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Inner Regional Australia, Major Cities of Australia, Outer Regional Australia, Remote Australia, Very Remote Australia.",
            "examples": [
              "eq.Very Remote Australia"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From -37.084209 to -28.16951."
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From 141.43997 to 159.069032."
          },
          {
            "name": "assets_unit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter/Central Coast, North Coast, North Western NSW, Northern Sydney, South Western Sydney, Southern NSW, Sydney, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "sa4",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Sydney - Sutherland"
            ]
          },
          {
            "name": "foei_value",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Family Occupation and Education Index, the Department's school-level index of educational disadvantage. A higher value means more disadvantage. From 0.0 to 277.0."
          },
          {
            "name": "date_extracted",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The night the file was extracted. Fields come from different update cycles, so not every field was refreshed on this date. Values: 2026-10-02.",
            "examples": [
              "eq.2026-10-02"
            ]
          },
          {
            "name": "support_classes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/{slug}/versions/{version}/aggregate": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Counts, sums, averages, minimums and maximums by group",
        "operationId": "aggregateVersion",
        "description": "Groups and totals of any dataset in one dated version. Filters work as they do on rows. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "nsw-public-schools"
              ]
            },
            "description": "The dataset's slug, as in its page URL `/d/<slug>/`."
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "A dated version loaded for queries, from the versions path. Answers for a dated version never change."
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "On `aggregate`, fields to group by, comma-separated."
          },
          {
            "name": "metric",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "count"
            },
            "description": "On `aggregate`, `count`, `sum.field`, `avg.field`, `min.field` or `max.field`, comma-separated. `count` when absent."
          },
          {
            "name": "school_code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1001 to 8935."
          },
          {
            "name": "ageid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 6354 to 89907."
          },
          {
            "name": "school_name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "street",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "town_suburb",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "school_email",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "website",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "fax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "latest_year_enrolment_fte",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Full-time equivalent enrolments as reported to the ABS National Schools Statistics Collection, as at August. From 1.0 to 2318.0."
          },
          {
            "name": "indigenous_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of FTE students who identify as Aboriginal or Torres Strait Islander. The Department writes np where the student number is five or fewer; it is null here with a suppressed flag. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "lbote_pct",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Per cent of students, by headcount, from a language background other than English, as at March. np where the student number is five or fewer. From 0 to 100.",
            "examples": [
              "eq.100"
            ]
          },
          {
            "name": "level_of_schooling",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central/Community School, Environmental Education Centre, Infants School, Other School, Primary School, Schools for Specific Purposes, Secondary School.",
            "examples": [
              "eq.Secondary School"
            ]
          },
          {
            "name": "selective_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Fully Selective, Not Selective, Partially Selective.",
            "examples": [
              "eq.Partially Selective"
            ]
          },
          {
            "name": "opportunity_class",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_specialty_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Agricultural, Comprehensive, Distance Education, Intensive English, Junior College, Language, Marine Technology, Performing Arts, Senior College, Sports, Technology, Visual Arts.",
            "examples": [
              "eq.Visual Arts"
            ]
          },
          {
            "name": "school_subtype",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Year 7 to Year 9"
            ]
          },
          {
            "name": "preschool_ind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "distance_education",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: C, N, S.",
            "examples": [
              "eq.S"
            ]
          },
          {
            "name": "intensive_english_centre",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "school_gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Boys, Coed, Girls.",
            "examples": [
              "eq.Girls"
            ]
          },
          {
            "name": "late_opening_school",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "boolean."
          },
          {
            "name": "date_1st_teacher",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The date the first teacher was on duty, which the Department treats as the date the school opened. From 1849-01-01 to 2026-01-27."
          },
          {
            "name": "lga",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass Valley"
            ]
          },
          {
            "name": "electorate_from_2023",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "electorate_2015_2022",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wyong"
            ]
          },
          {
            "name": "fed_electorate_from_2025",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "fed_electorate_2016_2024",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Whitlam"
            ]
          },
          {
            "name": "operational_directorate",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Metropolitan North, Metropolitan South, Metropolitan South and West, Regional North, Regional North and West, Regional South and Connected Communities, Rural North, Rural South and West, Unassigned.",
            "examples": [
              "eq.Unassigned"
            ]
          },
          {
            "name": "principal_network",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Yass"
            ]
          },
          {
            "name": "operational_directorate_office",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Wollongong"
            ]
          },
          {
            "name": "operational_directorate_office_phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: 131 536.",
            "examples": [
              "eq.131 536"
            ]
          },
          {
            "name": "operational_directorate_office_address",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Warilla Education Office, 30 Oldfield Street"
            ]
          },
          {
            "name": "facs_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter New England & Central Coast, Illawarra Shoalhaven & Southern NSW, Mid North Coast & Northern NSW, Murrumbidgee, Far West & Western NSW, South Eastern Sydney, Northern Sydney & Sydney, South Western Sydney, Unknown, Western Sydney & Nepean Blue Mountains.",
            "examples": [
              "eq.Western Sydney & Nepean Blue Mountains"
            ]
          },
          {
            "name": "local_health_district",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Far West, Hunter New England, Illawarra Shoalhaven, Mid North Coast, Murrumbidgee, Nepean Blue Mountains, Northern NSW, Northern Sydney, South Eastern Sydney, South Western Sydney, Southern NSW, Sydney, Unknown, Western NSW, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "aecg_region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Central Coast, Dharawal, Hunter, Lower North Coast, Lower South Coast, Manning, Metropolitan East, Metropolitan North, Metropolitan South West, Metropolitan West, North Western 1, North Western 2, Riverina 1, Riverina 2, Riverina 3, Upper North Coast, Upper South Coast, Western 1, Western 2, Western 3.",
            "examples": [
              "eq.Western 3"
            ]
          },
          {
            "name": "asgs_remoteness",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Inner Regional Australia, Major Cities of Australia, Outer Regional Australia, Remote Australia, Very Remote Australia.",
            "examples": [
              "eq.Very Remote Australia"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From -37.084209 to -28.16951."
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. As published. The Department's data dictionary does not state the datum. From 141.43997 to 159.069032."
          },
          {
            "name": "assets_unit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Hunter/Central Coast, North Coast, North Western NSW, Northern Sydney, South Western Sydney, Southern NSW, Sydney, Western Sydney.",
            "examples": [
              "eq.Western Sydney"
            ]
          },
          {
            "name": "sa4",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Sydney - Sutherland"
            ]
          },
          {
            "name": "foei_value",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Family Occupation and Education Index, the Department's school-level index of educational disadvantage. A higher value means more disadvantage. From 0.0 to 277.0."
          },
          {
            "name": "date_extracted",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "date. The night the file was extracted. Fields come from different update cycles, so not every field was refreshed on this date. Values: 2026-10-02.",
            "examples": [
              "eq.2026-10-02"
            ]
          },
          {
            "name": "support_classes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/{slug}/versions": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "The versions loaded for queries, newest first, with the URLs to query each",
        "operationId": "queryVersions",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "nsw-public-schools"
              ]
            },
            "description": "The dataset's slug, as in its page URL `/d/<slug>/`."
          }
        ],
        "responses": {
          "200": {
            "description": "Loaded versions with row counts and URLs."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
