Welcome to OpenAustralia's API section, where you can learn how to query our database for information.
Overview
- Get an API key.
- All requests are made by GETting a particular URL with a number of parameters. key is required; output is optional, and defaults to js.
http://www.openaustralia.org/api/function?key=key&output=output&other_variables
The current version of the API is 1.0.0. If we make changes to the API functions, we'll increase the version number and make it an argument so you can still use the old version.
OutputsThe output argument can take any of the following values:
|
ErrorsIf there's an error, either in the arguments provided or in trying to perform the request,
this is returned as a top-level error string, ie. in XML it returns
|
Licensing
Parliamentary material (that's data returned from getDebates and getHansard), is Copyright Commonwealth of Australia and is provided by them under a Creative Commons 3.0 Attribution-NonCommercial-NoDerivs licence.
Our own data - lists of members of the House of Representatives, Senators, electoral divisions and so on - is available under the Creative Commons Attribution-ShareAlike license version 2.5.
Low volume, non-commercial use of the API service itself is free. Please contact us for commercial use, or if you are about to use the service on a large scale.
Bindings
- PHP source and example (thanks to Mark Kinkade for adapting Ruben Arakelyan's TWFY bindings)
- Ruby, by Alex Cooper, updated by Henare Degan
- PHP & ASP.NET, by Ruben Arakelyan
- Python, by Chris Nilsson
In adapting the API of TheyWorkForYou to OpenAustralia we've had to make a number of modifications which means that the language bindings developed for the TheyWorkForYou API won't directly work with the OpenAustralia API. If anyone wishes to adapt them or write new bindings, please do so, let us know and we'll link to it here. You might want to join the OpenAustralia community mailing list to discuss things.
Examples
- PoliPress is a WordPress plugin that lets you quote members of parliament and search the Australian Hansard from within your WordPress blog.
- OpenAustralia for WordPress is another WordPress plugin. It displays your MP's most recent speeches on your blog.