logo_smallAxellero.io

OpenWeather

Comprehensive weather data and forecasting services with OpenWeatherMap API integration and location-based air quality monitoring.

OpenWeather Node

Professional integration with OpenWeatherMap API, providing comprehensive weather data, forecasting services, air quality monitoring, and location-based weather alerts for automated weather workflows.

Available Operations

  • Location Services: Search and geocode locations for weather data retrieval
  • Current Weather: Real-time weather conditions with comprehensive meteorological data
  • Weather Forecasting: Multi-day and hourly weather predictions with detailed parameters
  • Air Quality Monitoring: Current air pollution levels and health index data
  • Weather Alerts: Government-issued weather warnings and emergency notifications

Connection Configuration

ParameterTypeRequiredDescription
apiKeyTEXTYesOpenWeatherMap API key for authentication
defaultUnitsTEXTNoDefault units system: 'metric', 'imperial', or 'kelvin'
defaultLanguageTEXTNoDefault language code for weather descriptions
{
  "apiKey": "{{ctx.consts.OPENWEATHER_API_KEY}}",
  "defaultUnits": "{{ctx.vars.preferredUnits}}",
  "defaultLanguage": "{{ctx.user.languageCode}}"
}

Location Services

searchLocation

Search for geographic locations by name and retrieve coordinates for weather queries.

ParameterTypeRequiredDescription
locationNameTEXTYesName of the location to search for
countryCodeTEXTNoISO 3166 country code to filter results
limitINTNoMaximum number of results to return (1-5, default: 5)
{
  "locationName": "{{ctx.vars.cityName}}",
  "countryCode": "{{ctx.vars.countryFilter}}",
  "limit": 3
}

Current Weather Operations

getCurrentWeather

Retrieve real-time weather conditions for specified geographic coordinates.

ParameterTypeRequiredDescription
latFRACTIONALYesLatitude coordinate (-90 to 90)
lonFRACTIONALYesLongitude coordinate (-180 to 180)
unitsTEXTNoUnits system: 'metric', 'imperial', or 'kelvin'
langTEXTNoLanguage code for weather descriptions
{
  "lat": "{{ctx.vars.latitude}}",
  "lon": "{{ctx.vars.longitude}}",
  "units": "{{ctx.vars.unitSystem}}",
  "lang": "{{ctx.user.locale}}"
}

Weather Forecasting Operations

getWeatherForecast

Get daily weather forecast for specified coordinates and time period.

ParameterTypeRequiredDescription
latFRACTIONALYesLatitude coordinate (-90 to 90)
lonFRACTIONALYesLongitude coordinate (-180 to 180)
daysINTNoNumber of forecast days (1-8, default: 7)
unitsTEXTNoUnits system: 'metric', 'imperial', or 'kelvin'
langTEXTNoLanguage code for weather descriptions
{
  "lat": "{{ctx.vars.targetLatitude}}",
  "lon": "{{ctx.vars.targetLongitude}}",
  "days": 5,
  "units": "metric",
  "lang": "{{ctx.vars.reportLanguage}}"
}

getHourlyForecast

Get detailed hourly weather forecast for up to 48 hours.

ParameterTypeRequiredDescription
latFRACTIONALYesLatitude coordinate (-90 to 90)
lonFRACTIONALYesLongitude coordinate (-180 to 180)
hoursINTNoNumber of forecast hours (1-48, default: 48)
unitsTEXTNoUnits system: 'metric', 'imperial', or 'kelvin'
langTEXTNoLanguage code for weather descriptions
{
  "lat": "{{ctx.nodes.locationLookup.outputs.latitude}}",
  "lon": "{{ctx.nodes.locationLookup.outputs.longitude}}",
  "hours": 24,
  "units": "{{ctx.consts.DEFAULT_UNITS}}",
  "lang": "en"
}

Air Quality Operations

getCurrentAirQuality

Retrieve current air quality index and pollutant concentrations for environmental monitoring.

ParameterTypeRequiredDescription
latFRACTIONALYesLatitude coordinate (-90 to 90)
lonFRACTIONALYesLongitude coordinate (-180 to 180)
{
  "lat": "{{ctx.vars.monitoringLatitude}}",
  "lon": "{{ctx.vars.monitoringLongitude}}"
}

Weather Alert Operations

getWeatherAlerts

Retrieve government-issued weather alerts and warnings for specified coordinates.

ParameterTypeRequiredDescription
latFRACTIONALYesLatitude coordinate (-90 to 90)
lonFRACTIONALYesLongitude coordinate (-180 to 180)
langTEXTNoLanguage code for alert descriptions
{
  "lat": "{{ctx.vars.alertLatitude}}",
  "lon": "{{ctx.vars.alertLongitude}}",
  "lang": "{{ctx.user.preferredLanguage}}"
}

Workflow Integration

Use workflow context for dynamic weather data processing:

{
  "locationName": "{{ctx.vars.targetCity}}, {{ctx.vars.targetCountry}}",
  "lat": "{{ctx.nodes.geocoder.outputs.coordinates.lat}}",
  "lon": "{{ctx.nodes.geocoder.outputs.coordinates.lon}}",
  "units": "{{ctx.user.preferences.units}}",
  "lang": "{{ctx.user.locale}}",
  "days": "{{ctx.vars.forecastPeriod}}"
}

Units System Specifications

SystemTemperatureWind SpeedPressureDescription
metricCelsius (°C)m/shPaInternational standard
imperialFahrenheit (°F)mphhPaUS customary units
kelvinKelvin (K)m/shPaScientific measurements

Air Quality Index Levels

AQI LevelValueDescriptionHealth Impact
Good1Air quality is satisfactoryNo health concerns
Fair2Acceptable air qualitySensitive individuals may experience minor issues
Moderate3Unhealthy for sensitive groupsSensitive groups may experience health effects
Poor4Unhealthy for everyoneHealth effects for general population
Very Poor5Health alert conditionsEmergency health warnings

Monitored Pollutants

PollutantDescriptionHealth Effects
COCarbon monoxideReduces oxygen delivery to organs
NONitrogen monoxideRespiratory irritation
NO2Nitrogen dioxideLung inflammation and reduced immunity
O3OzoneRespiratory problems and lung damage
SO2Sulfur dioxideRespiratory tract irritation
PM2.5Fine particulate matterDeep lung penetration, cardiovascular effects
PM10Coarse particulate matterRespiratory irritation and inflammation
NH3AmmoniaEye and respiratory irritation

Response Format

Current Weather Response

{
  "success": true,
  "weather": {
    "location": {
      "name": "New York",
      "country": "US",
      "timezone": "America/New_York"
    },
    "current": {
      "temperature": 22.5,
      "feelsLike": 24.1,
      "humidity": 65,
      "pressure": 1013.25,
      "windSpeed": 3.2,
      "windDirection": 180,
      "visibility": 10000,
      "uvIndex": 6,
      "cloudiness": 25,
      "description": "partly cloudy",
      "icon": "02d"
    },
    "sun": {
      "sunrise": "2024-12-13T11:32:00Z",
      "sunset": "2024-12-13T21:45:00Z"
    }
  }
}

Weather Forecast Response

{
  "success": true,
  "forecast": {
    "location": {
      "lat": 40.7128,
      "lon": -74.0060
    },
    "daily": [
      {
        "date": "2024-12-13",
        "temperature": {
          "min": 18.2,
          "max": 25.8,
          "morning": 20.1,
          "afternoon": 24.5,
          "evening": 22.3,
          "night": 19.7
        },
        "weather": {
          "description": "light rain",
          "icon": "10d"
        },
        "precipitation": {
          "probability": 0.75,
          "volume": 2.3
        },
        "wind": {
          "speed": 4.2,
          "direction": 225,
          "gusts": 7.1
        }
      }
    ]
  }
}

Air Quality Response

{
  "success": true,
  "airQuality": {
    "location": {
      "lat": 40.7128,
      "lon": -74.0060
    },
    "aqi": {
      "level": 2,
      "description": "Fair"
    },
    "pollutants": {
      "co": 233.4,
      "no": 0.12,
      "no2": 16.78,
      "o3": 89.23,
      "so2": 1.45,
      "pm2_5": 8.15,
      "pm10": 12.67,
      "nh3": 0.34
    },
    "timestamp": "2024-12-13T14:00:00Z"
  }
}

Weather Alerts Response

{
  "success": true,
  "alerts": [
    {
      "event": "Severe Thunderstorm Warning",
      "start": "2024-12-13T18:00:00Z",
      "end": "2024-12-13T22:00:00Z",
      "description": "Severe thunderstorms with damaging winds and large hail",
      "severity": "severe",
      "urgency": "immediate",
      "certainty": "likely",
      "areas": ["Manhattan", "Brooklyn", "Queens"],
      "tags": ["thunderstorm", "wind", "hail"]
    }
  ]
}

Error Response

{
  "success": false,
  "error": "Invalid coordinates",
  "code": "INVALID_PARAM_RANGE",
  "details": "Latitude must be between -90 and 90 degrees"
}

Language Support

Supported Language Codes

CodeLanguageCodeLanguage
enEnglishfrFrench
esSpanishdeGerman
ptPortugueseitItalian
ruRussianjaJapanese
zhChinesekoKorean
arArabichiHindi

Use Cases

Weather Monitoring & Alerts

  • Agricultural Management: Monitor weather conditions for crop planning and harvest timing
  • Event Planning: Check weather forecasts for outdoor events and activities
  • Travel Optimization: Plan travel routes based on weather conditions and alerts
  • Emergency Preparedness: Monitor severe weather warnings and air quality alerts

Environmental Tracking

  • Air Quality Monitoring: Track pollution levels for health and environmental compliance
  • Climate Research: Collect weather data for analysis and trend identification
  • Public Health: Monitor air quality for vulnerable population alerts
  • Smart City Integration: Integrate weather data into urban management systems

Business Intelligence

  • Retail Analytics: Correlate weather data with sales patterns and inventory planning
  • Supply Chain Optimization: Adjust logistics based on weather forecasts and conditions
  • Energy Management: Optimize energy consumption based on weather predictions
  • Insurance Assessment: Analyze weather risks for property and agricultural insurance

Automation Workflows

  • Smart Home Integration: Automate heating, cooling, and irrigation based on weather data
  • Fleet Management: Route optimization and safety alerts based on weather conditions
  • Construction Planning: Schedule construction activities based on weather forecasts
  • Agricultural Automation: Automate irrigation, fertilization, and harvesting based on conditions

API Limits and Best Practices

Rate Limits

  • Free Plan: 60 calls/minute, 1,000 calls/day
  • Paid Plans: Higher limits based on subscription tier
  • Geocoding: 1 call/second maximum

Best Practices

  • Coordinate Caching: Store location coordinates to reduce geocoding API calls
  • Data Caching: Cache weather data for frequently requested locations
  • Batch Processing: Group multiple location requests when possible
  • Error Handling: Implement retry logic for temporary API failures and rate limits

Getting Started

  1. API Key Setup: Register at OpenWeatherMap and obtain API key from account dashboard
  2. Test Basic Operations: Start with location search and current weather retrieval
  3. Configure Units and Language: Set appropriate defaults for your use case and region
  4. Implement Caching: Add intelligent caching to optimize API usage and performance
  5. Monitor Usage: Track API calls and implement usage analytics for cost optimization

Security Considerations

  • API Key Protection: Store API keys securely using environment variables
  • Rate Limit Management: Implement proper rate limiting to prevent service disruptions
  • Data Privacy: Handle location data according to privacy regulations
  • Error Logging: Monitor API errors while avoiding exposure of sensitive information