{
  "openapi": "3.1.0",
  "info": {
    "title": "Taxable income, salary, rent, tax and super by postcode, Australia, 2023-24 query API",
    "version": "2026-06-12",
    "summary": "Filter, page and aggregate Taxable income, salary, rent, tax and super by postcode, Australia, 2023-24 from Australian Taxation Office.",
    "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. Australian Taxation Office has not endorsed this site. The whole site is described in https://publicdata.au/openapi.json.",
    "license": {
      "name": "CC BY 2.5 AU",
      "url": "https://creativecommons.org/licenses/by/2.5/au/"
    }
  },
  "servers": [
    {
      "url": "https://publicdata.au"
    }
  ],
  "externalDocs": {
    "url": "https://publicdata.au/d/au-taxable-income-by-postcode-2023-24/#query"
  },
  "tags": [
    {
      "name": "query"
    }
  ],
  "paths": {
    "/api/v1/datasets/au-taxable-income-by-postcode-2023-24/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query Taxable income, salary, rent, tax and super by postcode, Australia, 2023-24",
        "operationId": "queryRows_au_taxable_income_by_postcode_2023_24",
        "description": "Rows of Taxable income, salary, rent, tax and super by postcode, Australia, 2023-24 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": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The postcode as the ATO publishes it, as a number, so Northern Territory postcodes such as 0800 appear as 800. From 800 to 7470."
          },
          {
            "name": "individuals",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "count_taxable_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 17164 to 321988."
          },
          {
            "name": "median_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 142580."
          },
          {
            "name": "proportion_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.25 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "count_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 13 to 78725."
          },
          {
            "name": "average_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 19739 to 155115."
          },
          {
            "name": "median_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 14492 to 116833."
          },
          {
            "name": "count_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 13151."
          },
          {
            "name": "proportion_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.32.",
            "examples": [
              "eq.0.32"
            ]
          },
          {
            "name": "average_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -42731 to 28979."
          },
          {
            "name": "median_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -17514 to 12713."
          },
          {
            "name": "count_total_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 22551 to 339844."
          },
          {
            "name": "median_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 144938."
          },
          {
            "name": "count_total_deductions",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 374 to 20016."
          },
          {
            "name": "median_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 4100."
          },
          {
            "name": "count_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 17876."
          },
          {
            "name": "proportion_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 1032268."
          },
          {
            "name": "median_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 417312."
          },
          {
            "name": "count_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 16522."
          },
          {
            "name": "proportion_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 893171."
          },
          {
            "name": "median_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 416530."
          },
          {
            "name": "count_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 32 to 75858."
          },
          {
            "name": "proportion_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.35 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "average_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 5766 to 170948."
          },
          {
            "name": "median_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 2112 to 44493."
          },
          {
            "name": "count_super_total_accounts_balance",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 51 to 96127."
          },
          {
            "name": "average_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 9138 to 1897923."
          },
          {
            "name": "median_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1585 to 659093."
          },
          {
            "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/au-taxable-income-by-postcode-2023-24/versions/{version}/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query Taxable income, salary, rent, tax and super by postcode, Australia, 2023-24",
        "operationId": "queryRows_au_taxable_income_by_postcode_2023_24_version",
        "description": "Rows of Taxable income, salary, rent, tax and super by postcode, Australia, 2023-24 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": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The postcode as the ATO publishes it, as a number, so Northern Territory postcodes such as 0800 appear as 800. From 800 to 7470."
          },
          {
            "name": "individuals",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "count_taxable_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 17164 to 321988."
          },
          {
            "name": "median_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 142580."
          },
          {
            "name": "proportion_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.25 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "count_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 13 to 78725."
          },
          {
            "name": "average_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 19739 to 155115."
          },
          {
            "name": "median_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 14492 to 116833."
          },
          {
            "name": "count_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 13151."
          },
          {
            "name": "proportion_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.32.",
            "examples": [
              "eq.0.32"
            ]
          },
          {
            "name": "average_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -42731 to 28979."
          },
          {
            "name": "median_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -17514 to 12713."
          },
          {
            "name": "count_total_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 22551 to 339844."
          },
          {
            "name": "median_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 144938."
          },
          {
            "name": "count_total_deductions",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 374 to 20016."
          },
          {
            "name": "median_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 4100."
          },
          {
            "name": "count_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 17876."
          },
          {
            "name": "proportion_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 1032268."
          },
          {
            "name": "median_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 417312."
          },
          {
            "name": "count_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 16522."
          },
          {
            "name": "proportion_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 893171."
          },
          {
            "name": "median_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 416530."
          },
          {
            "name": "count_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 32 to 75858."
          },
          {
            "name": "proportion_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.35 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "average_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 5766 to 170948."
          },
          {
            "name": "median_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 2112 to 44493."
          },
          {
            "name": "count_super_total_accounts_balance",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 51 to 96127."
          },
          {
            "name": "average_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 9138 to 1897923."
          },
          {
            "name": "median_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1585 to 659093."
          },
          {
            "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": [
                "au-taxable-income-by-postcode-2023-24"
              ]
            },
            "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": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The postcode as the ATO publishes it, as a number, so Northern Territory postcodes such as 0800 appear as 800. From 800 to 7470."
          },
          {
            "name": "individuals",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "count_taxable_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 17164 to 321988."
          },
          {
            "name": "median_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 142580."
          },
          {
            "name": "proportion_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.25 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "count_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 13 to 78725."
          },
          {
            "name": "average_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 19739 to 155115."
          },
          {
            "name": "median_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 14492 to 116833."
          },
          {
            "name": "count_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 13151."
          },
          {
            "name": "proportion_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.32.",
            "examples": [
              "eq.0.32"
            ]
          },
          {
            "name": "average_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -42731 to 28979."
          },
          {
            "name": "median_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -17514 to 12713."
          },
          {
            "name": "count_total_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 22551 to 339844."
          },
          {
            "name": "median_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 144938."
          },
          {
            "name": "count_total_deductions",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 374 to 20016."
          },
          {
            "name": "median_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 4100."
          },
          {
            "name": "count_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 17876."
          },
          {
            "name": "proportion_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 1032268."
          },
          {
            "name": "median_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 417312."
          },
          {
            "name": "count_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 16522."
          },
          {
            "name": "proportion_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 893171."
          },
          {
            "name": "median_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 416530."
          },
          {
            "name": "count_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 32 to 75858."
          },
          {
            "name": "proportion_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.35 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "average_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 5766 to 170948."
          },
          {
            "name": "median_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 2112 to 44493."
          },
          {
            "name": "count_super_total_accounts_balance",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 51 to 96127."
          },
          {
            "name": "average_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 9138 to 1897923."
          },
          {
            "name": "median_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1585 to 659093."
          },
          {
            "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": [
                "au-taxable-income-by-postcode-2023-24"
              ]
            },
            "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": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The postcode as the ATO publishes it, as a number, so Northern Territory postcodes such as 0800 appear as 800. From 800 to 7470."
          },
          {
            "name": "individuals",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "count_taxable_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 17164 to 321988."
          },
          {
            "name": "median_taxable_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 142580."
          },
          {
            "name": "proportion_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.25 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "count_salary_or_wages",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 13 to 78725."
          },
          {
            "name": "average_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 19739 to 155115."
          },
          {
            "name": "median_salary_or_wages_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 14492 to 116833."
          },
          {
            "name": "count_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 13151."
          },
          {
            "name": "proportion_net_rent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.32.",
            "examples": [
              "eq.0.32"
            ]
          },
          {
            "name": "average_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -42731 to 28979."
          },
          {
            "name": "median_net_rent_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From -17514 to 12713."
          },
          {
            "name": "count_total_income_or_loss",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 22551 to 339844."
          },
          {
            "name": "median_total_income_or_loss_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 15744 to 144938."
          },
          {
            "name": "count_total_deductions",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 52 to 96220."
          },
          {
            "name": "average_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 374 to 20016."
          },
          {
            "name": "median_total_deductions_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 4100."
          },
          {
            "name": "count_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 17876."
          },
          {
            "name": "proportion_total_business_income",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 1032268."
          },
          {
            "name": "median_total_business_income_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 417312."
          },
          {
            "name": "count_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 16522."
          },
          {
            "name": "proportion_total_business_expenses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.0 to 0.29.",
            "examples": [
              "eq.0.29"
            ]
          },
          {
            "name": "average_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 893171."
          },
          {
            "name": "median_total_business_expenses_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 0 to 416530."
          },
          {
            "name": "count_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 32 to 75858."
          },
          {
            "name": "proportion_net_tax",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. From 0.35 to 0.98.",
            "examples": [
              "eq.0.98"
            ]
          },
          {
            "name": "average_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 5766 to 170948."
          },
          {
            "name": "median_net_tax_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 2112 to 44493."
          },
          {
            "name": "count_super_total_accounts_balance",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 51 to 96127."
          },
          {
            "name": "average_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 9138 to 1897923."
          },
          {
            "name": "median_super_total_accounts_balance_aud",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. From 1585 to 659093."
          },
          {
            "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": [
                "au-taxable-income-by-postcode-2023-24"
              ]
            },
            "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"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
