batch_get_weather_forecasts
Retrieve weather forecasts for multiple locations simultaneously using a single API call, supporting up to 1000 locations for faster data collection.
Instructions
Get weather forecasts for multiple locations in a single API call.
This tool uses Open-Meteo's native batch support to fetch forecasts for up to 1000 locations in ONE HTTP request. This is dramatically faster than calling get_weather_forecast repeatedly.
Use batch_geocode_locations first to get coordinates, then pass them here.
Args: latitudes: Comma-separated latitude values for all locations. Example: "51.51,48.86,52.52" (London, Paris, Berlin) Must have the same number of values as longitudes. longitudes: Comma-separated longitude values for all locations. Example: "-0.13,2.35,13.41" (London, Paris, Berlin) Must have the same number of values as latitudes. temperature_unit: Temperature unit - "celsius" (default) or "fahrenheit" wind_speed_unit: Wind speed unit - "kmh" (default), "ms", "mph", "kn" precipitation_unit: Precipitation unit - "mm" (default) or "inch" timezone: Timezone name or "auto" for automatic detection per location forecast_days: Number of forecast days (1-16). Default is 7. current_weather: Include current weather conditions. Default is True. hourly: Comma-separated hourly variables (same as get_weather_forecast). Popular: temperature_2m, precipitation, wind_speed_10m, cloud_cover daily: Comma-separated daily variables (same as get_weather_forecast). Popular: temperature_2m_max, temperature_2m_min, precipitation_sum
Returns: BatchWeatherForecastResponse: Contains: - results: List of BatchWeatherForecastItem, each with location_index and forecast - total_locations: Number of locations queried
Tips for LLMs: - ALWAYS use batch_geocode_locations first to get coordinates - The forecasts are returned in the SAME ORDER as the input coordinates - All locations share the same forecast parameters (hourly, daily, units) - For different parameters per location, make separate get_weather_forecast calls - Maximum ~1000 locations per call (Open-Meteo API limit) - The latitudes and longitudes strings must have equal numbers of comma-separated values
Workflow for "What's the weather across the UK?": 1. batch_geocode_locations("London,Manchester,Edinburgh,Cardiff,Belfast,Birmingham") 2. Extract latitudes and longitudes from successful results 3. batch_get_weather_forecasts(latitudes="51.51,53.48,55.95,...", longitudes="-0.13,-2.24,-3.19,...") 4. Present the weather comparison to the user
Example: # Get weather for London, Paris, and Berlin forecasts = await batch_get_weather_forecasts( latitudes="51.51,48.86,52.52", longitudes="-0.13,2.35,13.41", current_weather=True, daily="temperature_2m_max,temperature_2m_min,precipitation_sum" ) for item in forecasts.results: f = item.forecast print(f"Location {item.location_index}: {f.current_weather.temperature}C")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | ||
| hourly | No | ||
| timezone | No | auto | |
| latitudes | Yes | ||
| longitudes | Yes | ||
| forecast_days | No | ||
| current_weather | No | ||
| wind_speed_unit | No | kmh | |
| temperature_unit | No | celsius | |
| precipitation_unit | No | mm |