{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Earthquake, Tsunami & Weather Warning Alerts (JMA)",
    "description": "Japan disaster alerts from the JMA's official XML feeds: earthquakes (intensity, magnitude, epicenter), tsunami warnings, heavy rain / typhoon / snow warnings by municipality, volcanic eruptions. English fields, prefecture filter, only-new mode for schedules.",
    "version": "0.1",
    "x-build-id": "fSv3bFS1RKa84cMb8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/panda_studio~japan-disaster-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-panda_studio-japan-disaster-alerts",
        "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/panda_studio~japan-disaster-alerts/runs": {
      "post": {
        "operationId": "runs-sync-panda_studio-japan-disaster-alerts",
        "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/panda_studio~japan-disaster-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-panda_studio-japan-disaster-alerts",
        "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": {
          "alertTypes": {
            "title": "Alert types",
            "type": "array",
            "description": "Which JMA reports to include.",
            "items": {
              "type": "string",
              "enum": [
                "earthquake",
                "tsunami",
                "weather-warning",
                "volcano"
              ],
              "enumTitles": [
                "Earthquakes",
                "Tsunami warnings",
                "Weather warnings (rain, typhoon, snow...)",
                "Volcanic eruptions & alert levels"
              ]
            },
            "default": [
              "earthquake",
              "tsunami",
              "weather-warning"
            ]
          },
          "lookbackHours": {
            "title": "Look back (hours)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Reports published in the last N hours (max 168 = about 7 days, the length of the JMA long-term feed). For schedules every few minutes use 1: only the small high-frequency feeds are read.",
            "default": 6
          },
          "prefectures": {
            "title": "Prefectures (optional)",
            "type": "array",
            "description": "Only alerts affecting these prefectures, e.g. \"Tokyo\", \"Osaka\", \"13\", \"北海道\". Earthquakes match any prefecture where shaking was observed. Empty = all of Japan.",
            "items": {
              "type": "string"
            }
          },
          "minIntensity": {
            "title": "Earthquakes: minimum JMA seismic intensity (shindo)",
            "enum": [
              "1",
              "2",
              "3",
              "4",
              "5-",
              "5+",
              "6-",
              "6+",
              "7"
            ],
            "type": "string",
            "description": "Only earthquakes whose maximum observed intensity is at least this. JMA scale 1-7 (5-/5+ = 5 Lower/Upper).",
            "default": "3"
          },
          "minMagnitude": {
            "title": "Earthquakes: minimum magnitude (optional)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Leave empty for no magnitude filter."
          },
          "warningLevels": {
            "title": "Weather warnings: levels",
            "type": "array",
            "description": "Emergency = 特別警報, Danger = 危険警報, Warning = 警報, Advisory = 注意報 (many, e.g. thunder and dry-air advisories).",
            "items": {
              "type": "string",
              "enum": [
                "emergency",
                "danger",
                "warning",
                "advisory"
              ],
              "enumTitles": [
                "Emergency warning (特別警報)",
                "Danger warning (危険警報)",
                "Warning (警報)",
                "Advisory (注意報)"
              ]
            },
            "default": [
              "emergency",
              "danger",
              "warning"
            ]
          },
          "volcanoMinAlertLevel": {
            "title": "Volcanoes: minimum alert level for status reports",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Volcano status / warning reports are included from this Volcanic Alert Level (1-5). Eruption reports are always included when volcanoes are selected.",
            "default": 2
          },
          "includeCancellations": {
            "title": "Include cancellations",
            "type": "boolean",
            "description": "Also output lifted warnings and cancelled reports.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new alerts (for schedules)",
            "type": "boolean",
            "description": "Remember what was already output (per filter set) and return only new earthquakes / reports and municipalities whose warnings changed. Turn on when running this Actor on a schedule and sending results to Slack, email or a webhook.",
            "default": false
          },
          "maxItems": {
            "title": "Max alerts",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many rows.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}