{"id":"valgresultat","name":"Election results","description":"Official Norwegian election results from 2009 onwards at national, county, municipality and polling-district level, from Valgdirektoratet's valgresultat.no.","documentation":"https://valgresultat.no/","operations":[{"name":"list_elections","description":"List every Norwegian election with results in valgresultat.no. Signature: list_elections(limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"list_elections(limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"display_type":"integer","required":false,"default":25,"description":"Maximum list items returned by the gateway (default 25, maximum 100).","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/list_elections?limit=25&offset=0","output_fields":["[].year","[].type","[].name"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["[].name"]},"description_language":"en","documentation":"List every Norwegian election with results in valgresultat.no.\n\nArgs:\n    None.\n\nReturns one entry per year and election type, newest first, each with\n`year`, `type` (the code get_election_result takes: st, ko, fy or sa) and\n`name` (the Norwegian election name).\n\nData: Valgdirektoratet (valgresultat.no).\n\nSignature: list_elections(limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","documentation_language":"en","wiki_get_endpoint":"https://allemannsdata.com/wiki/kilder/valgresultat/list_elections/","wiki_get_url_template":"https://allemannsdata.com/wiki/kilder/valgresultat/list_elections/?hent=1&limit=25&offset=0","json_endpoint":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/list_elections","response_schema":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer"},"type":{"type":"string","enum":["st","ko","fy","sa"]},"name":{"type":"string"}},"additionalProperties":false,"required":["year","type","name"]}},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"response_schema_url":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/list_elections/schema","endpoint":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/list_elections","get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/list_elections?limit=25&offset=0","response_example":{"source":"valgresultat","operation":"list_elections","parameters":{},"data":[{"year":1,"type":"st","name":"Example"}],"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"valgresultat","name":"Election results","description":"Official Norwegian election results from 2009 onwards at national, county, municipality and polling-district level, from Valgdirektoratet's valgresultat.no.","cache_ttl_seconds":3600,"documentation":"https://valgresultat.no/"}]},"_provenance":{"data":{"source":"valgresultat","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat"},"entities":{"source":"valgresultat","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/list_elections","source":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat","wiki":"https://allemannsdata.com/wiki/kilder/valgresultat/list_elections/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}},{"name":"get_election_result","description":"Official result for one election, optionally for one area. Signature: get_election_result(year: integer, calendar year, required; election_type: string, required; area: string, optional, default None; polling_district: string, optional, default None; max_parties: integer, optional, default 30; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"get_election_result(year: integer, calendar year, required; election_type: string, required; area: string, optional, default None; polling_district: string, optional, default None; max_parties: integer, optional, default 30; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"year","type":"integer","schema":{"type":"integer"},"required":true,"default":null,"description":"Election year, e.g. 2025 (see list_elections). Unit: calendar year.","unit":"calendar year","display_type":"integer"},{"name":"election_type","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"\"st\" (Stortingsvalg), \"ko\" (Kommunestyrevalg), \"fy\" (Fylkestingsvalg) or \"sa\" (Sametingsvalg); the Norwegian name or the English parliament, municipal, county, sami also works.","unit":null,"display_type":"string"},{"name":"area","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Restrict to a county or municipality by name or number, e.g. \"Vestland\", \"46\" or \"Gloppen\". Omit for the national result.","unit":null,"display_type":"string"},{"name":"polling_district","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Restrict to one polling district (stemmekrets) by name or number. Requires area to name a municipality.","unit":null,"display_type":"string"},{"name":"max_parties","type":"integer","schema":{"type":"integer"},"required":false,"default":30,"description":"Max parties to return, 1-100 (default 30).","unit":null,"display_type":"integer"},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"display_type":"integer","required":false,"default":25,"description":"Maximum list items returned by the gateway (default 25, maximum 100).","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/get_election_result?year={year}&election_type={election_type}&area={area}&polling_district={polling_district}&max_parties=30&limit=25&offset=0","output_fields":["year","election_type","election_name","level","name","nr","eligible_voters","turnout_percent","votes_total","seats_total","counted_final_percent","report_generated","parties","parties[].code","parties[].name","parties[].votes","parties[].percent","parties[].change_percent_points","parties[].seats","parties[].seats_change","subareas","subareas[].name","subareas[].nr"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["name","parties[].name","subareas[].name"],"identifier":["parties[].code"]},"description_language":"en","documentation":"Official result for one election, optionally for one area.\n\nArgs:\n    year: Election year, e.g. 2025 (see list_elections).\n    election_type: \"st\" (Stortingsvalg), \"ko\" (Kommunestyrevalg), \"fy\"\n        (Fylkestingsvalg) or \"sa\" (Sametingsvalg); the Norwegian name or\n        the English parliament, municipal, county, sami also works.\n    area: Restrict to a county or municipality by name or number, e.g.\n        \"Vestland\", \"46\" or \"Gloppen\". Omit for the national result.\n    polling_district: Restrict to one polling district (stemmekrets) by\n        name or number. Requires area to name a municipality.\n    max_parties: Max parties to return, 1-100 (default 30).\n\nReturns the result with eligible_voters, turnout_percent, votes_total,\nseats_total (county and national levels only), counted_final_percent,\nreport_generated, `parties` (code, name, votes, percent,\nchange_percent_points, and seats/seats_change where the level has seats)\nsorted by votes, and `subareas` (the child areas below this one, e.g. the\npolling districts of a municipality).\n\nNote: rows flagged `aggregate: true` (\"Andre\", \"Andre2\") are\nValgdirektoratet's total for all smaller parties, including some that are\nalso listed as rows of their own. Leave them out when summing votes,\npercent or seats across rows.\n\nNote: Storting elections use the pre-2020 counties as their districts\n(e.g. Sogn og Fjordane), while county and municipal elections use the\ncurrent counties (e.g. Vestland). Municipality numbers are current in both.\n\nData: Valgdirektoratet (valgresultat.no).\n\nSignature: get_election_result(year: integer, calendar year, required; election_type: string, required; area: string, optional, default None; polling_district: string, optional, default None; max_parties: integer, optional, default 30; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","documentation_language":"en","wiki_get_endpoint":"https://allemannsdata.com/wiki/kilder/valgresultat/get_election_result/","wiki_get_url_template":"https://allemannsdata.com/wiki/kilder/valgresultat/get_election_result/?year={year}&election_type={election_type}&area={area}&polling_district={polling_district}&max_parties=30&limit=25&offset=0","json_endpoint":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/get_election_result","response_schema":{"type":"object","properties":{"year":{"type":"integer"},"election_type":{"type":"string","enum":["st","ko","fy","sa"]},"election_name":{"type":"string"},"level":{"type":["string","null"]},"name":{"type":["string","null"]},"nr":{"type":["string","integer","null"]},"eligible_voters":{"type":["integer","null"]},"turnout_percent":{"type":["number","null"]},"votes_total":{"type":["integer","null"]},"seats_total":{"type":["integer","null"]},"counted_final_percent":{"type":["number","null"]},"report_generated":{"type":["string","null"],"format":"date-time"},"parties":{"type":"array","items":{"type":"object","properties":{"code":{"type":["string","null"]},"name":{"type":["string","null"]},"votes":{"type":["integer","null"]},"percent":{"type":["number","null"]},"change_percent_points":{"type":["number","null"]},"seats":{"type":["integer","null"]},"seats_change":{"type":["number","null"]}},"additionalProperties":false,"required":["code","name","votes","percent"]}},"subareas":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"nr":{"type":["string","integer","null"]}},"additionalProperties":false,"required":["name","nr"]}}},"additionalProperties":false,"required":["year","election_type","election_name","parties","subareas"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"response_schema_url":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/get_election_result/schema","endpoint":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/get_election_result","get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/get_election_result?year={year}&election_type={election_type}&area={area}&polling_district={polling_district}&max_parties=30&limit=25&offset=0","response_example":{"source":"valgresultat","operation":"get_election_result","parameters":{"year":1,"election_type":"example value","area":"example value","polling_district":"example value","max_parties":30},"data":{"year":1,"election_type":"st","election_name":"Example","level":"example value","name":"Example","nr":"example value","eligible_voters":1,"turnout_percent":1.0,"votes_total":1,"seats_total":1,"counted_final_percent":1.0,"report_generated":"2026-01-15T12:00:00Z","parties":[{"code":"example value","name":"Example","votes":1,"percent":1.0,"change_percent_points":1.0,"seats":1,"seats_change":1.0}],"subareas":[{"name":"Example","nr":"example value"}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"valgresultat","name":"Election results","description":"Official Norwegian election results from 2009 onwards at national, county, municipality and polling-district level, from Valgdirektoratet's valgresultat.no.","cache_ttl_seconds":3600,"documentation":"https://valgresultat.no/"}]},"_provenance":{"data":{"source":"valgresultat","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat"},"entities":{"source":"valgresultat","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/get_election_result","source":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat","wiki":"https://allemannsdata.com/wiki/kilder/valgresultat/get_election_result/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}],"operation_schema_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat/{operation}/schema","related_sources":[{"id":"stortinget","name":"Stortinget open data","reason":"Parliamentary representatives and cases after the election.","api":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget","wiki":"https://allemannsdata.com/wiki/kilder/stortinget/"},{"id":"ssb","name":"Statistics Norway","reason":"Population and turnout statistics for the same areas.","api":"https://allemannsdata.com/wiki/api/v1/kilder/ssb","wiki":"https://allemannsdata.com/wiki/kilder/ssb/"}],"_meta":{"retrieved_at":"2026-10-12T06:27:50Z","language":"en","content_languages":["en"],"sources":[{"id":"valgresultat","name":"Election results","description":"Official Norwegian election results from 2009 onwards at national, county, municipality and polling-district level, from Valgdirektoratet's valgresultat.no.","documentation":"https://valgresultat.no/","cache_ttl_seconds":3600}]},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat","names":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat?view=names","compact":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat?view=compact","full":"https://allemannsdata.com/wiki/api/v1/kilder/valgresultat","wiki":"https://allemannsdata.com/wiki/kilder/valgresultat/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}
