{
  "openapi": "3.0.1",
  "info": {
    "title": "Supply Chain Risk Monitor — Earthquakes & Wildfires",
    "description": "Returns a 0–100 earthquake and wildfire risk score per supplier site or port from USGS and NASA FIRMS data, with reasons and alerts when a level rises; failed and unchanged rows are never charged. Our own score from the listed facts; not advice. Not affiliated with or endorsed by the USGS or NASA.",
    "version": "0.1",
    "x-build-id": "D4SnE1Ltj3E45NtMy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mouadapi~supply-chain-risk-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mouadapi-supply-chain-risk-monitor",
        "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/mouadapi~supply-chain-risk-monitor/runs": {
      "post": {
        "operationId": "runs-sync-mouadapi-supply-chain-risk-monitor",
        "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/mouadapi~supply-chain-risk-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-mouadapi-supply-chain-risk-monitor",
        "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": {
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Your sites, up to 200: \"latitude,longitude\" with an optional name first and an optional radius in km after (\"Shenzhen plant: 22.54,114.06\", \"Port of Rotterdam: 51.95,4.14,50\"), or objects { \"name\", \"latitude\", \"longitude\", \"radiusKm\" }. Coordinates only: no address or place-name lookup.",
            "items": {
              "type": "string"
            }
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "number",
            "description": "How far around each site to look, unless the site gives its own radius (1 to 500 km).",
            "default": 100
          },
          "earthquakeDays": {
            "title": "Earthquake window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Earthquakes of the last N UTC days, today included (1 to 365).",
            "default": 30
          },
          "minMagnitude": {
            "title": "Minimum earthquake magnitude",
            "minimum": 2.5,
            "maximum": 10,
            "type": "number",
            "description": "Smallest earthquake magnitude counted (2.5 to 10). Earthquakes under M4 add no points to the score; they still count in earthquakeCount when you set a lower minimum.",
            "default": 4
          },
          "fireDays": {
            "title": "Fire window (days)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "NASA FIRMS fire detections of the last N UTC days, today included (1 to 10).",
            "default": 3
          },
          "minFireConfidence": {
            "title": "Minimum fire confidence",
            "enum": [
              "low",
              "nominal",
              "high"
            ],
            "type": "string",
            "description": "Smallest NASA FIRMS confidence class counted: low (every detection, more false alarms), nominal or high.",
            "default": "nominal"
          },
          "fireSources": {
            "title": "Fire products",
            "type": "array",
            "description": "The NASA FIRMS near-real-time products to read: VIIRS on NOAA-20 and NOAA-21 (375 m pixels) and MODIS on Terra and Aqua (1 km pixels).",
            "items": {
              "type": "string",
              "enum": [
                "VIIRS_NOAA20_NRT",
                "VIIRS_NOAA21_NRT",
                "MODIS_NRT"
              ],
              "enumTitles": [
                "VIIRS NOAA-20 (375 m)",
                "VIIRS NOAA-21 (375 m)",
                "MODIS Terra and Aqua (1 km)"
              ]
            },
            "default": [
              "VIIRS_NOAA20_NRT",
              "VIIRS_NOAA21_NRT"
            ]
          },
          "firmsApiKey": {
            "title": "NASA FIRMS key (MAP_KEY)",
            "type": "string",
            "description": "Your own free NASA FIRMS MAP_KEY, sent to you by email when you ask for it at https://firms.modaps.eosdis.nasa.gov/api/map_key/. Without it the score covers earthquakes only (0 to 60) and each row says so. Used only in requests to NASA FIRMS; never logged, stored or returned."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "watch",
              "export"
            ],
            "type": "string",
            "description": "Empty: watch when a watch list name is given, otherwise export. \"watch\" returns only sites whose score or level changed since the last run of the watch list; \"export\" returns every site. An explicit mode wins."
          },
          "watchListName": {
            "title": "Watch list name",
            "type": "string",
            "description": "Name of your site watch list (kept in your own storage between runs). Giving a name turns on watch mode. Watch mode without a name uses the list \"default\". Changing the windows or filters starts the list again (every site a baseline row)."
          },
          "includeUnchanged": {
            "title": "Include unchanged sites",
            "type": "boolean",
            "description": "Watch mode: also return sites whose score did not change since the last run (free).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}