latest
Retrieve the most recent observation for a dataset. Use for current-value questions like unemployment or inflation rates.
Instructions
Return the most recent observation(s) for a dataflow.
Wraps get_data with lastNObservations=1 and a 15-minute cache TTL (vs 1 hour for general data calls). Use this for "what's the current X?" questions — it's a cheap, fast call: warm-cache p50 ~22ms, cold-cache ~200ms.
Examples: # Latest NSW unemployment rate resp = await latest("LF", {"region": "nsw", "measure": "unemployment_rate"}) # → resp.records[0]: period='2026-03', value=4.61, unit='Percent'
# Latest Australia headline annual inflation
resp = await latest("CPI", {"region": "australia", "measure": "change_year"})
# → resp.records[0]: period='2026-Q1', value=4.6, unit='Percent'
# Latest Greater Sydney population
resp = await latest("ABS_ANNUAL_ERP_ASGS2021",
{"region": "greater_sydney", "region_type": "gccsa"})
# → resp.records[0]: period='2025', value=5640000, unit='Persons'When to use: - You want "the current value" of an indicator (most common workflow) - You're answering a "what's the unemployment rate?" style question - You want sub-50ms warm-cache latency for chat/agent integration
Returns: DataResponse with one most-recent observation per matched dimension combination. Same envelope as get_data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Dimension filters. For curated dataflows: plain-English keys and values. Without filters, expect one observation per dimension combination (often hundreds) — pass at least region + measure for a clean single number. | |
| dataset_id | Yes | ABS dataflow ID. Use search_datasets to discover. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | ||
| unit | No | ||
| query | No | ||
| stale | No | ||
| period | No | ||
| source | No | Australian Bureau of Statistics | |
| abs_url | Yes | Click-through URL for this dataset's source page. abs-mcp legacy name — prefer source_url (canonical) for new code. Both fields are populated identically. | |
| records | No | ||
| row_count | No | Number of observation rows in records. | |
| dataset_id | Yes | ||
| source_url | Yes | Canonical click-through URL. Same value as abs_url; both populated for backward compat. | |
| attribution | No | Data sourced from the Australian Bureau of Statistics and licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). https://www.abs.gov.au/about/copyright-and-creative-commons | |
| dataset_name | Yes | ||
| retrieved_at | Yes | ||
| stale_reason | No | ||
| truncated_at | No | ||
| server_version | No |