{
  "openapi": "3.0.1",
  "info": {
    "title": "METAR & TAF Aviation Weather + NWS Observations",
    "description": "METAR (raw + decoded) and TAF from the official aviationweather.gov Data API, plus optional NWS station observations, by ICAO code, US state or bounding box, up to 30 days back. Temp in °C/°F, 6h/24h max-min, wind, ceiling, flight category. Unofficial; not affiliated with NOAA/NWS.",
    "version": "0.1",
    "x-build-id": "kvomg9M7P09ITcpAf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~aviation-weather-metar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-aviation-weather-metar",
        "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/jpopendata~aviation-weather-metar/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-aviation-weather-metar",
        "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/jpopendata~aviation-weather-metar/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-aviation-weather-metar",
        "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": {
          "stations": {
            "title": "Stations (ICAO codes)",
            "type": "array",
            "description": "4-character ICAO codes, one per line, e.g. KJFK, KORD, KNYC (Central Park), KMDW, EGLL, RJTT, LFPG. Case and commas do not matter (\"kjfk, egll\" works). A 3-letter US airport code (JFK) gets the K prefix with a warning; IATA codes outside the US (LHR) and city names are not accepted. Up to 400 per run.",
            "default": [
              "KJFK",
              "KORD",
              "EGLL",
              "RJTT"
            ],
            "items": {
              "type": "string"
            }
          },
          "usStates": {
            "title": "US states (optional)",
            "type": "array",
            "description": "Optional. Two-letter US state codes (TX, CA, NY ...) or names (Texas). Every reporting station in the state is included.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "boundingBox": {
            "title": "Bounding box (optional)",
            "type": "string",
            "description": "Optional. \"minLat,minLon,maxLat,maxLon\" in decimal degrees, e.g. \"40.5,-74.3,41.0,-73.6\" (New York City airports). Worldwide. At most 20 x 20 degrees.",
            "default": ""
          },
          "hoursBack": {
            "title": "Hours of history",
            "type": "integer",
            "description": "Reports from the last N hours (1..720; the API keeps 30 days). Most airports report every hour (US airports add special SPECI reports), so 24 hours is about 24-40 reports per station.",
            "default": 2
          },
          "latestOnly": {
            "title": "Latest report only",
            "type": "boolean",
            "description": "Keep only the newest report per station within Hours of history (current conditions).",
            "default": false
          },
          "includeTaf": {
            "title": "Include TAF forecasts",
            "type": "boolean",
            "description": "Also return the current TAF (terminal aerodrome forecast) of each station that issues one, with raw text and decoded forecast periods.",
            "default": false
          },
          "includeNwsObservations": {
            "title": "Include NWS observations (US stations)",
            "type": "boolean",
            "description": "Also return NWS station observations from api.weather.gov for US stations (ICAO K..., PA/PH..., TJ...): quality-controlled values in °C/°F, humidity, wind, visibility and the NWS text description. One request per station; at most 50 stations and the last 7 days.",
            "default": false
          },
          "maxItems": {
            "title": "Max records",
            "type": "integer",
            "description": "Maximum records stored (1..100000). You are charged per record.",
            "default": 1000
          },
          "maxApiRequests": {
            "title": "Max API requests",
            "type": "integer",
            "description": "Hard budget of requests for the whole run (1..1000). Requests are sent one at a time at least 1.2 s apart (at most 50 per minute; the Data API allows 100 per minute). Requests are sized to stay under the API's 400-reports-per-request limit, so 50 stations x 24 hours is about 13 requests.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional and normally not needed: both APIs answer Apify datacenter IPs. If set, one sticky session is used for the whole run (never rotation).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}