API Guide

The SILO Web Application Programming Interface (API) allows you to query point datasets, as well as a range of metadata, in real time.

Accessing the API

The SILO API has the following base URL:

https://www.longpaddock.qld.gov.au/cgi-bin/silo

For example, a request for point data might look like:

https://www.longpaddock.qld.gov.au/cgi-bin/silo/PatchedPointDataset.php?station=1018&start=20170101&finish=20170228&format=alldata&username=<email_address>

For detailed information about request parameters please consult the reference.

Available data

The following data are available through the SILO API:

  • Point data (an API request provides data for a single station location or grid cell location)

The following metadata are available:

Identification

Data requests must be accompanied by your email address. We need your email address in case we need to contact you about the service.

Output formats

Point data are available in CSV and JSON, as well as a number of predefined formats, all of which are returned as plain ASCII text.

Metadata are provided in plain ASCII text.

You can specify your desired format using the format query parameter. For example:

https://www.longpaddock.qld.gov.au/cgi-bin/silo/DataDrillDataset.php?format=json

Requests

API requests are standard HTTP calls. The SILO API allows for retrieval of data only, so the API only supports HTTP GET methods. It's possible to use the API simply by typing the URL into your browser. The API can also be queried by a program. Here is a simple example in Python:

import urllib.request

r = urllib.request.urlopen('https://www.longpaddock.qld.gov.au/cgi-bin/silo/PatchedPointDataset.php?format=name&nameFrag=Cairns')
data = r.read()
print(data)

The API can also be queried by command line tools. Here is a simple example using wget:

wget -O Cairns_stations 'https://www.longpaddock.qld.gov.au/cgi-bin/silo/PatchedPointDataset.php?format=name&nameFrag=Cairns'
# NOTE: you may need to set proxy environment variables to pass through your local firewall

Responses

Data are returned in the format requested. However users should note the following:

  • fields in JSON objects are unordered and may be returned in any order
  • fields in CSV files are ordered by variable, with commonly used variables (such as rainfall and temperature) appearing first.
Last updated: 7 January 2021