Accumulated Parameters

The Accumulated Parameters include accumulated temperature and accumulated precipitation.

  • Accumulated temperature is the sum, counted in degrees, by which the actual air temperature rises above or falls below a threshold level during the chosen time period.
  • Accumulated precipitation is the sum, counted in millimeters, of daily precipitation during the chosen time period.

Accumulated temperature

Call accumulated temperature data by city ID, city name and geo coordinates.

By city name

API call

http://history.openweathermap.org/data/2.5/history/accumulated_temperature?q={city name}&start={start}&end={end}&threshold={threshold}&appid={API key}
Parameters
q required City name, state code and country code divided by comma, use ISO 3166 country codes.

You can specify the parameter not only in English. In this case, the API response should be returned in the same language as the language of requested location name if the location is in our predefined list of more than 200,000 locations.

start required Start date (unix time, UTC time zone), e.g. start=1586853378
end required End date (unix time, UTC time zone), e.g. end=1589445367
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
threshold optional All values smaller than indicated value are not taken into account

Example of API call

http://history.openweathermap.org/data/2.5/history/accumulated_temperature?q=London,GB&start=1586853378&end=1589445367&threshold=284&appid={API key}

By city ID

API call

http://history.openweathermap.org/data/2.5/history/accumulated_temperature?id={city ID}&start={start}&end={end}&threshold={threshold}&appid={API key}
Parameters
id required City ID. The list of city IDs 'city.list.json.gz' can be downloaded here.
start required Start date (unix time, UTC time zone), e.g. start=1586853378
end required End date (unix time, UTC time zone), e.g. end=1589445367
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
threshold optional All values smaller than indicated value are not taken into account

Example of API call

http://history.openweathermap.org/data/2.5/history/accumulated_temperature?id=2885679&start=1586853378&end=1589445367&threshold=284&appid={API key}

By geographic coordinates

API call

http://history.openweathermap.org/data/2.5/history/accumulated_temperature?lat={lat}&lon={lon}&start={start}&end={end}&threshold={threshold}&appid={API key}
Parameters
lat, lon required Geographical coordinates (latitude, longitude)
start required Start date (unix time, UTC time zone), e.g. start=1586853378
end required End date (unix time, UTC time zone), e.g. end=1589445367
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
threshold optional All values smaller than indicated value are not taken into account

Example of API call

http://history.openweathermap.org/data/2.5/history/accumulated_temperature?lat=51.51&lon=-0.13&start=1586853378&end=1589445367&threshold=284&appid={API key}

Example of API response

                    
{
  "date": "2020-4-17",
  "temp": 574.37,
  "count": 2
},
                    
                 

Fields in API response

  • date Date
  • temp Temperature accumulated indicator, Kelvin
  • count Number of data measurements

Accumulated precipitation

Call accumulated precipitation data by city ID, city name and geo coordinates.

By city name

API call

http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?q={city name}&start={start}&end={end}&appid={API key}
Parameters
q required City name, state code and country code divided by comma, use ISO 3166 country codes.

You can specify the parameter not only in English. In this case, the API response should be returned in the same language as the language of requested location name if the location is in our predefined list of more than 200,000 locations.

start required Start date (unix time, UTC time zone), e.g. start=1586853378
end required End date (unix time, UTC time zone), e.g. end=1589445367
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

Example of API call

http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?q=London,GB&start=1586853378&end=1589445367&appid={API key}

By city ID

API call

http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?id={city ID}&start={start}&end={end}&appid={API key}
Parameters
id required City ID. The list of city IDs 'city.list.json.gz' can be downloaded here.
start required Start date (unix time, UTC time zone), e.g. start=1586853378
end required End date (unix time, UTC time zone), e.g. end=1589445367
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

By geographic coordinates

API call

http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?lat={lat}&lon={lon}&start={start}&end={end}&appid={API key}
Parameters
lat, lon required Geographical coordinates (latitude, longitude)
start required Start date (unix time, UTC time zone), e.g. start=1586853378
end required End date (unix time, UTC time zone), e.g. end=1589445367
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

Example of API call

http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?lat=51.51&lon=-0.12&start=1586853378&end=1589445367&appid={API key}

Example of API response

                       
{
  "date": "2020-4-15",
  "rain": 0.6,
  "count": 2
},
                       
                    

Fields in API response

  • date Date
  • rain Precipitation accumulation indicator, mm
  • count Number of data measurements
The threshold parameter is not used. The whole ammount of precipitation data is provided for specified period.