{
  "openapi": "3.0.1",
  "info": {
    "title": "NWS Weather Scraper: Observations & Daily Climate Reports",
    "description": "US weather from the National Weather Service: hourly station observations, official daily climate reports (CLI max/min temperature, precipitation, snow) used to settle weather markets, monthly CF6 tables, forecasts and active alerts. Only new data mode.",
    "version": "0.1",
    "x-build-id": "L83qAdsEwI0mIXnSd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latamdatatools~nws-weather-climate-reports/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latamdatatools-nws-weather-climate-reports",
        "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/latamdatatools~nws-weather-climate-reports/runs": {
      "post": {
        "operationId": "runs-sync-latamdatatools-nws-weather-climate-reports",
        "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/latamdatatools~nws-weather-climate-reports/run-sync": {
      "post": {
        "operationId": "run-sync-latamdatatools-nws-weather-climate-reports",
        "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": {
          "stations": {
            "title": "Weather stations (ICAO)",
            "type": "array",
            "description": "US observation stations, one per line: KNYC (Central Park), KMDW (Chicago Midway), KMIA, KAUS, KLAX, KDEN, KPHL... The daily climate report location is derived automatically (KNYC -> NYC).",
            "items": {
              "type": "string"
            }
          },
          "dataTypes": {
            "title": "Data to get",
            "type": "array",
            "description": "Pick one or more.",
            "items": {
              "type": "string",
              "enum": [
                "observations",
                "climate",
                "cf6",
                "forecast",
                "alerts"
              ],
              "enumTitles": [
                "Hourly observations (temperature, wind, precipitation, METAR)",
                "Daily climate reports (CLI): official max/min, precipitation, snow",
                "Monthly CF6 table: one row per day of the current month",
                "Forecast (7-day or hourly) for stations and points",
                "Active alerts for states or zones"
              ]
            },
            "default": [
              "observations",
              "climate"
            ]
          },
          "hoursBack": {
            "title": "Observations: hours back",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "1 to 168 (the API keeps about 7 days).",
            "default": 24
          },
          "daysBack": {
            "title": "Climate reports: days back",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Daily climate reports of today and the previous N days (the API keeps roughly the last 1-2 weeks).",
            "default": 3
          },
          "latestPerDay": {
            "title": "Climate reports: only the latest issuance per day",
            "type": "boolean",
            "description": "The NWS issues a preliminary report in the afternoon and the final one the next morning (plus corrections). On = one row per date with the most recent version. Off = every issuance.",
            "default": true
          },
          "climateLocations": {
            "title": "Extra climate report locations",
            "type": "array",
            "description": "3-letter CLI/CF6 location codes not covered by the stations above (e.g. NYC, MDW, MIA, AUS, LAX, DEN, PHL).",
            "items": {
              "type": "string"
            }
          },
          "points": {
            "title": "Forecast points (lat,lon)",
            "type": "array",
            "description": "For forecasts at any US location, e.g. 40.7829,-73.9654.",
            "items": {
              "type": "string"
            }
          },
          "hourlyForecast": {
            "title": "Hourly forecast",
            "type": "boolean",
            "description": "Off = 7-day forecast in 12-hour periods. On = hourly forecast (156 periods).",
            "default": false
          },
          "alertAreas": {
            "title": "Alert areas",
            "type": "array",
            "description": "State codes (NY, TX, FL...) or forecast zones (NYZ072).",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with stations",
            "type": "string",
            "description": "Optional Apify dataset ID with a station field."
          },
          "csvUrl": {
            "title": "CSV URL with stations",
            "type": "string",
            "description": "Optional public CSV or Google Sheets link with a station column."
          },
          "stationField": {
            "title": "Station field / column",
            "type": "string",
            "description": "Field name in the dataset or CSV.",
            "default": "station"
          },
          "includeRawText": {
            "title": "Include raw report text",
            "type": "boolean",
            "description": "Adds the full original text of each daily climate report.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new data (incremental)",
            "type": "boolean",
            "description": "Return only observations, reports, CF6 days and alerts not delivered in earlier runs with the same alert name. A final climate report that replaces a preliminary one counts as new. Forecasts are always returned.",
            "default": false
          },
          "alertName": {
            "title": "Memory name",
            "type": "string",
            "description": "Separate memory per scheduled task.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max rows per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total cap of rows returned (and charged).",
            "default": 10000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}