OpenWeatherMap Forecast API

Weather forecasts at multiple granularities and time horizons.

Operations 4

GET /forecast Five Day Three Hour Forecast #
GET /forecast/hourly Four Day Hourly Forecast #
GET /forecast/daily Sixteen Day Daily Forecast #
GET /forecast/climate Thirty Day Climatic Forecast #

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-forecast-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-forecast-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenWeatherMap Forecast API
  version: 2.5.0
  description: OpenWeather forecast APIs including 5-day/3-hour forecast, Hourly Forecast 4 Days, Daily Forecast 16 Days, and Climatic Forecast 30 Days. These forecasts provide weather predictions at varying granularities and time horizons for any global coordinate.
  contact:
    name: OpenWeather
    url: https://openweathermap.org/api
  license:
    name: Creative Commons Attribution-ShareAlike 4.0 International
    url: https://creativecommons.org/licenses/by-sa/4.0/
servers:
- url: https://api.openweathermap.org/data/2.5
  description: 5-day/3-hour Forecast API base URL
- url: https://pro.openweathermap.org/data/2.5
  description: Pro forecast APIs base URL (Hourly Forecast 4 Days, Daily Forecast 16 Days, Climatic Forecast 30 Days)
security:
- appid: []
tags:
- name: Forecast
  description: Weather forecasts at multiple granularities and time horizons.
paths:
  /forecast:
    get:
      operationId: getForecastFiveDay
      summary: Five Day Three Hour Forecast
      description: Returns forecast weather data with 3-hour granularity for the next 5 days for the supplied latitude and longitude. Includes temperature, weather conditions, wind, precipitation probability, and more for 40 forecast timestamps.
      tags:
      - Forecast
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: cnt
        in: query
        required: false
        description: Number of timestamps to return. Defaults to 40.
        schema:
          type: integer
          minimum: 1
          maximum: 40
      - $ref: '#/components/parameters/Mode'
      - $ref: '#/components/parameters/Units'
      - $ref: '#/components/parameters/Lang'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Five day three hour forecast response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForecastResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized. Missing or invalid API key.
        '404':
          description: Location not found.
        '429':
          description: Too many requests.
  /forecast/hourly:
    get:
      operationId: getForecastHourly
      summary: Four Day Hourly Forecast
      description: Returns hourly forecast weather data for the next 4 days (up to 96 hourly timestamps) for the supplied latitude and longitude. Available on Developer, Professional, and Expert plans.
      tags:
      - Forecast
      servers:
      - url: https://pro.openweathermap.org/data/2.5
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: cnt
        in: query
        required: false
        description: Number of hourly timestamps to return. Up to 96.
        schema:
          type: integer
          minimum: 1
          maximum: 96
      - $ref: '#/components/parameters/Mode'
      - $ref: '#/components/parameters/Units'
      - $ref: '#/components/parameters/Lang'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Hourly forecast response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForecastResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /forecast/daily:
    get:
      operationId: getForecastDaily
      summary: Sixteen Day Daily Forecast
      description: Returns daily forecast weather data for up to 16 days for the supplied latitude and longitude. Each daily entry includes morning, day, evening, night, and min/max temperatures.
      tags:
      - Forecast
      servers:
      - url: https://pro.openweathermap.org/data/2.5
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: cnt
        in: query
        required: false
        description: Number of days to return. 1 to 16.
        schema:
          type: integer
          minimum: 1
          maximum: 16
      - $ref: '#/components/parameters/Mode'
      - $ref: '#/components/parameters/Units'
      - $ref: '#/components/parameters/Lang'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Daily forecast response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyForecastResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /forecast/climate:
    get:
      operationId: getForecastClimate
      summary: Thirty Day Climatic Forecast
      description: Returns daily climatic forecast weather data for the next 30 days for the supplied latitude and longitude.
      tags:
      - Forecast
      servers:
      - url: https://pro.openweathermap.org/data/2.5
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: cnt
        in: query
        required: false
        description: Number of days to return. 1 to 30.
        schema:
          type: integer
          minimum: 1
          maximum: 30
      - $ref: '#/components/parameters/Mode'
      - $ref: '#/components/parameters/Units'
      - $ref: '#/components/parameters/Lang'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Climatic forecast response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyForecastResponse'
        '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, range -180 to 180.
      schema:
        type: number
        format: float
    Mode:
      name: mode
      in: query
      required: false
      description: Response format. Default is JSON.
      schema:
        type: string
        enum:
        - json
        - xml
    Lang:
      name: lang
      in: query
      required: false
      description: Localization language code.
      schema:
        type: string
    Appid:
      name: appid
      in: query
      required: true
      description: OpenWeather API key.
      schema:
        type: string
    Units:
      name: units
      in: query
      required: false
      description: Units of measurement. standard, metric, or imperial.
      schema:
        type: string
        enum:
        - standard
        - metric
        - imperial
    Lat:
      name: lat
      in: query
      required: true
      description: Latitude in decimal degrees, range -90 to 90.
      schema:
        type: number
        format: float
  schemas:
    DailyForecastItem:
      type: object
      properties:
        dt:
          type: integer
          format: int64
        sunrise:
          type: integer
          format: int64
        sunset:
          type: integer
          format: int64
        temp:
          type: object
          properties:
            day:
              type: number
              format: float
            min:
              type: number
              format: float
            max:
              type: number
              format: float
            night:
              type: number
              format: float
            eve:
              type: number
              format: float
            morn:
              type: number
              format: float
        feels_like:
          type: object
          properties:
            day:
              type: number
              format: float
            night:
              type: number
              format: float
            eve:
              type: number
              format: float
            morn:
              type: number
              format: float
        pressure:
          type: integer
        humidity:
          type: integer
        weather:
          type: array
          items:
            $ref: '#/components/schemas/Weather'
        speed:
          type: number
          format: float
        deg:
          type: integer
        gust:
          type: number
          format: float
        clouds:
          type: integer
        rain:
          type: number
          format: float
        snow:
          type: number
          format: float
        pop:
          type: number
          format: float
    ForecastItem:
      type: object
      properties:
        dt:
          type: integer
          format: int64
        main:
          type: object
          properties:
            temp:
              type: number
              format: float
            feels_like:
              type: number
              format: float
            temp_min:
              type: number
              format: float
            temp_max:
              type: number
              format: float
            pressure:
              type: integer
            humidity:
              type: integer
        weather:
          type: array
          items:
            $ref: '#/components/schemas/Weather'
        clouds:
          type: object
          properties:
            all:
              type: integer
        wind:
          type: object
          properties:
            speed:
              type: number
              format: float
            deg:
              type: integer
            gust:
              type: number
              format: float
        visibility:
          type: integer
        pop:
          type: number
          format: float
        rain:
          type: object
          properties:
            3h:
              type: number
              format: float
        snow:
          type: object
          properties:
            3h:
              type: number
              format: float
        sys:
          type: object
          properties:
            pod:
              type: string
        dt_txt:
          type: string
    DailyForecastResponse:
      type: object
      properties:
        city:
          $ref: '#/components/schemas/City'
        cod:
          type: string
        message:
          type: number
        cnt:
          type: integer
        list:
          type: array
          items:
            $ref: '#/components/schemas/DailyForecastItem'
    City:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        coord:
          type: object
          properties:
            lat:
              type: number
              format: float
            lon:
              type: number
              format: float
        country:
          type: string
        population:
          type: integer
        timezone:
          type: integer
        sunrise:
          type: integer
          format: int64
        sunset:
          type: integer
          format: int64
    ForecastResponse:
      type: object
      properties:
        cod:
          type: string
        message:
          type: number
        cnt:
          type: integer
        list:
          type: array
          items:
            $ref: '#/components/schemas/ForecastItem'
        city:
          $ref: '#/components/schemas/City'
    Weather:
      type: object
      properties:
        id:
          type: integer
        main:
          type: string
        description:
          type: string
        icon:
          type: string
  securitySchemes:
    appid:
      type: apiKey
      in: query
      name: appid