release: v1.1.0
This API provides JSON-formatted election data at different geographical levels, from individual voting sections up to country-wide totals.
Each election date and the combined data provide access to four hierarchical levels:
Access country-wide aggregated data:
/api/{election_date}/total/
/api/combined/total/
Access RIK level data (two-digit code):
/api/{election_date}/riks/{code}/
/api/combined/riks/{code}/
Access municipality level data (four-digit code):
/api/{election_date}/municipalities/{code}/
/api/combined/municipalities/{code}/
Access individual section data (nine-digit identifier):
/api/{election_date}/sections/{id}/
/api/combined/sections/{id}/
Static reference data is available at:
Specialized analytical views:
All hierarchical levels (total, RIK, municipality, section) share the same JSON structure:
{ "id": "Identifier (varies by level)", "e": "Election date (YYYYMMDD)", "prv": "Pre-registered voters", "rv": "Registered voters", "olv": "On-site listed voters", "v": "Total voters who voted", "db": "Distributed ballots", "uupb": "Unused paper ballots", "dpb": "Destroyed paper ballots", "ub": "Used ballots", "upb": "Used paper ballots", "umb": "Used machine ballots", "ipb": "Invalid paper ballots", "vv": "Valid votes", "vvp": "Valid votes for parties", "vvsn": "Valid votes for 'support none'", "vd": [ { "id": "Party/candidate registration code", "n": "Party/candidate name", "p": "Paper votes", "m": "Machine votes", "md": "Machine data votes", "t": "Total votes" } ] }
For the combined endpoints (/api/combined/
), the structure is modified to accommodate multiple
elections:
{ "id": "Identifier (varies by level)", "prv": [ { "e": "Election date (YYYYMMDD)", "v": "Number of pre-registered voters" } ], "rv": [ { "e": "Election date (YYYYMMDD)", "v": "Number of registered voters" } ], "vd": [ { "id": "Party/candidate registration code", "n": "Party/candidate name", "p": [ { "e": "Election date (YYYYMMDD)", "v": "Number of paper votes" } ], "m": [ { "e": "Election date (YYYYMMDD)", "v": "Number of machine votes" } ], "t": [ { "e": "Election date (YYYYMMDD)", "v": "Total number of votes" } ] } ] }
Note: All numeric fields in the combined data structure are wrapped in arrays of objects with election date
(e
) and value (v
).
This API data is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0).