{
  "openapi": "3.0.1",
  "info": {
    "title": "Weather Forecast Search",
    "description": "Get current weather conditions and multi-day forecasts for any location worldwide using the free Open-Meteo API. Search by city name (auto-geocoded) or direct latitude/longitude coordinates.",
    "version": "2.1",
    "x-build-id": "eZCFjYhSh1ytGOHZl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~weather-forecast-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-weather-forecast-search",
        "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/ryanclinton~weather-forecast-search/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-weather-forecast-search",
        "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/ryanclinton~weather-forecast-search/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-weather-forecast-search",
        "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": {
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City name to search for (will be geocoded to coordinates). Ignored if 'locations' is set, or if latitude/longitude are provided.",
            "default": "New York"
          },
          "locations": {
            "title": "Locations (batch)",
            "maxItems": 25,
            "type": "array",
            "description": "Optional. A list of city names to fetch in one run — the actor returns one forecast record per location. Overrides the single 'location' field when set. Up to 25 locations per run.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Direct latitude coordinate. Overrides location if both latitude and longitude are provided."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Direct longitude coordinate. Overrides location if both latitude and longitude are provided."
          },
          "forecastDays": {
            "title": "Forecast Days",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of forecast days (1-16).",
            "default": 7
          },
          "includeHourly": {
            "title": "Include Hourly Forecast",
            "type": "boolean",
            "description": "Include hourly weather breakdown in the output.",
            "default": false
          },
          "temperatureUnit": {
            "title": "Temperature Unit",
            "enum": [
              "celsius",
              "fahrenheit"
            ],
            "type": "string",
            "description": "Temperature unit for the forecast.",
            "default": "celsius"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "Timezone for the forecast (e.g., 'America/New_York', 'Europe/London'). Use 'auto' to detect it from the location's coordinates.",
            "default": "auto"
          },
          "industryMode": {
            "title": "Industry lens",
            "enum": [
              "none",
              "travel",
              "agriculture",
              "construction",
              "events",
              "drone",
              "logistics"
            ],
            "type": "string",
            "description": "Optional. Adds a deterministic 'industry' assessment for your sector: travel (flight delay + driving conditions), agriculture (frost, spraying, irrigation), construction (workability, crane risk, concrete pour), events (outdoor suitability + weather risk), drone (flight conditions from wind/gusts/precip), or logistics (delivery disruption risk). Default 'none'.",
            "default": "none"
          },
          "watchFor": {
            "title": "Threshold watch",
            "type": "object",
            "description": "Optional. Report the first forecast day each threshold is crossed (in your chosen units). Keys: temperatureAbove, temperatureBelow, windSpeedAbove (km/h), precipitationAbove (mm), uvIndexAbove. Example: {\"temperatureAbove\": 30, \"windSpeedAbove\": 50}."
          },
          "watchlistName": {
            "title": "Watchlist name (monitoring)",
            "type": "string",
            "description": "Optional. Set a stable name to turn on persistent monitoring — the actor keeps a rolling per-location history. Each record gains a 'change' block (vs the prior run) and a 'siteHealth' block (multi-run trend, risk average, days in high risk), and the multi-location summary gains an operations 'feed'. The first run marks everything 'new'; trends sharpen as runs accumulate."
          },
          "openMeteoApiKey": {
            "title": "Open-Meteo API key (optional)",
            "type": "string",
            "description": "Optional. Provide your own Open-Meteo commercial API key to fetch forecasts from customer-api.open-meteo.com at full native fidelity (billed to your Open-Meteo subscription). Leave blank to use the free, commercially-licensed MET Norway data source."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}