Swap my Vote API
Swap my Vote now has an API
This means that any voter recommendation, matching, or tactical site can use a link/button to send a voter to a web address which will pre-populate their voting preferences, allowing for a relatively frictionless journey for the voter.
For example*: if you would like to vote Green, but are prepared to vote Labour in a swap, you can click www.swapmyvote.org/uk/swap?preferred_party_name=green_party&willing_party_name=labour and those vote-swapping preferences will be automatically filled in for you.
*We have prepared a table of short links for use by campaigning organisations and voting alliances here.
Swap my Vote API v1.0
We currently have a single end point to pre-populate some of the fields that a user can choose:
http://www.swapmyvote.org/uk/swap
Parameters should be passed in the query string, e.g.
http://www.swapmyvote.uk/uk/swap?preferred_party_name=labour
Available parameters are:
preferred_party_name - The party that the user would ideally like to vote for, say if all votes counted equally nationally.
willing_party_name - The party that the user is willing to vote for, say tactically.
The party names should be lowercased and use underscores instead of spaces. We support 7 parties at the moment, with the follow canonical names on Swap my Vote:
labour
liberal_democrats
green_party
conservatives
ukip
snp
plaid_cymru










