{
  "openapi": "3.0.1",
  "info": {
    "title": "Weather API - Meteomatics Forecast, Historical and Station Data",
    "description": "Weather forecast and historical weather data from the Meteomatics Weather API: 1,800+ parameters such as temperature, precipitation, wind, solar radiation and snow, at 90 m resolution from ECMWF, GFS, ERA5 and more, plus weather station observations and MOS forecasts. Bring your own key.",
    "version": "0.1",
    "x-build-id": "HbiMbTU2vpMg2NNMW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~weather-forecast-historical-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-weather-forecast-historical-data-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~weather-forecast-historical-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-weather-forecast-historical-data-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~weather-forecast-historical-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-weather-forecast-historical-data-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "forecastHistory",
              "stationObservations",
              "stationForecast",
              "findStations"
            ],
            "type": "string",
            "description": "Weather forecast and history reads any of the 1,800+ Meteomatics parameters for coordinates or postal codes from the source you pick, from 1940 to weeks ahead. Station observations reads measured values from weather stations (source mix-obs). Station MOS forecasts reads statistically corrected forecasts for stations (source mm-mos). Find weather stations lists stations near a point, in a box or in a country, with the ids to use in the station modes.",
            "default": "forecastHistory"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Time series modes. One per line. Weather forecast and history: latitude,longitude in decimal degrees (52.52,13.405) or a postal code written postal_<country><zip> (postal_CH9014, postal_US10001). Station modes: a station id (wmo_066810, metar_LSZH, amda_P100, cman_mrka2, mch_LUG) or latitude,longitude for the nearest station. Up to 10 locations go in one request.",
            "items": {
              "type": "string"
            }
          },
          "parameters": {
            "title": "Parameters",
            "type": "array",
            "description": "Meteomatics parameters with their unit, one per line, such as t_2m:C (temperature 2 m above ground in Celsius), t_2m:F, precip_24h:mm, wind_speed_10m:kmh, wind_dir_10m:d, msl_pressure:hPa, global_rad:W, uv:idx, weather_symbol_1h:idx, fresh_snow_24h:cm or sunrise:sql. See the Available Parameters list on meteomatics.com. Empty reads temperature, precipitation, wind speed and humidity. Find weather stations: only stations measuring these.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start time",
            "type": "string",
            "description": "Time series modes. ISO 8601 UTC time such as 2026-10-20T06:00Z or a date such as 2020-01-01, or a shortcut: now, now-6H, todayT00Z, yesterdayT12Z, tomorrow. Empty means now."
          },
          "endDate": {
            "title": "End time",
            "type": "string",
            "description": "Time series modes. Same notation, such as 2026-10-22T00:00Z or now+48H. Empty reads the start time only."
          },
          "interval": {
            "title": "Time step",
            "enum": [
              "PT5M",
              "PT10M",
              "PT15M",
              "PT30M",
              "PT1H",
              "PT3H",
              "PT6H",
              "PT12H",
              "P1D"
            ],
            "type": "string",
            "description": "Time series modes. Spacing between the start and end time. Accumulated parameters such as precip_1h:mm cover the period before each step.",
            "default": "PT1H"
          },
          "validDateTime": {
            "title": "Advanced: raw valid date time",
            "type": "string",
            "description": "Time series modes. Overrides start, end and step with the full Meteomatics notation, such as 2026-10-20T00Z--2026-10-27T00Z:P1D, 2026-10-20T00ZP2D:PT6H or a comma separated list of times."
          },
          "source": {
            "title": "Model or source",
            "enum": [
              "mix",
              "ecmwf-ifs",
              "ecmwf-ens",
              "ecmwf-aifs",
              "ecmwf-aifs-ens",
              "ai-graphcast-ecmwf-ifs",
              "ai-fourcast-ecmwf-ifs",
              "ncep-gfs",
              "ncep-gfs-ens",
              "ukmo-um10",
              "dwd-icon-global",
              "dwd-icon-eu",
              "dwd-icon-d2",
              "cmc-gem",
              "mm-euro1k",
              "mm-us1k",
              "ncep-hrrr",
              "mf-arome",
              "ecmwf-vareps",
              "ecmwf-mmsf",
              "ecmwf-era5",
              "ecmwf-cams",
              "ecmwf-wam",
              "mix-radar",
              "mix-satellite",
              "mm-tides"
            ],
            "type": "string",
            "description": "Weather forecast and history only. The default Meteomatics Mix blends radar, satellite, stations and models at up to 90 m resolution. Pick ECMWF ERA5 for long historical series, or a single model to compare forecasts. Your licence decides which sources you can read.",
            "default": "mix"
          },
          "ensembleSelect": {
            "title": "Ensemble members",
            "type": "string",
            "description": "Ensemble sources only (ECMWF ENS, AIFS ENS, GEFS, VAREPS, seasonal). member:1, member:1-50, mean, median, spread or a quantile such as quantile0.9, comma separated. Empty returns the control run."
          },
          "calibrated": {
            "title": "Calibrate with station measurements",
            "type": "boolean",
            "description": "Weather forecast and history only. Calibrates historical data and the first 6 hours of forecast with nearby station measurements.",
            "default": false
          },
          "mask": {
            "title": "Land or sea mask",
            "enum": [
              "none",
              "land",
              "sea"
            ],
            "type": "string",
            "description": "Weather forecast and history only. Return values only over land or only over sea.",
            "default": "none"
          },
          "onInvalid": {
            "title": "Missing station data",
            "enum": [
              "fill_with_invalid",
              "fail"
            ],
            "type": "string",
            "description": "Station modes only. How gaps in station records are handled. Filled gaps are flagged in the reservedValues column.",
            "default": "fill_with_invalid"
          },
          "stationSearchArea": {
            "title": "Station search area",
            "type": "string",
            "description": "Find weather stations only. latitude,longitude for the nearest stations (47.3,9.3), a bounding box written max_lat,min_lon_min_lat,max_lon (47.9,5.8_45.8,10.5), or a country shortcut such as germany or switzerland."
          },
          "stationElevation": {
            "title": "Station elevation (m)",
            "minimum": -500,
            "maximum": 9000,
            "type": "integer",
            "description": "Find weather stations only. Prefer stations near this height above sea level; the offset is in the verticalDistanceM column."
          },
          "stationsSince": {
            "title": "Recording since",
            "type": "string",
            "description": "Find weather stations only. Only stations recording at least since this date, such as 2018-01-01."
          },
          "stationsUntil": {
            "title": "Recording until",
            "type": "string",
            "description": "Find weather stations only. Only stations recording at least until this date, such as 2026-10-01."
          },
          "stationNetwork": {
            "title": "Station network",
            "enum": [
              "observations",
              "mos"
            ],
            "type": "string",
            "description": "Find weather stations only. Stations with measured observations, or stations with MOS forecasts.",
            "default": "observations"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. One row is one location at one valid time, or one station.",
            "default": 200
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Pacing. The free Basic account allows 50 queries a minute and 500 a day; a limit answer is waited out a few times before the run ends cleanly.",
            "default": 30
          },
          "apiKey": {
            "title": "API username",
            "type": "string",
            "description": "Your own Meteomatics Weather API username, from the email Meteomatics sent when your account was set up (not your website login). Stored as a secret and sent only in the HTTP Basic Authorization header to api.meteomatics.com. You can instead set the DATA_API_KEY environment secret to username:password."
          },
          "apiSecret": {
            "title": "API password",
            "type": "string",
            "description": "Your own Meteomatics Weather API password. Stored as a secret, sent only in the Authorization header and never logged. You can instead set the DATA_API_SECRET environment secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}