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
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | TEXT | Yes | OpenWeatherMap API key for authentication |
defaultUnits | TEXT | No | Default units system: 'metric', 'imperial', or 'kelvin' |
defaultLanguage | TEXT | No | Default 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
locationName | TEXT | Yes | Name of the location to search for |
countryCode | TEXT | No | ISO 3166 country code to filter results |
limit | INT | No | Maximum 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | FRACTIONAL | Yes | Latitude coordinate (-90 to 90) |
lon | FRACTIONAL | Yes | Longitude coordinate (-180 to 180) |
units | TEXT | No | Units system: 'metric', 'imperial', or 'kelvin' |
lang | TEXT | No | Language 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | FRACTIONAL | Yes | Latitude coordinate (-90 to 90) |
lon | FRACTIONAL | Yes | Longitude coordinate (-180 to 180) |
days | INT | No | Number of forecast days (1-8, default: 7) |
units | TEXT | No | Units system: 'metric', 'imperial', or 'kelvin' |
lang | TEXT | No | Language 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | FRACTIONAL | Yes | Latitude coordinate (-90 to 90) |
lon | FRACTIONAL | Yes | Longitude coordinate (-180 to 180) |
hours | INT | No | Number of forecast hours (1-48, default: 48) |
units | TEXT | No | Units system: 'metric', 'imperial', or 'kelvin' |
lang | TEXT | No | Language 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | FRACTIONAL | Yes | Latitude coordinate (-90 to 90) |
lon | FRACTIONAL | Yes | Longitude 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | FRACTIONAL | Yes | Latitude coordinate (-90 to 90) |
lon | FRACTIONAL | Yes | Longitude coordinate (-180 to 180) |
lang | TEXT | No | Language 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
| System | Temperature | Wind Speed | Pressure | Description |
|---|---|---|---|---|
| metric | Celsius (°C) | m/s | hPa | International standard |
| imperial | Fahrenheit (°F) | mph | hPa | US customary units |
| kelvin | Kelvin (K) | m/s | hPa | Scientific measurements |
Air Quality Index Levels
| AQI Level | Value | Description | Health Impact |
|---|---|---|---|
| Good | 1 | Air quality is satisfactory | No health concerns |
| Fair | 2 | Acceptable air quality | Sensitive individuals may experience minor issues |
| Moderate | 3 | Unhealthy for sensitive groups | Sensitive groups may experience health effects |
| Poor | 4 | Unhealthy for everyone | Health effects for general population |
| Very Poor | 5 | Health alert conditions | Emergency health warnings |
Monitored Pollutants
| Pollutant | Description | Health Effects |
|---|---|---|
| CO | Carbon monoxide | Reduces oxygen delivery to organs |
| NO | Nitrogen monoxide | Respiratory irritation |
| NO2 | Nitrogen dioxide | Lung inflammation and reduced immunity |
| O3 | Ozone | Respiratory problems and lung damage |
| SO2 | Sulfur dioxide | Respiratory tract irritation |
| PM2.5 | Fine particulate matter | Deep lung penetration, cardiovascular effects |
| PM10 | Coarse particulate matter | Respiratory irritation and inflammation |
| NH3 | Ammonia | Eye 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
| Code | Language | Code | Language |
|---|---|---|---|
en | English | fr | French |
es | Spanish | de | German |
pt | Portuguese | it | Italian |
ru | Russian | ja | Japanese |
zh | Chinese | ko | Korean |
ar | Arabic | hi | Hindi |
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
- API Key Setup: Register at OpenWeatherMap and obtain API key from account dashboard
- Test Basic Operations: Start with location search and current weather retrieval
- Configure Units and Language: Set appropriate defaults for your use case and region
- Implement Caching: Add intelligent caching to optimize API usage and performance
- 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