Data API user guide

User assistance for Data API, machine to machine access to detailed ABS statistics

Released
22/03/2022

About the Beta

This beta release allows you to preview ABS Data API before it is released in its final form and gives you the opportunity to provide the ABS with feedback as we work to enhance the service.

We will continue to load new datasets and update existing datasets as soon as possible after embargo on the data is lifted. However, data in this beta release may not necessarily be the most up to date. For the most up to date information visit the ABS website.

Availability of the ABS Data API (Beta) is not guaranteed. Performance and availability may be impacted during periods of high use. The ABS monitors the service and will work to resolve any issues as soon as possible.

The service may be subject to change.

If you have feedback or questions, please contact the ABS APIs team. You can request to join our register of interest to be notified of any changes in the API. The ABS privacy policy outlines how the ABS handles any personal information that you provide to us.

Key Information

The ABS Data REST API (Beta) allows you request detailed ABS statistics including economic, social and Census data.

Customise your query to return only the data and metadata you are interested in, in the format you want.

Try it out

 

Base URL

This service only responds to a single GET method:

https://api.data.abs.gov.au

 

Response Format

Data is available in XML, JSON and CSV. If no format is selected the API will return XML.

Metadata is primarily available in XML. Some metadata is also available in JSON.

ABS Data API (Beta) is fully compliant with SDMX 2.1 - the Statistical Data and Metadata Exchange information model. The SDMX-REST Guide is available on GitHub.

You can specify the response in the API URL using the "format" query parameter. E.g: https://api.data.abs.gov.au/data/jv/all?startPeriod=2020&format=jsondata

  • XML is returned by default
  • Structure specific XML (good for time series): "format=structurespecificdata"
  • JSON: "format=jsondata"
  • CSV: "format=csv"

You can also use the "accept" header to specify the response format as a header when you make an API call. E.g: "accept: application/xml"

  • XML: application/xml
  • Structure specific XML: application/vnd.sdmx.structurespecificdata+xml
  • JSON: application/vnd.sdmx.data+json
  • CSV: text/csv
  • CSV: application/vnd.sdmx.data+csv
  • CSV with labels for codelists: application/vnd.sdmx.data+csv;labels=both
  • CSV file with labels for codelists: application/vnd.sdmx.data+csv;file=true;labels=both

 

OpenAPI Specification

The OpenAPI / swagger definition for this service is currently at https://api.gov.au/assets/APIs/abs/DataAPI.openapi.html

GetData

  • Get data: {string: dataflowIdentifier} {string: datakey} {string: startPeriod} {string: endPeriod} {string: detail} {string: dimensionAtObservation}

GetMetadata

  • Get all structures of specified type: {string: structureType} {string: agencyId} {string: detail}
  • Get latest version of specified structure: {string: structureType} {string: agencyId} {string: structureId} {string: references} {string: detail}
  • Get specified version of specified structure: {string: structureType} {string: agencyId} {string: structureId} {string: structureVersion} {string: references} {string: detail}

 

Authentication

Unauthenticated access to the ABS Data API is allowed for the purposes of investigation and testing.

If you decide to use the ABS Data API for a system or application, we strongly encourage you to register for an API key. The key identifies your API requests and makes it easier for us to investigate any issues you have.

If you wish to register for an API key, please contact us. Providing your name or organisation name and a brief description of what you will use the API for. It may take a few days for us to respond.

If you have been issued an API Key, you need to add it as a header in your API requests: 'x-api-key: xxxxxxxxxxxxxxx'

If you are using the linked Swagger user interface to test the API, click 'Authorize' enter your API Key and then click 'Authorize' again.

Back to top of the page