{
  "openapi": "3.0.1",
  "info": {
    "title": "NWS US Weather — official forecasts, alerts & observations",
    "description": "U.S. National Weather Service forecasts, active alerts, and latest station observation for a ZIP, city, or coordinates. Compact JSON plus markdown briefing. Official NWS APIs, no key. Not affiliated with NWS/NOAA. Built for AI agents.",
    "version": "0.2",
    "x-build-id": "ZsZa5XZMEDIIWRcwC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tec5uport~nws-us-weather/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tec5uport-nws-us-weather",
        "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/tec5uport~nws-us-weather/runs": {
      "post": {
        "operationId": "runs-sync-tec5uport-nws-us-weather",
        "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/tec5uport~nws-us-weather/run-sync": {
      "post": {
        "operationId": "run-sync-tec5uport-nws-us-weather",
        "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": {
          "zipCodes": {
            "title": "ZIP codes",
            "maxItems": 10,
            "type": "array",
            "description": "U.S. 5-digit ZIP codes (max 10 per run). Example: 39180 (Vicksburg, MS).",
            "items": {
              "type": "string",
              "pattern": "^\\d{5}$"
            }
          },
          "coordinates": {
            "title": "Coordinates",
            "maxItems": 10,
            "type": "array",
            "description": "Latitude,longitude pairs, e.g. 32.3526,-90.8779. Use when the agent already has a point.",
            "items": {
              "type": "string",
              "pattern": "^\\s*-?\\d{1,2}(\\.\\d+)?\\s*,\\s*-?\\d{1,3}(\\.\\d+)?\\s*$"
            }
          },
          "locations": {
            "title": "Structured locations",
            "maxItems": 10,
            "type": "array",
            "description": "Optional objects with zipCode, city + 2-letter state, address, and/or latitude+longitude. Max 10 locations per run across all inputs.",
            "items": {
              "type": "object",
              "properties": {
                "zipCode": {
                  "type": "string",
                  "title": "ZIP code",
                  "description": "ZIP code"
                },
                "city": {
                  "type": "string",
                  "title": "City",
                  "description": "City"
                },
                "state": {
                  "type": "string",
                  "title": "State (2-letter)",
                  "description": "State (2-letter)"
                },
                "address": {
                  "type": "string",
                  "title": "Street address",
                  "description": "Street address"
                },
                "latitude": {
                  "type": "number",
                  "title": "Latitude",
                  "description": "Latitude"
                },
                "longitude": {
                  "type": "number",
                  "title": "Longitude",
                  "description": "Longitude"
                }
              }
            }
          },
          "stateAlerts": {
            "title": "Extra statewide alerts",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Optional two-letter state code (e.g. MS) to also list active alerts for the whole state."
          },
          "includeForecast": {
            "title": "Include 12-hour forecast",
            "type": "boolean",
            "description": "Official NWS 7-day forecast, truncated by forecastPeriods.",
            "default": true
          },
          "includeHourly": {
            "title": "Include hourly forecast",
            "type": "boolean",
            "description": "Off by default because hourly rows are large for LLM context. Turn on only when needed.",
            "default": false
          },
          "includeAlerts": {
            "title": "Include active alerts",
            "type": "boolean",
            "description": "Watches, warnings, and advisories for the point (and statewide if stateAlerts is set).",
            "default": true
          },
          "includeObservation": {
            "title": "Include latest observation",
            "type": "boolean",
            "description": "Most recent reading from the nearest NWS observation station.",
            "default": true
          },
          "forecastPeriods": {
            "title": "Forecast periods to return",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "Each period is about 12 hours (Today, Tonight, tomorrow, …). 6 is usually two days.",
            "default": 6
          },
          "hourlyHours": {
            "title": "Hourly hours to return",
            "minimum": 1,
            "maximum": 48,
            "type": "integer",
            "description": "Only used when includeHourly is true.",
            "default": 12
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Truncate long forecast and alert text to keep the payload small for LLM context.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "json",
              "markdown",
              "both"
            ],
            "type": "string",
            "description": "json writes dataset items only. markdown also writes OUTPUT.md. both (default) does both.",
            "default": "both"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}