API Deposu
Open catalogBlogMCPTest LabSubmit APISupportGitHub
Back to blog
Open Data
LISTICLE
datos-gob-es

Best Public Open Data APIs in Spain for Developers in 2026

A practical guide to Spain-focused public open data APIs for city data, statistics, energy, weather, and national dataset discovery.

Apr 25, 20264 min read719 words

Spain has a strong open-data ecosystem across national catalogs, city portals, statistics, energy, and weather. If you are building civic-tech apps, dashboards, research tools, or regional data products, these APIs are the most practical starting points.

Quick comparison

APIBest forAuthScope
datos.gob.esNational dataset discoveryNoneSpain national catalog
Open Data MadridMadrid city dataNoneCity catalog and datastore
Open Data BCNBarcelona city dataNoneCity catalog and datastore
Aragon Open DataRegional public dataNoneAragon catalog
INE JSON APIOfficial statisticsNoneDemographic and economic data
REData APIElectricity dataNoneEnergy generation and demand
AEMET OpenDataWeather dataAPI keyOfficial meteorology

What "public open data" means here

This list focuses on APIs that are useful for developers, not just downloadable spreadsheets:

  • They expose documented endpoints or catalog APIs.
  • They are linked to official or public-sector data sources.
  • They can support dashboards, discovery tools, maps, or analysis workflows.

Open data does not always mean unlimited traffic or uniform schemas. Expect dataset-by-dataset variation, especially in CKAN portals.

API options

datos.gob.es

datos.gob.es is Spain's national open data catalog. It is the right place to start when you need to discover public datasets across institutions rather than integrate one specific domain.

Use it when:

  • You are indexing Spanish public datasets.
  • You need national-level dataset discovery.
  • You want a catalog-first workflow before choosing source APIs.

The catalog is especially useful for search and metadata, while domain-specific APIs are better for real-time or structured analysis.

Open Data Madrid

Open Data Madrid exposes Madrid municipal open data through catalog and datastore endpoints. It is useful for city apps, civic dashboards, mobility datasets, and event data.

Use it when:

  • Your product focuses on Madrid.
  • You need municipal datasets with queryable endpoints.
  • You are building public-service or city-discovery features.

The integration is low complexity if you are familiar with CKAN-style catalogs.

Open Data BCN

Open Data BCN is Barcelona's open data API. It provides catalog and datastore access for city datasets, including mobility, environment, public services, and urban indicators.

Use it when:

  • You are building Barcelona-specific city apps.
  • You need environmental or mobility datasets.
  • You want a CKAN-like open-data source with city coverage.

As with most city portals, dataset quality and schema consistency vary by publisher.

Aragon Open Data

Aragon Open Data provides regional open data from the Government of Aragon. It is useful when your app needs regional coverage outside Madrid or Barcelona.

Use it when:

  • You need Aragon regional datasets.
  • You are building regional civic-tech products.
  • You want to browse or query public-sector datasets by topic.

It is a good example of a regional open-data portal with developer-friendly catalog access.

INE JSON API

INE JSON API provides access to official statistics from Spain's national statistics institute. It is the strongest choice for demographic, economic, and statistical reporting.

Use it when:

  • You are building demographic or economic dashboards.
  • You need official statistical series.
  • You want reliable national data for research or reporting.

Integration complexity is low, but statistical APIs often require careful handling of codes, dimensions, and time series.

REData API

REData API exposes electricity generation and demand data from Red Electrica de Espana. It is a strong source for energy dashboards and climate-adjacent analysis.

Use it when:

  • You want electricity demand and generation charts.
  • You are building energy-market dashboards.
  • You need official grid-level indicators for Spain.

This API is domain-specific, which makes it easier to build focused visualizations than a generic catalog portal.

AEMET OpenData

AEMET OpenData provides official weather and meteorological data for Spain. Unlike most APIs in this list, it uses an API key.

Use it when:

  • You need official Spanish weather data.
  • You are building forecast, climate, or weather-risk apps.
  • You prefer an official meteorological source over a global weather aggregator.

Plan for key management and read the endpoint-specific documentation before designing your cache strategy.

Picking the right one

Choose by domain:

  • National catalog discovery -> datos.gob.es.
  • Madrid apps -> Open Data Madrid.
  • Barcelona apps -> Open Data BCN.
  • Aragon regional data -> Aragon Open Data.
  • Statistics -> INE JSON API.
  • Electricity and energy -> REData API.
  • Weather -> AEMET OpenData.

For production dashboards, combine a catalog source for discovery with a domain-specific API for data refresh.

Related API Deposu entries

  • datos.gob.es
  • Open Data Madrid
  • Open Data BCN
  • Aragon Open Data
  • INE JSON API
  • REData API
  • AEMET OpenData

Sources

  • datos.gob.es
  • Open Data Madrid
  • Open Data BCN API
  • Aragon Open Data
  • INE OpenAPI
  • REData API
  • AEMET OpenData

Frequently Asked Questions

›Which Spain open data API should I start with?

Start with datos.gob.es if you want national dataset discovery. Start with Open Data Madrid or Open Data BCN if you are building a city-specific app.

›Do these APIs require authentication?

Most catalog and CKAN-style APIs in this list are public and do not require auth. AEMET OpenData uses an API key for official weather data access.

›Which API is best for Spanish statistics?

INE JSON API is the best fit for official demographic, economic, and statistical datasets from Spain's national statistics institute.

›Which API is best for energy dashboards?

REData API is the best fit for Spain electricity demand, generation, and power-system dashboards.

Article info

min read4
words719
Related APIs7

Related APIs

datos-gob-es
open-data-madrid
open-data-bcn
aragon-open-data
ine-json-api
redata-api
aemet-opendata

Sources

datos.gob.es

https://datos.gob.es/es

Open Data Madrid

https://datos.madrid.es/

Open Data BCN API

https://opendata-ajuntament.barcelona.cat/data/api/3

Aragon Open Data

https://opendata.aragon.es/

INE OpenAPI

https://www.ine.es/OpenAPI/index.html

REData API

https://www.ree.es/es/datos/apidatos

AEMET OpenData

https://opendata.aemet.es/centrodedescargas/inicio

Related posts

Explore all blog posts
Continue reading

Best Open Data APIs for Türkiye-focused Apps in 2026

A practical shortlist of free Turkish open-data APIs covering economic data, statistics, weather, earthquakes, and prayer times.

Continue reading

Best Free Anime and Manga APIs for Developers in 2026

A practical shortlist of free anime and manga APIs covering search, discovery, libraries, and GraphQL — all without API keys.

Continue reading

Best Free Movie and TV APIs for Developers in 2026

A practical shortlist of free movie and TV metadata APIs covering search, posters, ratings, and schedules.

Explore more API guides

Browse API Deposu guides backed by real catalog data, practical comparisons, and developer-focused implementation notes.

Explore all blog posts

This catalog was verified from public sources as of April 9, 2026. Always review official documentation before integration.

AboutTerms of ServicePrivacyCookiesX