All endpoints return their results as JSON.

Jump to the section you're most interested in

Get an API key

First thing you will need is a key. It is a key just for you. Please don't share it with anyone else.

You'll get one automatically when you Login or and come back to this page.

All current people in parliament

GET https://theyvoteforyou.org.au/api/v1/people.json?key=[api_key]

This returns basic information about each person who is currently a member of parliament. It includes their name, electorate, party and whether they are in the House of Representatives or the Senate.

To get more detailed information about a person use the id to do the following:

Details for a person

GET https://theyvoteforyou.org.au/api/v1/people/[id].json?key=[api_key]

This returns all sorts of useful detailed information, including

Parameter Description
rebellions The number of times they have rebelled against their party
votes_attended The number of divisions in which they have voted
votes_possible The number of possible divisions they could have voted in
offices An array of current ministerial (or shadow ministerial) positions
policy_comparisons An array of policies that this person could have voted on and their calculated agreement score in range from 0 to 100. voted says whether they ever vote on a division from this policy.

All policies

GET https://theyvoteforyou.org.au/api/v1/policies.json?key=[api_key]

This returns basic information about policies including

Parameter Description
id A unique identifier for this policy. Use the id to get more information about this policy
name A short name for the policy
description More detail on what the policy means
provisional true or false. A provisional policy isn't yet "complete" and isn't visible by default in comparisons with people

Details for a policy

GET https://theyvoteforyou.org.au/api/v1/policies/[id].json?key=[api_key]

This returns all sorts of useful detailed information, including

Parameter Description
id A unique identifier for this division. Use the id to get more information about this policy
name A short name for the policy
description More detail on what the policy means
provisional true or false. A provisional policy isn't yet "complete" and isn't visible by default in comparisons with people
policy_divisions An array of divisions connected to this policy. Each division also has an associated vote which can be strong which makes the vote more important
people_comparisons An array of people who could have voted on this division and their calculated agreement score in range from 0 to 100. voted says whether they ever vote on a division from this policy.

All divisions

GET https://theyvoteforyou.org.au/api/v1/divisions.json?key=[api_key]

This returns basic information about the most recent 100 divisions including

Parameter Description
id A unique identifier for this division. Use the id to get more information about this division
house Whether this division took place in the House of Representatives or the Senate
name Short name
date Date in the format yyyy-mm-dd
number The first division on a particular day and in a particular house is 1. Each following division is numbered consecutively
clock_time The time of the division in the format hh:mm AM or hh:mm PM or null if not available
aye_votes The number of people who voted "aye"
no_votes The number of people who voted "no"
possible_turnout The number of people who could potentially have voted based on the current number of members
rebellions The number of votes that went against the majority vote of their party
edited true if the summary of the division has been edited

To get more results or divisions within a particular date range you can do

GET https://theyvoteforyou.org.au/api/v1/divisions.json?end_date=2014-09-01&house=senate&start_date=2014-08-01&key=[api_key]

Again this will return at most 100 results. It is your responsibility to ensure that you are getting all the data you expect. In practise if you receive 100 results narrow the date range or just look at the specific house you are interested in.

Details for a division

GET https://theyvoteforyou.org.au/api/v1/divisions/[id].json?key=[api_key]

This returns all sorts of useful detailed information, including

Parameter Description
id A unique identifier for this division. Use the id to get more information about this division
house Whether this division took place in the House of Representatives or the Senate
name Short name
date Date in the format yyyy-mm-dd
number The first division on a particular day and in a particular house is 1. Each following division is numbered consecutively
clock_time The time of the division in the format hh:mm AM or hh:mm PM or null if not available
aye_votes The number of people who voted "aye"
no_votes The number of people who voted "no"
possible_turnout The number of people who could potentially have voted based on the current number of members
rebellions The number of votes that went against the majority vote of their party
edited true if the summary of the division has been edited
summary If edited is false this is a bit of text from the Hansard near to where the division took place. If edited is true then this is the latest version of the summary text written by contributors. It is formatted in Markdown.
votes An array of the votes cast by the members in this division
policy_divisions An array of policies that are connected to this division including how they voted
bills An array of bills connected to this division

Legacy API

We also maintain a legacy XML API which is used by OpenAustralia.org to access policy information. We plan to phase this API out as soon as is practical. We strongly recommend you use the modern REST API above for anything new.

MP Attendance and Rebelliousness Rates XML

mp-info.xml - list of division attendance rate and rebelliousness for all Representatives. This is a live file, correct to the latest division in the database. The field data_date shows the date it applies up to. For members who have left the house it says "complete".

mp-info.xml?house=senate - likewise for the Senate.

MP Policy Agreement XML

Each policy has an XML representation of how much each MP agrees with it, e.g. mpdream-info.xml?id=1.