Query an ABS dataflow and return observations.
Pass filters and/or a period range — unfiltered queries on large
dataflows can return tens of thousands of observations.
Curated dataflows accept plain-English filter keys and values that
are translated to SDMX codes server-side. For example, on LF:
`{"region": "nsw", "measure": "unemployment_rate"}` resolves to
SDMX key `M13.3.1599.20.1.M` with hidden-dim defaults auto-applied.
Examples:
# NSW unemployment monthly for 2024
resp = await get_data(
"LF",
filters={"region": "nsw", "measure": "unemployment_rate"},
start_period="2024",
end_period="2024-12",
)
# → resp.records[0]: period='2024-01', value=4.8, unit='Percent'
# Multi-state comparison
resp = await get_data(
"LF",
filters={"region": ["nsw","vic","qld"], "measure": "unemployment_rate"},
start_period="2024",
format="csv",
)
# → resp.csv contains 36 rows (3 states × 12 months)
# Australia quarterly CPI annual change
resp = await get_data(
"CPI",
filters={"region": "australia", "measure": "change_year"},
start_period="2020",
)
When to use:
- You want observations over a time range (use latest() for the most-recent only)
- You want a multi-state or multi-measure comparison via list filters
- You want a CSV for downstream charting / spreadsheet tools
Returns:
DataResponse with records (list of {period, value, dimensions, unit}),
unit (when homogeneous), period bounds, the resolved query echo,
the ABS source URL, and the CC-BY 4.0 attribution string.