{
  "openapi": "3.0.1",
  "info": {
    "title": "Weather Forecast and History Scraper",
    "description": "Get weather for any place in the world: daily and hourly forecasts with sunrise and sunset, and daily history since 1981 with monthly summaries, degree days, frost and rain days. For the United States also get active weather alerts and live station observations. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "0dAqTveq6sVRJJPb0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~weather-forecast-history-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-weather-forecast-history-scraper",
        "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/parselab~weather-forecast-history-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-weather-forecast-history-scraper",
        "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/parselab~weather-forecast-history-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-weather-forecast-history-scraper",
        "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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "forecast",
              "history",
              "alerts",
              "observations"
            ],
            "type": "string",
            "description": "Forecast gives daily or hourly forecasts for any place in the world. History gives past daily weather since 1981, or monthly and yearly summaries. Alerts gives active United States weather warnings. Observations gives the latest measured weather at the nearest United States station.",
            "default": "forecast"
          },
          "locations": {
            "title": "Places",
            "type": "array",
            "description": "City names or coordinates, one per line. For example New York, Berlin or 40.71,-74.00. Coordinates are the most exact. Alerts mode can also use states instead of places.",
            "items": {
              "type": "string"
            }
          },
          "units": {
            "title": "Units",
            "enum": [
              "metric",
              "imperial"
            ],
            "type": "string",
            "description": "Metric uses degrees Celsius, km/h, millimeters and hPa. Imperial uses degrees Fahrenheit, mph, inches and inHg.",
            "default": "metric"
          },
          "granularity": {
            "title": "Forecast detail",
            "enum": [
              "daily",
              "hourly"
            ],
            "type": "string",
            "description": "Daily returns one summary row per day with highs, lows, rain, wind, sunrise and sunset. Hourly returns every forecast step. Hourly steps are one hour for about 2.5 days and six hours after that.",
            "default": "daily"
          },
          "forecastDays": {
            "title": "Forecast days",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many days ahead, from 1 to 10.",
            "default": 7
          },
          "dateFrom": {
            "title": "History from",
            "type": "string",
            "description": "First day of the history, YYYY-MM-DD. Data starts in 1981. The default is 30 days before the end date."
          },
          "dateTo": {
            "title": "History to",
            "type": "string",
            "description": "Last day of the history, YYYY-MM-DD. The most recent days are usually available after a delay of a few days. The default is five days ago."
          },
          "historyAggregate": {
            "title": "History summary",
            "enum": [
              "daily",
              "monthly",
              "yearly"
            ],
            "type": "string",
            "description": "Daily returns one row per day. Monthly and yearly return one row per period with averages, totals, rain days, frost days and degree days.",
            "default": "daily"
          },
          "states": {
            "title": "States (alerts)",
            "type": "array",
            "description": "Two letter United States state or territory codes for alerts mode, for example TX, FL, CA.",
            "items": {
              "type": "string"
            }
          },
          "minSeverity": {
            "title": "Minimum severity (alerts)",
            "enum": [
              "Minor",
              "Moderate",
              "Severe",
              "Extreme"
            ],
            "type": "string",
            "description": "Keep only alerts at or above this severity.",
            "default": "Minor"
          },
          "alertEvents": {
            "title": "Alert types (alerts)",
            "type": "array",
            "description": "Keep only alerts whose type contains one of these words, for example Tornado, Flood, Hurricane, Heat or Winter Storm.",
            "items": {
              "type": "string"
            }
          },
          "contactEmail": {
            "title": "Contact email",
            "type": "string",
            "description": "The weather services ask automated tools to identify themselves. Your email is sent only in the request header to them. It is optional."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}