OpenWeatherMap Statistical Weather API

Long-term statistical weather aggregates for any global location.

Operations 3

GET /aggregated/year Yearly Aggregated Weather Statistics #
GET /aggregated/month Monthly Aggregated Weather Statistics #
GET /aggregated/day Daily Aggregated Weather Statistics #

Documentation

Specifications

Schemas & Data

Other Resources

🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/current-weather-example.json
🔗
GraphQL
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/graphql/openweathermap-graphql.md
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/forecast-five-day-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/one-call-current-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/air-pollution-current-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/geocoding-direct-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/history-city-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/statistical-month-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/accumulated-temperature-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/solar-irradiance-interval-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/road-risk-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/weather-stations-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/openweathermap/refs/heads/main/examples/weather-maps-tile-example.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openweathermap-statistical-weather-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openweathermap-statistical-weather-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenWeatherMap Statistical Weather API
  version: 2.5.0
  description: Returns statistical data on main weather parameters (temperature, pressure, humidity, wind, precipitation, clouds) for any day or month of the year at a global location. Useful for climatology, agriculture, and long-range planning. Available on the Expert plan.
  contact:
    name: OpenWeather
    url: https://openweathermap.org/api/statistics-api
  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
  description: Statistical Weather API base URL
security:
- appid: []
tags:
- name: Statistical Weather
  description: Long-term statistical weather aggregates for any global location.
paths:
  /aggregated/year:
    get:
      operationId: getStatisticalAggregatedYear
      summary: Yearly Aggregated Weather Statistics
      description: Returns 365 groups of statistical weather data for each day of the calendar year for the supplied coordinates.
      tags:
      - Statistical Weather
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Yearly statistics response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatisticalResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /aggregated/month:
    get:
      operationId: getStatisticalAggregatedMonth
      summary: Monthly Aggregated Weather Statistics
      description: Returns aggregated monthly weather statistics for the supplied coordinates and month.
      tags:
      - Statistical Weather
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: month
        in: query
        required: true
        description: Month of the year, 1-12.
        schema:
          type: integer
          minimum: 1
          maximum: 12
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Monthly statistics response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatisticalResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /aggregated/day:
    get:
      operationId: getStatisticalAggregatedDay
      summary: Daily Aggregated Weather Statistics
      description: Returns aggregated daily weather statistics for the supplied coordinates, month, and day.
      tags:
      - Statistical Weather
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: month
        in: query
        required: true
        description: Month of the year, 1-12.
        schema:
          type: integer
          minimum: 1
          maximum: 12
      - name: day
        in: query
        required: true
        description: Day of the month, 1-31.
        schema:
          type: integer
          minimum: 1
          maximum: 31
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Daily statistics response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatisticalResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
components:
  parameters:
    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
    Lat:
      name: lat
      in: query
      required: true
      description: Latitude in decimal degrees.
      schema:
        type: number
        format: float
  schemas:
    StatisticalParameter:
      type: object
      properties:
        record_min:
          type: number
          format: float
        record_max:
          type: number
          format: float
        average_min:
          type: number
          format: float
        average_max:
          type: number
          format: float
        median:
          type: number
          format: float
        mean:
          type: number
          format: float
        p25:
          type: number
          format: float
        p75:
          type: number
          format: float
        st_dev:
          type: number
          format: float
        num:
          type: integer
    StatisticalResponse:
      type: object
      properties:
        cod:
          type: integer
        city_id:
          type: integer
        calctime:
          type: number
          format: float
        result:
          oneOf:
          - $ref: '#/components/schemas/StatisticalResult'
          - type: array
            items:
              $ref: '#/components/schemas/StatisticalResult'
    StatisticalResult:
      type: object
      properties:
        month:
          type: integer
        day:
          type: integer
        temp:
          $ref: '#/components/schemas/StatisticalParameter'
        pressure:
          $ref: '#/components/schemas/StatisticalParameter'
        humidity:
          $ref: '#/components/schemas/StatisticalParameter'
        wind:
          $ref: '#/components/schemas/StatisticalParameter'
        precipitation:
          $ref: '#/components/schemas/StatisticalParameter'
        clouds:
          $ref: '#/components/schemas/StatisticalParameter'
        sunshine_hours:
          type: number
          format: float
  securitySchemes:
    appid:
      type: apiKey
      in: query
      name: appid