{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenWeather API - Weather Forecast, Air Quality, History",
    "description": "Weather data from the OpenWeather API: current weather, 5 day 3 hour forecast, One Call 3.0 hourly and 8 day forecasts, alerts and history back to 1979, air quality (AQI, PM2.5) and geocoding, by coordinates, city or postcode. Bring your own key.",
    "version": "0.1",
    "x-build-id": "kaYErvnyf0Sauq6TX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~openweather-weather-forecast-air-quality-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-openweather-weather-forecast-air-quality-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~openweather-weather-forecast-air-quality-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-openweather-weather-forecast-air-quality-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~openweather-weather-forecast-air-quality-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-openweather-weather-forecast-air-quality-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": [
              "current",
              "forecast",
              "hourlyForecast",
              "dailyForecast",
              "alerts",
              "historyHourly",
              "historyDaily",
              "airQuality",
              "airQualityForecast",
              "airQualityHistory",
              "geocode"
            ],
            "type": "string",
            "description": "Current weather, the 5 day forecast, air quality and geocoding work on the free OpenWeather plan. The hourly and daily forecasts, alerts and both history modes call One Call API 3.0, which needs the separate One Call by Call subscription (1,000 free calls a day).",
            "default": "current"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "One location per line: latitude,longitude (51.5074,-0.1278), a place name as city, city,country or city,state,country with ISO 3166 codes (Paris,FR or Austin,TX,US), or a postcode with its country after zip: (zip:E14,GB or zip:10001,US). Names and postcodes are turned into coordinates through the OpenWeather Geocoding API, one extra request each.",
            "items": {
              "type": "string"
            }
          },
          "units": {
            "title": "Units",
            "enum": [
              "metric",
              "imperial",
              "standard"
            ],
            "type": "string",
            "description": "Unit system for temperature and wind speed. Precipitation is always in mm. Air quality and geocoding ignore units.",
            "default": "metric"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "af",
              "sq",
              "ar",
              "az",
              "eu",
              "be",
              "bg",
              "ca",
              "zh_cn",
              "zh_tw",
              "hr",
              "cz",
              "da",
              "nl",
              "fi",
              "fr",
              "gl",
              "de",
              "el",
              "he",
              "hi",
              "hu",
              "is",
              "id",
              "it",
              "ja",
              "kr",
              "ku",
              "la",
              "lt",
              "mk",
              "no",
              "fa",
              "pl",
              "pt",
              "pt_br",
              "ro",
              "ru",
              "sr",
              "sk",
              "sl",
              "es",
              "sp",
              "sv",
              "se",
              "th",
              "tr",
              "uk",
              "ua",
              "vi",
              "zu"
            ],
            "type": "string",
            "description": "Language of weather descriptions and place names, using the lang codes OpenWeather documents.",
            "default": "en"
          },
          "forecastSteps": {
            "title": "Forecast steps (5 day forecast)",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "5 day forecast only: how many 3 hour steps to return per location (the cnt parameter). 40 covers 5 days, 8 covers 24 hours.",
            "default": 40
          },
          "dateFrom": {
            "title": "Start date",
            "type": "string",
            "description": "Daily weather summary and air quality history only, as YYYY-MM-DD. Daily summaries go back to 1979-01-02 and up to 1.5 years ahead; air quality history starts on 2020-11-27."
          },
          "dateTo": {
            "title": "End date",
            "type": "string",
            "description": "Daily weather summary and air quality history only, as YYYY-MM-DD. Leave empty for a single day. At most 366 days per run; the daily summary makes one request per day per location."
          },
          "timezoneOffset": {
            "title": "Time zone offset (daily summary)",
            "type": "string",
            "description": "Daily weather summary only, optional: the tz parameter in the +XX:XX form (for example -05:00) when the location's time zone is detected wrongly. Leave empty to let OpenWeather detect it."
          },
          "times": {
            "title": "Times (historical weather)",
            "type": "array",
            "description": "Historical weather at given times only: one ISO 8601 date-time per line (2024-01-15T12:00:00Z), or a date (read as 12:00 UTC). Each time and location is one request, from 1979-01-01 up to 4 days ahead.",
            "items": {
              "type": "string"
            }
          },
          "geocodeLimit": {
            "title": "Matches per name (geocoding)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Geocoding only: the most places to return for each name or coordinate pair (the limit parameter, up to 5).",
            "default": 5
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. A 5 day forecast is 40 rows per location, an air quality forecast about 96.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Pacing. The free plan allows 60 calls a minute; paid plans allow more.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own OpenWeather API key (the appid) from the API keys tab of your openweathermap.org account. Stored as a secret and sent only to api.openweathermap.org as the appid parameter the API requires; it is never logged. You can instead set the DATA_API_KEY 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}