batch_get_historical_weather
Retrieve historical weather data for multiple locations in one request, enabling climate comparisons across cities over the same time period.
Instructions
Get historical weather data for multiple locations in a single API call.
This tool uses Open-Meteo's native batch support to fetch historical weather for many locations at once. All locations share the same date range.
Args: latitudes: Comma-separated latitude values for all locations. Example: "51.51,48.86,52.52" Must have the same number of values as longitudes. longitudes: Comma-separated longitude values for all locations. Example: "-0.13,2.35,13.41" Must have the same number of values as latitudes. start_date: Start date in YYYY-MM-DD format (shared across all locations) end_date: End date in YYYY-MM-DD format (shared across all locations) 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 hourly: Comma-separated hourly variables (same as get_historical_weather). daily: Comma-separated daily variables (same as get_historical_weather).
Returns: BatchHistoricalWeatherResponse: Contains: - results: List of BatchHistoricalWeatherItem, each with location_index and weather - total_locations: Number of locations queried
Tips for LLMs: - Use batch_geocode_locations first to get coordinates - All locations share the same date range - if you need different dates per location, use separate get_historical_weather calls - Results are in the SAME ORDER as the input coordinates - Useful for climate comparisons across cities for the same time period
Example: # Compare last week's weather across European capitals result = await batch_get_historical_weather( latitudes="51.51,48.86,52.52", longitudes="-0.13,2.35,13.41", start_date="2025-01-01", end_date="2025-01-07", daily="temperature_2m_max,temperature_2m_min,precipitation_sum" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | ||
| hourly | No | ||
| end_date | Yes | ||
| timezone | No | auto | |
| latitudes | Yes | ||
| longitudes | Yes | ||
| start_date | Yes | ||
| wind_speed_unit | No | kmh | |
| temperature_unit | No | celsius | |
| precipitation_unit | No | mm |