{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan AMeDAS Weather Observations (JMA official data)",
    "description": "Unofficial tool reading Japan Meteorological Agency (JMA) AMeDAS open data: live surface observations (temperature, rain, wind, sunshine, humidity, snow) from ~1,300 stations, per-station time series, and the station directory, English-labelled. Public open data, no API key. Not affiliated with JMA.",
    "version": "0.1",
    "x-build-id": "HN2gKmB2QO2wfQuf5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~japan-amedas-observations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-japan-amedas-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/jpopendata~japan-amedas-observations/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-japan-amedas-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/jpopendata~japan-amedas-observations/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-japan-amedas-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "latest",
              "by_station",
              "stations"
            ],
            "type": "string",
            "description": "What to fetch. `latest` (default) = the most recent 10-minute observation for every reporting station (filter with prefecture / stationCode). `by_station` = the 10-minute time series for the station(s) in stationCode (stationCode required). `stations` = the AMeDAS station directory (metadata + which elements each observes). Example: \"latest\".",
            "default": "latest"
          },
          "prefecture": {
            "title": "Prefecture (filter)",
            "enum": [
              "Hokkaido",
              "Aomori",
              "Iwate",
              "Miyagi",
              "Akita",
              "Yamagata",
              "Fukushima",
              "Ibaraki",
              "Tochigi",
              "Gunma",
              "Saitama",
              "Chiba",
              "Tokyo",
              "Kanagawa",
              "Niigata",
              "Toyama",
              "Ishikawa",
              "Fukui",
              "Yamanashi",
              "Nagano",
              "Gifu",
              "Shizuoka",
              "Aichi",
              "Mie",
              "Shiga",
              "Kyoto",
              "Osaka",
              "Hyogo",
              "Nara",
              "Wakayama",
              "Tottori",
              "Shimane",
              "Okayama",
              "Hiroshima",
              "Yamaguchi",
              "Tokushima",
              "Kagawa",
              "Ehime",
              "Kochi",
              "Fukuoka",
              "Saga",
              "Nagasaki",
              "Kumamoto",
              "Oita",
              "Miyazaki",
              "Kagoshima",
              "Okinawa"
            ],
            "type": "string",
            "description": "Optional. Keep only stations in this prefecture — pick one of the 47 prefectures by English name, e.g. \"Tokyo\", \"Osaka\", \"Hokkaido\" (via the API the Japanese name \"東京都\" or JIS code \"13\" also work). Applies to `latest` and `stations` modes; ignored by `by_station`. Leave empty for all of Japan."
          },
          "stationCode": {
            "title": "AMeDAS station code(s)",
            "type": "string",
            "description": "Optional for `latest`, REQUIRED for `by_station`. 5-digit AMeDAS station code, e.g. \"44132\" (Tokyo), \"62078\" (Osaka), \"14163\" (Sapporo). Several codes may be comma-separated: \"44132, 62078\". Find codes in https://www.jma.go.jp/bosai/amedas/const/amedastable.json or run mode `stations`."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of records to output (1-2000). One record = one station at one timestamp (`latest`/`stations` emit up to one per station; `by_station` emits one per 10-minute step). Example: 500.",
            "default": 500
          },
          "maxApiRequests": {
            "title": "Max upstream requests per run",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Hard safety cap on requests to www.jma.go.jp per run (1-60; `latest` needs ~3: station table + latest_time + map). Politeness (1 connection, >= 1.2 s spacing, exponential backoff on 429/5xx) is enforced in code. Example: 12.",
            "default": 12
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Default is NO proxy (direct connection) — a public JSON feed rarely needs one. The Actor backs off exponentially on 429/5xx and fails visibly on a persistent block; it never attempts rate-limit evasion.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}