GeoRutter

Geospatial data sources by country, with access methods and caveats.

Spain electricity consumption local data sources

Where can I get electricity consumption by municipality or postal code in Spain, by sector and year?

Answer

Spain publishes no national file of electricity use by municipality or postal code. Best: Catalonia (ICAEN, 947 municipalities, 6 sectors, kWh, 2013-2024, API) and Canarias (ISTAC, monthly, 3 sectors, MWh). Postal codes: Barcelona city by sector, and E-REDES/Viesgo/Begasa areas as totals. Other regions give totals, residential only, or per-capita figures. National bodies (CNMC, REE, MITECO) stop at region or province.

Official data
Partial coverage
Non official data
None found in the documented search
Published
2026-11-19
Research reviewed
2026-11-16
Access checked
No complete access check recorded

Requested attributes

AttributeCoverageSourcesScope and limitations
Electricity consumption electricity_consumptionPartially covered
  • s001
  • s002
  • s004
  • s005
  • s006
  • s007
  • s008
  • s003
Coverage combines distinct components of the question; see the original detailed evidence and its geographic and technical limits.

Not checked: The original rows have different scopes. Their combination has not been established as complete; original rows are retained in internal curation.

Municipality or postal code local_areaPartially covered
  • s001
  • s002
  • s004
  • s005
  • s006
  • s007
  • s008
  • s003
Coverage combines distinct components of the question; see the original detailed evidence and its geographic and technical limits.

Not checked: The original rows have different scopes. Their combination has not been established as complete; original rows are retained in internal curation.

Consumption sector sectorPartially covered
  • s001
  • s002
  • s003
  • s004
  • s005
  • s008
Sectors exist for Catalonia (6), Canarias (3), Barcelona (3), Basque (industrial/non-industrial, per capita), Andalusia (residential only), signatory cities (one year).

Not published: Regional offices opened for Madrid, Navarra, Aragon, Galicia, Extremadura, Cantabria, Murcia: totals only or provincial; no municipal sector split.

Reference year reference_yearCovered
  • s001
  • s002
  • s004
  • s007
  • s003
Annual or finer series wherever data exists: Catalonia 2013-2024, Canarias 2018-2025, Basque 2002-2024, Madrid 1985-2023, Barcelona 2019-2025 (daily).
Latest available data latest_dataNot coveredNone recordedThis specific requirement was not separately established in the inherited research.

Not checked: Review the original answer and source evidence; no new research was performed during this adaptation.

Historical coverage historical_seriesCovered
  • s001
  • s002
  • s004
  • s007
  • s003
Annual or finer series wherever data exists: Catalonia 2013-2024, Canarias 2018-2025, Basque 2002-2024, Madrid 1985-2023, Barcelona 2019-2025 (daily).
Update frequency update_frequencyNot coveredNone recordedThis specific requirement was not separately established in the inherited research.

Not checked: Review the original answer and source evidence; no new research was performed during this adaptation.

Main caveats

Sources

Consum d'energia elèctrica per municipis i sectors de Catalunya (Consumo municipal de energía eléctrica por municipios y sectores de Cataluña)

Source id
s001
Publisher
Institut Català d'Energia (ICAEN), Generalitat de Catalunya; statistic described by Idescat
Official
Yes
Landing url
https://idescat.cat/paae/2023/030207/es
Data url
https://analisi.transparenciacatalunya.cat/resource/8idm-becu.json
Access
api
Format
Socrata SODA API (JSON, CSV)
License
Generalitat de Catalunya open-data licence (metadata says 'See Terms of Use')
Language
Catalan
Has coordinates
No
Location precision
municipality
Summary
Consum d'energia elèctrica per municipis i sectors de Catalunya (Consumo municipal de energía eléctrica por municipios y sectores de Cataluña)
Coverage note
Catalonia: 947 municipalities in 2024 (4 provinces), also comarca and province fields
Date of data
Calendar years 2013 to 2024 (counted with a SoQL group-by on 'any'); metadata last updated 2025-12-17
Caveats
  • Consult the main caveats and the complete reading traps and access evidence in the detail.
Test
Tested on
2026-11-16
Method
api_query
Http status
200
Problems
None recorded
Example
Example request
curl -sL 'https://analisi.transparenciacatalunya.cat/resource/8idm-becu.json?$where=cdmun=%2708019%27%20and%20any=2024'
Example result
[{"any":"2024","cdmun":"08019","municipi":"BARCELONA","codi_sector":"7","descripcio_sector":"USOS DOMESTICS","consum_kwh":"1914308836"},{"any":"2024","cdmun":"08019","municipi":"BARCELONA","codi_sector":"6","descripcio_sector":"SERVEIS","consum_kwh":"3558751784"}] (6 rows returned; trimmed to 2)
Members summary
Not a grouped source

Consumo final de energía eléctrica y número de clientes según grandes sectores. Municipios de Canarias por periodos (ISTAC C00022A_000006)

Source id
s002
Publisher
Instituto Canario de Estadística (ISTAC), Gobierno de Canarias
Official
Yes
Landing url
https://datos.gob.es/catalogo/a05003423-consumo-final-de-energia-electrica-y-numero-de-clientes-segun-grandes-sectores-municipios-de-canarias-por-periodos
Data url
https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets/ISTAC/C00022A_000006/1.12.csv
Access
api
Format
SDMX statistical resource API: CSV, TSV, JSON, JSON-stat, XML, XLSX
License
Aviso Legal (ISTAC)
Language
Spanish
Has coordinates
No
Location precision
municipality
Summary
Consumo final de energía eléctrica y número de clientes según grandes sectores. Municipios de Canarias por periodos (ISTAC C00022A_000006)
Coverage note
Canary Islands: 88 municipalities, 7 islands and the region (96 territory codes)
Date of data
Monthly from 2018-M01 to 2025-M06 plus annual totals 2018 onward (version 1.12 valid from 2025-09-04)
Caveats
  • Consult the main caveats and the complete reading traps and access evidence in the detail.
Test
Tested on
2026-11-16
Method
download
Http status
200
Problems
None recorded
Example
Example request
curl -sL 'https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets/ISTAC/C00022A_000006/1.12.json?dim=MEDIDAS:ENERGIA_ELECTRICA,TERRITORIO:35004,TIME_PERIOD:2024,FLUJO_ENERGIA:_T&fields=%2Bdata'
Example result
data.observations: "272748.05" (Arrecife, 2024, total, MWh). From the full CSV: Las Palmas de Gran Canaria 2023 = Total 1118776.63, Servicios 591477.63, Residencial 469053.12, Industria 58245.88; CUPS Total 211155
Members summary
Not a grouped source

Consum d'electricitat (MWh) per codi postal, sector econòmic i tram horari a la ciutat de Barcelona

Source id
s003
Publisher
Ajuntament de Barcelona (Open Data BCN), using data from the Datadis platform
Official
Yes
Landing url
https://opendata-ajuntament.barcelona.cat/data/dataset/consum-electricitat-bcn
Data url
https://opendata-ajuntament.barcelona.cat/resources/bcn/EstadisticaDatadis/2025_consum_electricitat_BCN.csv
Access
direct_download
Format
CSV, one file per year 2019-2025
License
Creative Commons Attribution 4.0
Language
Catalan
Has coordinates
No
Location precision
none
Summary
Consum d'electricitat (MWh) per codi postal, sector econòmic i tram horari a la ciutat de Barcelona
Coverage note
City of Barcelona only: 42 postal codes (08001 to 08042)
Date of data
2025 file covers 2025-01-01 to 2025-11-30 (checked 2026-11-16); older files are full years 2019-2024
Caveats
  • Consult the main caveats and the complete reading traps and access evidence in the detail.
Test
Tested on
2026-11-16
Method
download
Http status
200
Problems
None recorded
Example
Example request
curl -sL -o bcn2025.csv 'https://opendata-ajuntament.barcelona.cat/resources/bcn/EstadisticaDatadis/2025_consum_electricitat_BCN.csv'  (resolved from the CKAN resource /download link, which answers 302)
Example result
2025,2025-01-01,08001,Indústria,De 00:00:00 a 05:59:59 h,287 ; sums over the file: Serveis 3,079,229,799; Residencial 1,905,395,948; Indústria 468,026,112; No especificat 15,955,805
Members summary
Not a grouped source

Additional sources in the detail: 5. Read the full detail; locate each source by its source_id.

Document access

Summary
Not stated

Local search terms

Confidence

Confidence
medium
Confidence reason
National negatives opened at CNMC, MITECO, REE and INE; sources tested by download or API. Several regions only checked through searches plus partial pages; i-DE site returned 503.

Research provenance

Pass count
1
Models
  • Claude Sonnet 5.5
Minutes estimate
36
Pages opened
86
Passes
  • Pass
    1
    Date
    2026-11-16
    Model
    Claude Sonnet 5.5
Note
Minutes are researcher estimates. Counts describe documented passes, not publication approval. Missing history or effort is not reconstructed.

Record metadata

Schema version
1.0
Country
es
Country name
Spain
Topic
electricity-consumption-local
Territory
es
Territory level
country
Parent url
No parent territory
Html url
https://georutter.org/es/electricity-consumption-local/