{
  "openapi": "3.0.1",
  "info": {
    "title": "METAR Weather Observations API - Airport Temperature, Hourly",
    "description": "For aviation dashboards, weather-market traders and climate analysts: airport weather by ICAO or IATA code with temperature, dewpoint, wind, pressure, visibility, clouds, flight category and raw METAR, latest or up to 30 days back (KJFK: 772 reports in 30 days). Monitoring returns only new reports.",
    "version": "0.1",
    "x-build-id": "3x6H6zvquI0Tu3DAa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~metar-weather-observations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-metar-weather-observations",
        "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/neverempty~metar-weather-observations/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-metar-weather-observations",
        "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/neverempty~metar-weather-observations/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-metar-weather-observations",
        "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": {
          "airports": {
            "title": "Airports (ICAO or IATA codes)",
            "type": "array",
            "description": "Airports to read, one per line: 4-letter ICAO codes such as KJFK, EGLL, RJTT, YSSY (commas and spaces also separate codes). 3-letter IATA codes such as JFK or LHR are converted to ICAO with aviationweather.gov's official station list; an IATA code shared by two stations is not guessed and comes back as a free row. A repeated airport is read and charged once. If you leave this field out with monitoring off, three example airports (KJFK, EGLL, RJTT) are read; with monitoring on it is required. Up to 500 airports per run.",
            "items": {
              "type": "string"
            }
          },
          "hoursBack": {
            "title": "Hours of history",
            "minimum": 0,
            "maximum": 720,
            "type": "integer",
            "description": "Return every observation (routine METAR and special SPECI reports) from the last N hours, newest first (oldest first in monitoring mode). 0 = only the latest report of each airport. Maximum 720 (30 days, all that aviationweather.gov keeps). Most airports report once an hour, some every 30 minutes, plus special reports when the weather changes, so 24 hours is usually 24 to 60 rows per airport. In monitoring mode this is the window of the first run; later runs read back far enough to cover everything since the last observation returned.",
            "default": 3
          },
          "maxResults": {
            "title": "Maximum observation rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "With monitoring off, the run stops once this many observation rows have been returned, and a free row says what was not returned. Free rows do not count. In monitoring mode it does not limit the new observations returned: every airport in the list is checked, as far as the run's maximum total charge allows.",
            "default": 1000
          },
          "monitoringMode": {
            "title": "Monitoring mode: return only observations that are new since the last run",
            "type": "boolean",
            "description": "Off = every observation in the window comes back, charged per row. On = the Actor remembers, per airport, which observations it already returned, and later runs return only newer ones (and late or corrected reports it had not returned). The first run returns the window once as a baseline. In monitoring mode every airport whose observations are read costs $0.30 per 1,000 checks, new data or not (airports with no report, unreadable codes and failed requests are free), plus the row price for the observations returned. Example: 20 airports every hour = 14,400 checks a month = $4.32, plus about 14,400 new hourly observations. The Actor reads only as many airports as the run's maximum total charge can pay for with a check and one row each. Observations are remembered per airport; do not put the same airport in two schedules that can run at the same time.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was remembered and start over",
            "type": "boolean",
            "description": "Clears every remembered observation for this Actor, so the next monitoring run returns each airport's window again as a first check. This affects all your monitoring runs, because observations are remembered per airport rather than per list. Turn it off again after one run: left on in a schedule, every run returns the whole window again and charges for it.",
            "default": false
          },
          "useProxy": {
            "title": "Use a proxy if aviationweather.gov refuses the connection",
            "type": "boolean",
            "description": "Every request goes directly to aviationweather.gov first. Only if it answers HTTP 403 (refused) is the request retried through a proxy session. A 429 (too many requests) is never retried through a proxy: the Actor waits 30 seconds instead, as the service asks. With it off, a refused request is retried directly and then returned as a free 'blocked' row.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}