Accumulated Parameters API

Accumulated temperature and precipitation totals over a historical time window, primarily for agriculture and energy applications. Available on Professional and Expert plans.

OpenAPI Specification

openweathermap-accumulated-parameters-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: OpenWeatherMap Accumulated Parameters API
  version: 2.5.0
  description: >-
    Returns accumulated temperature and accumulated precipitation totals over a
    user-specified historical time window. Targeted at agricultural and
    energy-sector applications. Available on Professional and Expert plans.
  contact:
    name: OpenWeather
    url: https://openweathermap.org/api/accumulated-parameters
  license:
    name: Creative Commons Attribution-ShareAlike 4.0 International
    url: https://creativecommons.org/licenses/by-sa/4.0/
servers:
  - url: https://history.openweathermap.org/data/2.5/history
    description: Accumulated Parameters API base URL
paths:
  /accumulated_temperature:
    get:
      operationId: getAccumulatedTemperature
      summary: Accumulated Temperature For A Time Window
      description: >-
        Returns the sum of daily mean temperatures above an optional threshold
        for the supplied coordinates and time window.
      tags:
        - Accumulated Parameters
      parameters:
        - $ref: '#/components/parameters/Lat'
        - $ref: '#/components/parameters/Lon'
        - name: start
          in: query
          required: true
          description: Unix UTC start timestamp.
          schema:
            type: integer
            format: int64
        - name: end
          in: query
          required: true
          description: Unix UTC end timestamp.
          schema:
            type: integer
            format: int64
        - name: threshold
          in: query
          required: false
          description: Minimum temperature value to include in the accumulation.
          schema:
            type: number
            format: float
        - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Accumulated temperature response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccumulatedTemperatureItem'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /accumulated_precipitation:
    get:
      operationId: getAccumulatedPrecipitation
      summary: Accumulated Precipitation For A Time Window
      description: >-
        Returns the sum of precipitation for the supplied coordinates and time
        window.
      tags:
        - Accumulated Parameters
      parameters:
        - $ref: '#/components/parameters/Lat'
        - $ref: '#/components/parameters/Lon'
        - name: start
          in: query
          required: true
          description: Unix UTC start timestamp.
          schema:
            type: integer
            format: int64
        - name: end
          in: query
          required: true
          description: Unix UTC end timestamp.
          schema:
            type: integer
            format: int64
        - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Accumulated precipitation response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccumulatedPrecipitationItem'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
components:
  parameters:
    Lat:
      name: lat
      in: query
      required: true
      description: Latitude in decimal degrees.
      schema:
        type: number
        format: float
    Lon:
      name: lon
      in: query
      required: true
      description: Longitude in decimal degrees.
      schema:
        type: number
        format: float
    Appid:
      name: appid
      in: query
      required: true
      description: OpenWeather API key.
      schema:
        type: string
  schemas:
    AccumulatedTemperatureItem:
      type: object
      properties:
        date:
          type: integer
          format: int64
        temp:
          type: number
          format: float
        count:
          type: integer
    AccumulatedPrecipitationItem:
      type: object
      properties:
        date:
          type: integer
          format: int64
        rain:
          type: number
          format: float
        count:
          type: integer
  securitySchemes:
    appid:
      type: apiKey
      in: query
      name: appid
security:
  - appid: []
tags:
  - name: Accumulated Parameters
    description: Accumulated temperature and precipitation totals for agriculture.