Products Urnario
Urnario
How each of Spain's 8,132 municipalities has voted in the 16 general elections since 1977, with the official data from the Ministry of the Interior, exactly as published.
Coming soon

The problem
The Ministry of the Interior publishes each election's results in technical files, one per election and with the municipalities that existed at the time. Since 1977 many have merged, split or changed their name.
We wanted anyone to be able to see the electoral history of their present-day municipality, from 1977 to 2023, with the official data and no opinions, polls or groupings of parties.
At a glance
Where the data comes from
- Ministry of the Interior (Infoelectoral)
- The official files of the 16 general elections to the Congress, from 1977 to 2023: by municipality and, since 1982, by polling station. Each figure carries the date the Ministry last updated those files.
- National Statistics Institute (INE)
- The official list of the 8,132 municipalities as of 1 January 2026 and the records of each municipality's changes since 1842: mergers, splits, and changes of code and name.
How we built it
The official data, as published
Candidacy names are the ones the Ministry registers in each election, with their abbreviations and even their typos. Each candidacy belongs to a single election: we don't say which of today's parties “comes from” which, because deciding that would be an opinion.
Nothing that could read as an opinion
No blocs of parties, no polls or estimates and no text assessing the results. Every candidacy has the same colour and they are ordered by votes. And there is no map of the most-voted candidacy: the map shows turnout.
45 years of municipalities
The files contain between 7,935 and 8,131 municipalities depending on the year. To tell the story of each present-day municipality, we match every code in every election to one of the current 8,132, always backed by an INE document. If a municipality was absorbed into another, its votes are added to today's, and the page says so. If one split off, it doesn't show a zero for earlier elections: the page explains that it voted as part of the municipality it came from.
Comparing like with like
Spaniards living abroad vote in their province, not in a municipality, and turn out far less. So a municipality is compared with the turnout of residents in Spain: in 2023 it was 70.41%, against the official 66.59% including votes from abroad.
Neutral on dates too
For the elections of 29 November 2026, no content changes are published on the 28th, the day of reflection, or on the 29th before 8 pm. Results will be added afterwards, always marked as provisional or final.
On a phone and for sharing


The limits of the data
We'd rather explain them than hide them:
- Up to 1996, the Ministry published municipal data as “unofficial”. The sum of a province's municipalities doesn't quite match its official total, and those elections carry a notice.
- The source has errors in those years, such as votes swapped between candidacies. We don't correct them, because that would put our judgement above the official data: we publish them as they are and explain them.
- The 1982 municipal file is missing 99 municipalities, which appear as “no data in the source”.
- Since 2000 the data matches almost to the vote, and seats always match the official ones.
How we check it
Before publishing, automated tests check every time, among other things, that:
- province, region and national totals are exactly the official ones, in votes and in seats;
- no vote is lost or counted twice when matching municipalities over time;
- no vote is assigned to a candidacy from another election;
- every published figure carries the citation to the Ministry, the date and the licence.
Open data
Once published, it will have an open API with no key, CSV and Parquet downloads and an AI-assistant connector that answers with the same neutrality: it doesn't interpret or recommend how to vote, or make predictions. Under a CC BY 4.0 licence. Data and APIs.
Credits
Data source: Ministry of the Interior (Origen de los datos: Ministerio del Interior). The Ministry does not take part in, sponsor or endorse this website. Municipalities: elaboración propia con datos extraídos del sitio web del INE: www.ine.es.