{
  "openapi": "3.0.1",
  "info": {
    "title": "NASA FIRMS Active Fire Hotspots — PSPS / Wildfire AOI Watch",
    "description": "Near-real-time NASA FIRMS VIIRS/MODIS thermal hotspots for PSPS / wildfire bbox AOIs with KV watermark deltas. Emits firms-hotspot events. NOT WFIGS/NIFC/EFFIS incident perimeters. No MAP_KEY required. From $0.40 per 1,000 successful AOI hotspot rows — empty/error/outside bbox cost $0.",
    "version": "0.1",
    "x-build-id": "d4UPRpv8GUPk65ply"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grokbob~nasa-firms-active-fire-hotspots/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grokbob-nasa-firms-active-fire-hotspots",
        "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/grokbob~nasa-firms-active-fire-hotspots/runs": {
      "post": {
        "operationId": "runs-sync-grokbob-nasa-firms-active-fire-hotspots",
        "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/grokbob~nasa-firms-active-fire-hotspots/run-sync": {
      "post": {
        "operationId": "run-sync-grokbob-nasa-firms-active-fire-hotspots",
        "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",
        "required": [
          "aois"
        ],
        "properties": {
          "aois": {
            "title": "AOI watchlist",
            "minItems": 1,
            "type": "array",
            "description": "One or more AOIs: { aoiId?, label?, bbox: [west, south, east, north] }. Required (minItems 1). Empty AOI is invalid — no global CSV dump.",
            "items": {
              "type": "object",
              "properties": {
                "aoiId": {
                  "type": "string",
                  "title": "AOI id",
                  "description": "Stable id for this AOI (e.g. corridor-feeder-17)."
                },
                "label": {
                  "type": "string",
                  "title": "AOI label",
                  "description": "Human label for this AOI."
                },
                "bbox": {
                  "type": "array",
                  "title": "Bbox",
                  "description": "WGS84 [west, south, east, north] degrees.",
                  "minItems": 4,
                  "maxItems": 4,
                  "items": {
                    "type": "number"
                  }
                }
              },
              "required": [
                "bbox"
              ]
            }
          },
          "sensors": {
            "title": "Sensors",
            "type": "array",
            "description": "FIRMS sensors to fetch. Default VIIRS NOAA-20 + SNPP. Allowed: VIIRS_NOAA20, VIIRS_SNPP, MODIS.",
            "items": {
              "type": "string"
            },
            "default": [
              "VIIRS_NOAA20",
              "VIIRS_SNPP"
            ]
          },
          "windowHours": {
            "title": "Window hours",
            "minimum": 24,
            "maximum": 48,
            "type": "integer",
            "description": "FIRMS Global CSV window hours. Use 24 or 48 (validated at run).",
            "default": 24
          },
          "since": {
            "title": "Since watermark (delta)",
            "type": "string",
            "description": "ISO datetime. Emit changeType=new for detections after this instant / unseen hotspotId. Empty = AOI snapshot in window (still AOI-filtered)."
          },
          "deltaOnly": {
            "title": "Delta only",
            "type": "boolean",
            "description": "When true, skip changeType=seen rows already in KV watermark.",
            "default": true
          },
          "maxEvents": {
            "title": "Max events",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on firms-hotspot rows pushed this run.",
            "default": 5000
          },
          "minFrpMw": {
            "title": "Min FRP (MW)",
            "type": "number",
            "description": "Optional minimum fire radiative power in MW. Leave empty for no FRP floor."
          },
          "confidence": {
            "title": "Confidence filter",
            "type": "array",
            "description": "VIIRS: nominal/high/low. MODIS: numeric threshold strings. Empty = all.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "dryRunMock": {
            "title": "Dry-run mock (local / CI)",
            "type": "boolean",
            "description": "Use in-memory mock hotspots — no live FIRMS GET.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}