{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — Travel Advisory Monitor (UK FCDO, US, Canada)",
    "description": "Official travel advice from the UK FCDO, US State Department and Canada in one table: normalised 1-4 levels, regional warnings, summaries and source links. Monitor mode diffs each run and alerts Slack or a webhook when a country's advice changes.",
    "version": "1.1",
    "x-build-id": "yePXHtz0Tj0W6zKBI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-travel-advisory-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-travel-advisory-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/siteverdict~siteverdict-travel-advisory-monitor/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-travel-advisory-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/siteverdict~siteverdict-travel-advisory-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-travel-advisory-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": {
          "executionMode": {
            "title": "Execution mode",
            "enum": [
              "live",
              "sample"
            ],
            "type": "string",
            "description": "<b>live</b>: fetch the official feeds now. <b>sample</b>: try the Actor on recorded official data from 11 Oct 2026 with a simulated previous run (shows change rows and test alerts; no source calls, nothing charged).",
            "default": "live"
          },
          "countries": {
            "title": "Destinations",
            "type": "array",
            "description": "Country names or ISO codes (\"France\", \"TH\", \"United Arab Emirates\"). Leave empty to cover every destination the governments publish (about 230). Max 300.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Governments to compare",
            "type": "array",
            "description": "Any of <code>uk-fcdo</code> (GOV.UK FCDO foreign travel advice), <code>us-state</code> (US State Department travel advisories), <code>ca-travel</code> (Government of Canada travel advice). Default: all three.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "changes-only"
            ],
            "type": "string",
            "description": "<b>all</b>: one row per destination every run (plus change rows). <b>changes-only</b>: monitoring mode, only change rows and the destinations that changed (the first run outputs the full baseline).",
            "default": "all"
          },
          "includeSummaries": {
            "title": "Include advice summaries",
            "type": "boolean",
            "description": "Add the official summary text (US) and FCDO warning headlines plus the latest update note (UK).",
            "default": true
          },
          "alertOn": {
            "title": "Alert on",
            "enum": [
              "level-change",
              "any-update"
            ],
            "type": "string",
            "description": "<b>level-change</b>: alert when a level goes up or down (or regional warnings change). <b>any-update</b>: also alert when a government republishes its advice without a level change.",
            "default": "level-change"
          },
          "minAlertLevel": {
            "title": "Only alert for levels at or above",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Level changes are alerted when the level before or after is at least this (1 = every level change, 3 = only reconsider/avoid travel and above).",
            "default": 1
          },
          "webhookUrl": {
            "title": "Webhook URL (HTTPS)",
            "type": "string",
            "description": "Optional. Receives a JSON POST with the alertable changes. HTTPS only; private and internal addresses are blocked."
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL",
            "type": "string",
            "description": "Optional. https://hooks.slack.com/services/... receives a short message per run with changes."
          },
          "aiProvider": {
            "title": "AI brief (optional, your own key)",
            "enum": [
              "none",
              "anthropic",
              "openai"
            ],
            "type": "string",
            "description": "Off by default. Writes a short travel-risk briefing from this run's rows using YOUR Anthropic or OpenAI key. Only the run's results are sent to the provider.",
            "default": "none"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "Your own Anthropic or OpenAI API key. Stored encrypted by Apify, never logged or output."
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Defaults: claude-sonnet-5-5 (Anthropic) or gpt-4o-mini (OpenAI)."
          },
          "stateStoreName": {
            "title": "Monitoring state store",
            "type": "string",
            "description": "Named key-value store that remembers the last run (needed for change detection). Use different names for separate watch-lists.",
            "default": "siteverdict-travel-advisory-state"
          },
          "requestDelayMs": {
            "title": "Politeness delay for GOV.UK pages (ms)",
            "minimum": 300,
            "maximum": 10000,
            "type": "integer",
            "description": "Gap between GOV.UK page requests. Unchanged pages are reused from the state store, so scheduled runs fetch only what changed.",
            "default": 700
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}