get_data
Query curated Australian Taxation Office and ACNC charity datasets to retrieve observations filtered by state, postcode, industry, or charity size. Returns records, series, or CSV with attribution.
Instructions
Query a curated ATO/ACNC dataset and return observations.
Examples: # Median taxable income in postcode 2000 (Sydney CBD), 2022-23 resp = await get_data( "IND_POSTCODE_MEDIAN", filters={"state": "nsw", "postcode": "2000"}, measures="median_taxable_income_2022_23", )
# All registered charities in NSW with size = "large"
resp = await get_data(
"ACNC_REGISTER",
filters={"state": "NSW", "charity_size": "Large"},
measures=["total_gross_income", "total_employees"],
)
# 2023-24 corporate tax payable for entities with total income > $1B
resp = await get_data("CORP_TRANSPARENCY", filters={"income_year": "2023-24"})Returns: DataResponse with records (or csv), unit, period bounds, row_count, source URL, and CC-BY attribution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | Curated dataset ID. Use search_datasets() / list_curated(). | |
| filters | No | Dimension filters. Keys are plain-English aliases from the dataset's describe_dataset response. Values are matched against the source data; pass a list to OR across values. Examples: {'state': 'nsw'}, {'postcode': '2000'}, {'industry_broad': ['A', 'B']}. | |
| measures | No | Which measure(s) to return. Plain-English keys from describe_dataset. Omit to return all measures. | |
| start_period | No | Inclusive start period for transposed time-series datasets (GST_MONTHLY etc). Ignored for wide single-year tables. Format: 'YYYY' or 'YYYY-MM'. | |
| end_period | No | Inclusive end period. Same format as start_period. | |
| format | No | Response shape. 'records' (default): flat list of observations. 'series': grouped by measure. 'csv': pandas CSV string in `csv` field. | records |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | ||
| dataset_name | Yes | ||
| query | No | ||
| period | No | ||
| unit | No | ||
| row_count | No | ||
| records | No | ||
| csv | No | ||
| source | No | Australian Taxation Office | |
| attribution | No | Data sourced from the Australian Taxation Office (and, for charity data, the Australian Charities and Not-for-profits Commission) via data.gov.au. Licensed under Creative Commons Attribution 3.0 Australia (CC BY 3.0 AU). https://creativecommons.org/licenses/by/3.0/au/ | |
| retrieved_at | Yes | ||
| ato_url | Yes | ||
| server_version | No |