Overview

Euskalmet, the Basque Meteorological Agency, offers an API that provides comprehensive weather and climatological data for the Basque Country region of Spain. Established in 1990, Euskalmet focuses on delivering accurate and localized meteorological information. The API is designed for developers, researchers, and public sector entities requiring detailed weather insights specific to this autonomous community.

The Euskalmet API is particularly well-suited for applications that require hyper-local weather conditions within the Basque Country. This includes regional mobile applications, smart city initiatives, agricultural planning tools, and public safety systems that benefit from precise local forecasts and real-time observations. Its utility extends to academic research and educational projects focused on regional climate patterns or environmental studies within the Basque geopolitical area.

Access to the Euskalmet API is provided free of charge through the Euskadi Open Data portal, reflecting its public service mission. Users are typically required to register for an API key to manage access and usage, although the service itself incurs no financial cost. The documentation and API reference are primarily available in Spanish, which is a consideration for international developers, but the data formats are standard, facilitating integration.

Unlike global weather APIs that aggregate data from various sources and often provide broader, less granular coverage, Euskalmet's strength lies in its specialized focus. This enables a depth of local detail that can be critical for region-specific services. For instance, while a service like the Google Maps Platform provides elevation data, Euskalmet integrates local topography and microclimates into its forecasts, offering a distinct advantage for highly localized applications within its operational area.

The API provides access to various data types, including short-term and medium-term forecasts, current weather conditions from its network of stations, and historical climatological records. This range of data supports both predictive analytics and retrospective analysis, making it a versatile tool for regional development and environmental monitoring.

Key features

  • Regional Weather Forecasts: Provides detailed short-term and medium-term forecasts specifically for the Basque Country, including temperature, precipitation, wind, and atmospheric pressure.
  • Real-time Weather Data: Offers current weather observations from Euskalmet's network of meteorological stations across the region.
  • Climatological Data: Access to historical weather records and climatological statistics for long-term analysis and research.
  • Localized Data Points: Focuses on granular data within the Basque Country, offering a high degree of specificity for local applications.
  • Public Sector Integration: Designed to support public services, regional planning, and governmental initiatives.
  • Free API Access: Available without charge for public and commercial use, requiring only API key registration.

Pricing

As of 2026-05-28, the Euskalmet API is provided free of charge for public use. Users typically need to register for an API key through the Euskadi Open Data portal to gain access.

Service Tier Cost Details
Standard API Access Free Access to all available weather forecasts, real-time data, and climatological information for the Basque Country. Requires API key registration.

For the most current information regarding terms of use and access, refer to the Euskalmet API documentation on the Euskadi Open Data portal.

Common integrations

  • Regional Mobile Applications: Developers can integrate Euskalmet data into mobile apps providing local weather information for residents and tourists in the Basque Country.
  • Smart City Platforms: Integration with urban management systems to inform decisions related to traffic, public safety, and environmental monitoring.
  • Agricultural Management Systems: Providing farmers with localized forecasts for irrigation planning, crop protection, and harvest scheduling.
  • Environmental Monitoring: Used by research institutions and environmental agencies to study regional climate change and atmospheric conditions.
  • Public Safety and Emergency Services: Supplying real-time weather alerts and forecasts to support emergency response planning.

Alternatives

  • Open-Meteo: Offers a free weather API with global coverage, focusing on open-source weather models.
  • Tomorrow.io: Provides hyper-local, minute-by-minute weather forecasts and weather intelligence for various industries globally.
  • AccuWeather API: A commercial weather API offering global forecasts, historical data, and severe weather alerts.
  • OpenWeatherMap API: Provides current weather data, forecasts, and historical data for various locations worldwide, with both free and paid tiers.
  • Meteomatics API: Offers a comprehensive weather API with access to a wide range of weather parameters, including historical, real-time, and forecast data, with global coverage.

Getting started

To begin using the Euskalmet API, you will typically need to register for an API key through the Euskadi Open Data portal. Once you have your key, you can make requests to the API endpoints to retrieve weather data. The following Python example demonstrates how to fetch a general forecast for a specific location using a hypothetical API endpoint and key, based on common API patterns for weather services. Please consult the official Euskalmet API documentation for exact endpoint URLs and parameter specifications.

import requests
import json

# Replace with your actual API key and the correct endpoint URL
API_KEY = "YOUR_EUSKALMET_API_KEY"
BASE_URL = "https://opendata.euskadi.eus/api/euskalmet/v1/forecast"

# Example: Fetching a general forecast for a specific municipality (e.g., Bilbao)
# The actual parameters might vary, consult official documentation.
municipality_code = "48020" # Example code for Bilbao; check Euskalmet docs for specific codes

headers = {
    "Accept": "application/json",
    "Authorization": f"Bearer {API_KEY}" # Euskalmet might use a different auth method (e.g., query param)
}

params = {
    "code": municipality_code,
    "language": "es" # or "eu" for Euskera
}

try:
    response = requests.get(BASE_URL, headers=headers, params=params)
    response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
    
    forecast_data = response.json()
    print(json.dumps(forecast_data, indent=2))
    
    # Example of parsing specific data (structure will depend on Euskalmet's response)
    if "predictions" in forecast_data:
        print("\n--- Today's Forecast ---")
        for day_forecast in forecast_data["predictions"]:
            print(f"Date: {day_forecast.get('date')}")
            print(f"Description: {day_forecast.get('description')}")
            print(f"Min Temp: {day_forecast.get('minTemperature')}°C")
            print(f"Max Temp: {day_forecast.get('maxTemperature')}°C")
            break # Just show today's forecast for brevity

except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err}")
except requests.exceptions.ConnectionError as conn_err:
    print(f"Connection error occurred: {conn_err}")
except requests.exceptions.Timeout as timeout_err:
    print(f"Timeout error occurred: {timeout_err}")
except requests.exceptions.RequestException as req_err:
    print(f"An unexpected error occurred: {req_err}")
except json.JSONDecodeError:
    print("Failed to decode JSON response.")
    print("Response content:", response.text)

This Python script initializes with a placeholder API key and base URL. It then constructs a request to a hypothetical forecast endpoint, including parameters for a specific municipality code and language. The response is expected to be in JSON format, which the script attempts to parse and print. Error handling is included to catch common issues like network problems or bad HTTP responses. Always refer to the official Euskalmet API documentation for the most accurate and up-to-date information on endpoints, required parameters, and authentication methods.