{
  "openapi": "3.0.1",
  "info": {
    "title": "Weather Forecast & Historical Data",
    "description": "Scrapes weather forecasts, historical weather, and air quality data from the Open-Meteo API. Supports multi-location batch queries, 50+ weather variables, city name geocoding, and data going back to 1940. No API key required.",
    "version": "0.0",
    "x-build-id": "EwtPIBOjbCtM3XdVu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~weather-forecast-historical-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-weather-forecast-historical-data",
        "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/moving_beacon-owner1~weather-forecast-historical-data/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-weather-forecast-historical-data",
        "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/moving_beacon-owner1~weather-forecast-historical-data/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-weather-forecast-historical-data",
        "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",
        "required": [
          "mode",
          "locations"
        ],
        "properties": {
          "mode": {
            "title": "Data Mode",
            "enum": [
              "forecast",
              "historical",
              "air_quality"
            ],
            "type": "string",
            "description": "What type of weather data to fetch.",
            "default": "forecast"
          },
          "locations": {
            "title": "Locations",
            "type": "string",
            "description": "One location per line. Use either 'City, Country' names (auto-geocoded) or 'lat,lon' coordinates. Examples:\nLos Angeles, US\nLondon, UK\n48.8566,2.3522\nLahore, PK",
            "default": "New York, US\nLondon, UK\nTokyo, JP"
          },
          "dailyVariables": {
            "title": "Daily Variables",
            "type": "array",
            "description": "Select daily weather variables to fetch.",
            "items": {
              "type": "string",
              "enum": [
                "temperature_2m_max",
                "temperature_2m_min",
                "apparent_temperature_max",
                "apparent_temperature_min",
                "precipitation_sum",
                "rain_sum",
                "snowfall_sum",
                "precipitation_hours",
                "precipitation_probability_max",
                "weathercode",
                "sunrise",
                "sunset",
                "sunshine_duration",
                "daylight_duration",
                "windspeed_10m_max",
                "windgusts_10m_max",
                "winddirection_10m_dominant",
                "shortwave_radiation_sum",
                "et0_fao_evapotranspiration",
                "uv_index_max",
                "uv_index_clear_sky_max"
              ],
              "enumTitles": [
                "Max Temperature (2m)",
                "Min Temperature (2m)",
                "Max Apparent Temperature (feels like)",
                "Min Apparent Temperature (feels like)",
                "Total Precipitation",
                "Total Rain",
                "Total Snowfall",
                "Precipitation Hours",
                "Max Precipitation Probability",
                "Weather Code (WMO)",
                "Sunrise Time",
                "Sunset Time",
                "Sunshine Duration",
                "Daylight Duration",
                "Max Wind Speed (10m)",
                "Max Wind Gusts (10m)",
                "Dominant Wind Direction (10m)",
                "Solar Radiation Sum",
                "Evapotranspiration (FAO ET₀)",
                "Max UV Index",
                "Max UV Index (Clear Sky)"
              ]
            },
            "default": [
              "temperature_2m_max",
              "temperature_2m_min",
              "precipitation_sum"
            ]
          },
          "hourlyVariables": {
            "title": "Hourly Variables",
            "type": "array",
            "description": "Select hourly weather variables. Leave empty to skip hourly data.",
            "items": {
              "type": "string",
              "enum": [
                "temperature_2m",
                "apparent_temperature",
                "relative_humidity_2m",
                "dewpoint_2m",
                "precipitation",
                "precipitation_probability",
                "rain",
                "snowfall",
                "snow_depth",
                "weathercode",
                "pressure_msl",
                "surface_pressure",
                "cloudcover",
                "cloudcover_low",
                "cloudcover_mid",
                "cloudcover_high",
                "visibility",
                "windspeed_10m",
                "windspeed_80m",
                "winddirection_10m",
                "windgusts_10m",
                "uv_index",
                "is_day",
                "sunshine_duration",
                "shortwave_radiation",
                "direct_radiation",
                "diffuse_radiation",
                "soil_temperature_0cm",
                "soil_moisture_0_to_1cm"
              ],
              "enumTitles": [
                "Temperature (2m)",
                "Apparent Temperature (feels like)",
                "Relative Humidity (2m)",
                "Dewpoint (2m)",
                "Precipitation",
                "Precipitation Probability",
                "Rain",
                "Snowfall",
                "Snow Depth",
                "Weather Code (WMO)",
                "Pressure (mean sea level)",
                "Surface Pressure",
                "Cloud Cover (total)",
                "Cloud Cover (low)",
                "Cloud Cover (mid)",
                "Cloud Cover (high)",
                "Visibility",
                "Wind Speed (10m)",
                "Wind Speed (80m)",
                "Wind Direction (10m)",
                "Wind Gusts (10m)",
                "UV Index",
                "Is Daytime",
                "Sunshine Duration",
                "Shortwave Radiation",
                "Direct Radiation",
                "Diffuse Radiation",
                "Soil Temperature (0cm)",
                "Soil Moisture (0–1cm)"
              ]
            },
            "default": []
          },
          "airQualityVariables": {
            "title": "Air Quality Variables",
            "type": "array",
            "description": "Select air quality variables (used in Air Quality mode).",
            "items": {
              "type": "string",
              "enum": [
                "pm10",
                "pm2_5",
                "carbon_monoxide",
                "nitrogen_dioxide",
                "sulphur_dioxide",
                "ozone",
                "dust",
                "uv_index",
                "ammonia",
                "alder_pollen",
                "birch_pollen",
                "grass_pollen",
                "mugwort_pollen",
                "olive_pollen",
                "ragweed_pollen",
                "european_aqi",
                "us_aqi",
                "us_aqi_pm2_5",
                "us_aqi_pm10",
                "us_aqi_nitrogen_dioxide",
                "us_aqi_ozone"
              ],
              "enumTitles": [
                "PM10",
                "PM2.5",
                "Carbon Monoxide (CO)",
                "Nitrogen Dioxide (NO₂)",
                "Sulphur Dioxide (SO₂)",
                "Ozone (O₃)",
                "Dust",
                "UV Index",
                "Ammonia (NH₃)",
                "Alder Pollen",
                "Birch Pollen",
                "Grass Pollen",
                "Mugwort Pollen",
                "Olive Pollen",
                "Ragweed Pollen",
                "European AQI",
                "US AQI",
                "US AQI (PM2.5)",
                "US AQI (PM10)",
                "US AQI (NO₂)",
                "US AQI (Ozone)"
              ]
            },
            "default": [
              "pm10",
              "pm2_5",
              "us_aqi"
            ]
          },
          "forecastDays": {
            "title": "Forecast Days",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of forecast days (1–16). Used in Forecast mode.",
            "default": 7
          },
          "startDate": {
            "title": "Start Date",
            "type": "string",
            "description": "Start date for historical mode (YYYY-MM-DD). E.g. '2024-01-01'."
          },
          "endDate": {
            "title": "End Date",
            "type": "string",
            "description": "End date for historical mode (YYYY-MM-DD). E.g. '2024-12-31'."
          },
          "temperatureUnit": {
            "title": "Temperature Unit",
            "enum": [
              "celsius",
              "fahrenheit"
            ],
            "type": "string",
            "description": "Temperature unit for output.",
            "default": "celsius"
          },
          "windspeedUnit": {
            "title": "Wind Speed Unit",
            "enum": [
              "kmh",
              "ms",
              "mph",
              "kn"
            ],
            "type": "string",
            "description": "Wind speed unit for output.",
            "default": "kmh"
          },
          "precipitationUnit": {
            "title": "Precipitation Unit",
            "enum": [
              "mm",
              "inch"
            ],
            "type": "string",
            "description": "Precipitation unit for output.",
            "default": "mm"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "Timezone for time values. Use 'auto' to detect from coordinates, or specify (e.g. 'America/New_York', 'Asia/Karachi').",
            "default": "auto"
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "one_per_day",
              "one_per_hour",
              "one_per_location",
              "raw"
            ],
            "type": "string",
            "description": "How to structure each record in the dataset.",
            "default": "one_per_day"
          },
          "addSequentialId": {
            "title": "Add Sequential ID",
            "type": "boolean",
            "description": "Add auto-incrementing ID to each record.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}