{
  "openapi": "3.0.1",
  "info": {
    "title": "Swiss Weather Forecast (MeteoSwiss) – by Postal Code",
    "description": "Official MeteoSwiss local forecast for every Swiss postal code, ~150 weather stations and mountain points: daily min/max temperature, rain with uncertainty range and weather icon for 9 days, or hourly temperature, rain, wind, gusts, sunshine. Same forecast as the MeteoSwiss app. CC BY 4.0.",
    "version": "1.0",
    "x-build-id": "oYq9vQmb6WKnpLJS7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendata-souce2026~swiss-weather-forecast-meteoswiss/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendata-souce2026-swiss-weather-forecast-meteoswiss",
        "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/opendata-souce2026~swiss-weather-forecast-meteoswiss/runs": {
      "post": {
        "operationId": "runs-sync-opendata-souce2026-swiss-weather-forecast-meteoswiss",
        "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/opendata-souce2026~swiss-weather-forecast-meteoswiss/run-sync": {
      "post": {
        "operationId": "run-sync-opendata-souce2026-swiss-weather-forecast-meteoswiss",
        "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": {
          "locations": {
            "title": "Postal codes, places or stations",
            "type": "array",
            "description": "Swiss postal codes (e.g. \"8001\", \"1201\"), place names (e.g. \"Bern\", \"Lugano\", \"Zermatt\"; English names like \"Geneva\" or \"Lucerne\" work too), mountain points (e.g. \"Simplonpass\") or MeteoSwiss station abbreviations (e.g. \"BER\", \"SMA\"). A place name with several postal codes uses its lowest one.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude (optional)",
            "type": "string",
            "description": "Get the forecast of the nearest forecast point (postal code, station or mountain point) to this location, e.g. 46.02. Give longitude too."
          },
          "longitude": {
            "title": "Longitude (optional)",
            "type": "string",
            "description": "Longitude of the location, e.g. 7.75."
          },
          "allPostalCodes": {
            "title": "All Swiss postal codes",
            "type": "boolean",
            "description": "Return the forecast for every Swiss postal code (~3,200 locations) in one run, e.g. for a nationwide database or map. Daily output gives about 29,000 rows; hourly output gives ~3,200 rows per forecast hour, so keep Hours ahead small.",
            "default": false
          },
          "output": {
            "title": "Output",
            "enum": [
              "daily",
              "hourly"
            ],
            "type": "string",
            "description": "Daily: one row per location and day (min/max temperature, precipitation with 10%-90% range, weather icon). Hourly: one row per location and hour with the fields chosen below.",
            "default": "daily"
          },
          "days": {
            "title": "Days (daily output)",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of days starting today, 1 to 9.",
            "default": 9
          },
          "hours": {
            "title": "Hours ahead (hourly output)",
            "minimum": 1,
            "maximum": 192,
            "type": "integer",
            "description": "How far ahead the hourly forecast goes, 1 to 192 hours (8 days).",
            "default": 48
          },
          "hourlyFields": {
            "title": "Hourly fields",
            "type": "array",
            "description": "What to include in hourly output. Each field is one large MeteoSwiss file for all of Switzerland, so pick only what you need (default: temperature, precipitation, weatherIcon). Options: temperature, temperatureRange (10%/90%), precipitation, precipitationRange (10%/90%), precipitationProbability (per 3 h), weatherIcon (per 3 h), wind (speed + direction), gusts, sunshine, radiation, freezingLevel.",
            "items": {
              "type": "string"
            }
          },
          "timeZone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone for localDate/localTime in hourly output, e.g. Europe/Zurich or UTC. The time field is always UTC; daily dates are Swiss calendar days.",
            "default": "Europe/Zurich"
          },
          "maxLocations": {
            "title": "Maximum locations",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety limit for the number of locations from the list and coordinates (ignored when All Swiss postal codes is on).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}