{
  "openapi": "3.0.1",
  "info": {
    "title": "Weather Forecast API – Hourly & 10-Day, Any City or Lat/Lon",
    "description": "Hourly and daily weather forecasts for a list of cities or coordinates from MET Norway: temperature, wind, gusts, rain, clouds, humidity, UV, symbol. 10 days, local time zones, flat or nested rows. No API key, commercial use allowed. $2 per 1,000 locations.",
    "version": "0.1",
    "x-build-id": "ugLIegA68vvsSwBGU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~weather-forecast/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-weather-forecast",
        "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/gazidev~weather-forecast/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-weather-forecast",
        "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/gazidev~weather-forecast/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-weather-forecast",
        "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": "Locations",
            "type": "array",
            "description": "One place per line: a city name (`Berlin`, `Paris, France`, `Springfield, IL`, `London, Canada`) or coordinates (`40.7128, -74.0060`). City names are matched offline against the GeoNames list of ~34,000 cities and towns with 15,000+ people (the most populous match wins; add the country or state to pick another). For villages, farms, ships or sites use coordinates. In JSON/API input you can also pass objects: `{\"name\": \"Site A\", \"lat\": 59.91, \"lon\": 10.75, \"altitude\": 120, \"timezone\": \"Europe/Oslo\"}`."
          },
          "output": {
            "title": "Output shape",
            "enum": [
              "perLocation",
              "hourlyRows",
              "dailyRows"
            ],
            "type": "string",
            "description": "`perLocation`: one row per location with nested `hourly` and `daily` arrays. `hourlyRows`: one flat row per location and time step (easy for spreadsheets and SQL). `dailyRows`: one flat row per location and day. The price is the same: one event per location.",
            "default": "perLocation"
          },
          "hours": {
            "title": "Hours of time steps",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "How far ahead the `hourly` list goes, in hours from now (max 240). MET Norway gives hourly steps for about the next 2.5 days and 6-hour steps after that, up to about 9-10 days.",
            "default": 48
          },
          "days": {
            "title": "Days of daily summary",
            "minimum": 1,
            "maximum": 11,
            "type": "integer",
            "description": "Number of local days in the `daily` summary (min/max temperature, total precipitation, max wind and gust, max precipitation probability and UV, symbol). Today is usually a partial day (`fullDay: false`).",
            "default": 10
          },
          "timezone": {
            "title": "Time zone of the output times",
            "type": "string",
            "description": "`local` (default) uses each location's own time zone (from GeoNames; for coordinates the zone of the nearest city within 300 km, at sea a nautical zone). `UTC` or any IANA name such as `America/Chicago` puts every location on that clock. Daily summaries follow this time zone. `timeUtc` is always included.",
            "default": "local"
          },
          "detail": {
            "title": "Forecast detail",
            "enum": [
              "complete",
              "compact"
            ],
            "type": "string",
            "description": "`complete` adds wind gust, feels-like temperature, dew point, fog, UV index and precipitation/thunder probability. `compact` has only temperature, wind, humidity, pressure, cloud cover, precipitation and symbol (those other fields are then empty).",
            "default": "complete"
          },
          "includeHourly": {
            "title": "Include hourly steps",
            "type": "boolean",
            "description": "Only for 'One row per location'. Turn off for a small row with the current conditions and daily summary only.",
            "default": true
          },
          "includeDaily": {
            "title": "Include daily summary",
            "type": "boolean",
            "description": "Only for 'One row per location'.",
            "default": true
          },
          "skipDuplicates": {
            "title": "Skip duplicate locations",
            "type": "boolean",
            "description": "Locations that resolve to the same point (4 decimals) are forecast and charged once.",
            "default": true
          },
          "useCache": {
            "title": "Reuse unexpired forecasts",
            "type": "boolean",
            "description": "MET Norway's terms ask clients not to fetch a point again before the forecast's `Expires` time. Responses are kept in a named key-value store in your account (`weather-forecast-met-cache`) and reused until they expire, then revalidated with If-Modified-Since. You are still charged for a location served from the cache.",
            "default": true
          },
          "maxLocations": {
            "title": "Max locations",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on the number of input locations read."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}