# Official Travel Advisory Comparator — US, UK & Canada (`rhincodontypus/official-travel-advisory-comparator`) Actor

Compare current official U.S., U.K., and Canadian government travel advisories for one destination. Returns normalized severity, available regional warnings, risk categories, and official source URLs as structured data for AI agents and automation workflows.

- **URL**: https://apify.com/rhincodontypus/official-travel-advisory-comparator.md
- **Developed by:** [Jonathan Brown](https://apify.com/rhincodontypus) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 destination lookups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Official Travel Advisory Comparator — US, UK & Canada

Look up **one country or territory** and get its current **official government travel advisories**
from the **U.S. Department of State**, the **U.K. Foreign, Commonwealth & Development Office (FCDO)**
and the **Government of Canada**, side by side, as **one structured JSON record**.

Each government uses its own wording and scale ("Level 3: Reconsider Travel", "advises against all
but essential travel to parts", "Exercise a high degree of caution"). This Actor keeps that native
wording and adds a **normalized 1–4 severity**, **available regional (sub-national) warnings**, **risk
categories**, source dates and **official source URLs**. That way you can **compare travel advisories**
and check for disagreement between governments without scraping three websites.

It is a deterministic data utility, not a chatbot. It uses no LLM and no browser. It reads the
governments' own published data feeds, and the same input always produces the same structure.

### What you can use it for

- **AI agents and assistants:** answer "Is it safe to travel to X?" with what governments actually
  say, citing the sources (callable through the Apify MCP server).
- **Travel risk and duty-of-care checks:** gate trip approval when any government says
  "avoid all travel", or flag regional warnings for an itinerary.
- **Destination safety data:** a country travel risk field for travel apps, insurance and
  booking flows.
- **Spotting disagreement:** `comparison.materialDisagreement` is `true` when governments differ
  by two or more levels.

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `destination` | string | yes | | One country or territory. Common names, alternate spellings and ISO codes work: `"Trinidad and Tobago"`, `"trinidad & tobago"`, `"Turkey"` → Türkiye, `"Ivory Coast"` / `"Côte d'Ivoire"`, `"TT"`, `"MEX"`. |
| `sources` | array | no | `["US","UK","CA"]` | Any two or three of `US`, `UK`, `CA`. Case-insensitive aliases are normalized to these codes: `us`/`usa`/`united states`/`state department`, `uk`/`fcdo`/`united kingdom`/`gov.uk`, `ca`/`can`/`canada`/`travel.gc.ca`. |
| `includeRegional` | boolean | no | `true` | Include the list of regional warnings. Regional *maximum* severity is always returned. |

```json
{ "destination": "Trinidad and Tobago" }
```

Unknown or ambiguous names are never guessed. `"Congo"`, `"Korea"` and `"Virgin Islands"` return
`invalid_destination` with a `candidates` list, and the lookup is not charged.

### Output

Every run writes **exactly one dataset item**. Real output for `{"destination": "Trinidad and Tobago"}`
(retrieved 2026-10-07; long regional details and risk-label lists shortened with "…"):

```json
{
  "schemaVersion": "1.2",
  "status": "success",
  "query": {
    "input": "Trinidad and Tobago",
    "canonicalDestination": "Trinidad and Tobago",
    "iso2": "TT",
    "iso3": "TTO",
    "matchMethod": "name",
    "candidates": []
  },
  "checkedAt": "2026-10-07T21:32:00Z",
  "sourcesRequested": [
    "US",
    "UK",
    "CA"
  ],
  "sourcesSucceeded": [
    "US",
    "UK",
    "CA"
  ],
  "sourcesFailed": [],
  "errors": [],
  "advisories": [
    {
      "sourceCode": "US",
      "sourceName": "U.S. Department of State",
      "sourceUrl": "https://travel.state.gov/content/tsg_aem/us/en/home/international-travel/travel-advisories/destination.tto.html",
      "retrievalUrl": "https://travel.state.gov/_res/rss/TAsTWs.xml",
      "retrievedAt": "2026-10-07T21:32:00Z",
      "sourceUpdatedAt": "2026-04-13",
      "nativeLevel": "Level 3",
      "nativeAdvice": "Reconsider Travel",
      "nativeScale": {
        "type": "numbered",
        "description": "U.S. Department of State uses advisory Levels 1 through 4 (1 Exercise Normal Precautions, 2 Exercise Increased Caution, 3 Reconsider Travel, 4 Do Not Travel)."
      },
      "normalizedSeverity": {
        "overall": 3,
        "regionalMax": null,
        "hasRegionalEscalation": null,
        "basis": "Mapped from U.S. Department of State Level 3 (Reconsider Travel)",
        "scaleNote": "Internal cross-source normalization used by this Actor for comparison (1 normal precautions, 2 increased caution, 3 avoid non-essential/reconsider travel, 4 avoid all travel). Not necessarily the source government's native advisory level; see nativeLevel, nativeAdvice and nativeScale for the official terminology."
      },
      "riskCategories": [
        "crime",
        "terrorism",
        "health"
      ],
      "nativeRiskLabels": [
        "crime",
        "health",
        "terrorism"
      ],
      "riskCategoriesBasis": "Risk factors named in the advisory summary sentence ('... due to ...').",
      "regionalCoverage": "unavailable",
      "regionalCoverageNote": "Regional advisory detail is unavailable from the U.S. State Department RSS source used by this Actor.",
      "regionalWarnings": null
    },
    {
      "sourceCode": "UK",
      "sourceName": "U.K. Foreign, Commonwealth & Development Office",
      "sourceUrl": "https://www.gov.uk/foreign-travel-advice/trinidad-and-tobago",
      "retrievalUrl": "https://www.gov.uk/api/content/foreign-travel-advice/trinidad-and-tobago",
      "retrievedAt": "2026-10-07T21:32:00Z",
      "sourceUpdatedAt": "2026-09-21T15:13:58Z",
      "nativeLevel": "none",
      "nativeAdvice": null,
      "nativeScale": {
        "type": "categorical",
        "description": "UK FCDO uses advisory wording such as 'against all travel' or 'against all but essential travel' (to the whole country or to parts of it) rather than a numbered national scale; nativeLevel lists the GOV.UK alert_status codes."
      },
      "normalizedSeverity": {
        "overall": 1,
        "regionalMax": null,
        "hasRegionalEscalation": false,
        "basis": "GOV.UK alert_status=[]: no FCDO advice against travel to the whole country, mapped to 1 (the FCDO has no intermediate national levels)",
        "scaleNote": "Internal cross-source normalization used by this Actor for comparison (1 normal precautions, 2 increased caution, 3 avoid non-essential/reconsider travel, 4 avoid all travel). Not necessarily the source government's native advisory level; see nativeLevel, nativeAdvice and nativeScale for the official terminology."
      },
      "riskCategories": [
        "crime",
        "terrorism",
        "natural_disaster"
      ],
      "nativeRiskLabels": [
        "Terrorism",
        "Terrorism in Trinidad and Tobago",
        "Violent crime and assault",
        "Drug assisted robbery and sexual assault",
        "Extreme weather and natural disasters",
        "Hurricanes",
        "…"
      ],
      "riskCategoriesBasis": "Section headings of the GOV.UK 'Safety and security' page that match the vocabulary.",
      "regionalCoverage": "available",
      "regionalCoverageNote": null,
      "regionalWarnings": []
    },
    {
      "sourceCode": "CA",
      "sourceName": "Government of Canada",
      "sourceUrl": "https://travel.gc.ca/destinations/trinidad-and-tobago",
      "retrievalUrl": "https://data.international.gc.ca/travel-voyage/cta-cap-tt.json",
      "retrievedAt": "2026-10-07T21:32:00Z",
      "sourceUpdatedAt": "2026-09-24T12:53:00Z",
      "nativeLevel": "advisory-state 1",
      "nativeAdvice": "Exercise a high degree of caution",
      "nativeScale": {
        "type": "categorical",
        "description": "Government of Canada uses named advisory categories rather than numbered levels: 'Take normal security precautions', 'Exercise a high degree of caution', 'Avoid non-essential travel', 'Avoid all travel'. nativeLevel 'advisory-state N' is an internal feed code, not a public level."
      },
      "normalizedSeverity": {
        "overall": 2,
        "regionalMax": 3,
        "hasRegionalEscalation": true,
        "basis": "Mapped from Government of Canada risk level 'Exercise a high degree of caution' (advisory-state 1)",
        "scaleNote": "Internal cross-source normalization used by this Actor for comparison (1 normal precautions, 2 increased caution, 3 avoid non-essential/reconsider travel, 4 avoid all travel). Not necessarily the source government's native advisory level; see nativeLevel, nativeAdvice and nativeScale for the official terminology."
      },
      "riskCategories": [
        "crime",
        "terrorism",
        "civil_unrest",
        "maritime"
      ],
      "nativeRiskLabels": [
        "Crime",
        "Petty crime",
        "Violent crime",
        "Terrorism",
        "Fraud",
        "Demonstrations",
        "…"
      ],
      "riskCategoriesBasis": "Section headings of the travel.gc.ca 'Safety and security' section that match the vocabulary.",
      "regionalCoverage": "available",
      "regionalCoverageNote": null,
      "regionalWarnings": [
        {
          "region": "Regional Advisory",
          "nativeAdvice": "Avoid non-essential travel",
          "normalizedSeverity": 3,
          "nativeDetails": [
            "Avoid non-essential travel to the following areas due to high levels of violence and gang-related crime:",
            "Beetham Estate Gardens",
            "Cocorite (north of Western Main Road)",
            "…"
          ]
        }
      ]
    }
  ],
  "comparison": {
    "availableSeverityValues": [
      3,
      1,
      2
    ],
    "lowestOverallSeverity": 1,
    "highestOverallSeverity": 3,
    "severitySpread": 2,
    "materialDisagreement": true,
    "highestRegionalSeverity": 3,
    "regionalCoverage": {
      "status": "partial",
      "sourcesAvailable": [
        "UK",
        "CA"
      ],
      "sourcesUnavailable": [
        "US"
      ],
      "allRequestedSourcesKnown": false
    },
    "regionalWarningConclusion": "warnings_reported",
    "sourcesWithRegionalWarnings": [
      "CA"
    ],
    "sourcesAtHighestOverallSeverity": [
      "US"
    ]
  },
  "billing": {
    "billable": true,
    "eventName": "destination-lookup",
    "reason": "3 official sources compared"
  }
}
```

#### Key fields

| Field | Meaning |
|---|---|
| `status` | `success` (all requested sources returned data), `partial` (at least 2 returned data, at least 1 failed), `insufficient_sources` (fewer than 2 returned data), `invalid_destination` |
| `query` | Your input, the canonical name, ISO-2/ISO-3 codes and `matchMethod` (`name`, `alias`, `iso_code`, `fuzzy`) |
| `advisories[]` | One entry per government that returned data |
| `advisories[].nativeLevel` / `nativeAdvice` | The government's own level and wording, unchanged |
| `advisories[].nativeScale` | How that government expresses its own levels: `numbered` (U.S. Levels 1–4) or `categorical` (U.K. FCDO wording, Canada's named categories) |
| `advisories[].normalizedSeverity.overall` | National advisory on the Actor's **internal** 1–4 scale, for cross-source comparison only. It is not the government's own level: Canada and the U.K. do not number their advisories |
| `advisories[].normalizedSeverity.regionalMax` | Most severe regional warning. Kept separate from `overall` and never merged into it |
| `advisories[].regionalCoverage` | `available`: the source data was enough to determine regional-warning status. `unavailable`: this source does not provide enough regional detail, so regional status is **unknown** (see `regionalCoverageNote`). `not_applicable`: regional breakdown does not apply |
| `advisories[].regionalWarnings[]` | Region, native advice, normalized severity and verbatim details. `[]` = checked, no regional warnings. `null` = unknown (`regionalCoverage: "unavailable"`) or omitted (`includeRegional: false`) |
| `advisories[].riskCategories` | Controlled vocabulary: `crime`, `terrorism`, `kidnapping`, `civil_unrest`, `armed_conflict`, `arbitrary_detention`, `health`, `natural_disaster`, `border_security`, `maritime`, `landmines`, `wrongful_detention`, `other` |
| `advisories[].sourceUrl` / `sourceUpdatedAt` | Official page and the source's own last-updated date |
| `comparison` | `availableSeverityValues`, lowest/highest, `severitySpread` (max − min), `materialDisagreement` (spread ≥ 2), `highestRegionalSeverity` (highest regional severity actually observed; `null` alone does **not** mean no regional warnings exist), `regionalCoverage` (`complete` / `partial` / `unavailable`, with `sourcesAvailable` and `sourcesUnavailable`), `regionalWarningConclusion`, `sourcesWithRegionalWarnings`, `sourcesAtHighestOverallSeverity`. `regionalWarningConclusion` is `warnings_reported` (at least one source reports a regional warning), `none_reported` (regional coverage is complete and no source reports one) or `unknown_due_to_incomplete_coverage` (none observed, but at least one source's regional status is unknown, so absence cannot be concluded) |
| `errors[]` | Per-source failures: `DESTINATION_NOT_FOUND`, `UPSTREAM_UNAVAILABLE`, `UPSTREAM_TIMEOUT`, `PARSER_FAILED`, `UNEXPECTED_SOURCE_FORMAT`, plus `INVALID_DESTINATION` |
| `billing` | Whether this lookup was charged, and why |

#### Normalized severity scale

| Normalized | U.S. State Department | U.K. FCDO | Government of Canada |
|---|---|---|---|
| 1 Normal precautions | Level 1: Exercise Normal Precautions | No whole-country "advise against" warning | Take normal security precautions |
| 2 Increased caution | Level 2: Exercise Increased Caution | (no equivalent) | Exercise a high degree of caution |
| 3 Avoid non-essential / reconsider | Level 3: Reconsider Travel | Advises against all but essential travel to the whole country | Avoid non-essential travel |
| 4 Avoid all travel | Level 4: Do Not Travel | Advises against all travel to the whole country | Avoid all travel |

The U.K. FCDO has no national level 2. When it warns only about **parts** of a country, its
`overall` stays 1, and the warnings appear in `regionalMax` and `regionalWarnings`. For example,
Ukraine shows UK `overall: 1, regionalMax: 4`. Always read `overall` together with `regionalMax`.

Normalized values are a convenience for comparing different government systems. Quote each government's own
terms from `nativeLevel` / `nativeAdvice` (for example, Canada's "Exercise a high degree of caution", not "Level 2").

### Pricing

Pay per event: **$0.01 per `destination-lookup`**. You are charged once, only when the lookup
compares at least two official sources (`success` or `partial`). You are **not** charged for
`invalid_destination`, `insufficient_sources`, invalid input or failed runs.

A typical lookup finishes in under a second (live test: median about 0.26 s, slowest about 0.9 s,
plus Actor start-up).

### Sources and method

| Government | Data used | Official page linked |
|---|---|---|
| U.S. Department of State | Travel advisories RSS feed `travel.state.gov/_res/rss/TAsTWs.xml` | travel.state.gov advisory page |
| U.K. FCDO | GOV.UK Content API `www.gov.uk/api/content/foreign-travel-advice/{country}` | gov.uk/foreign-travel-advice |
| Government of Canada | Open data `data.international.gc.ca/travel-voyage/cta-cap-{iso}.json` | travel.gc.ca/destinations |

- Sources are fetched concurrently, with timeouts and up to 3 attempts for transient errors.
  If one government's site fails, the others' results are still returned.
- Risk categories come only from explicit headings or phrases: U.S. "due to …" summary phrases,
  U.K. "Safety and security" headings, Canada "Safety and security" headings. Nothing is inferred.
- If a source's format changes, the Actor reports `UNEXPECTED_SOURCE_FORMAT` / `PARSER_FAILED` for
  that source. It never returns empty fields that would look like "no risk".

### Limitations

- **Current advisories only.** No history, monitoring or alerts.
- **English only.**
- **U.S. regional detail comes from the feed summary.** For some destinations (e.g. Mexico), the State
  Department lists states only on its full web page, which blocks automated access. When the feed
  names no regions, the U.S. entry has `regionalCoverage: "unavailable"` and `regionalWarnings`,
  `regionalMax` and `hasRegionalEscalation` are all `null` (unknown, not "none").
- **Some grouped or special destinations are covered by only some governments.** Examples are the West
  Bank and Gaza, the Canary Islands, the Azores and French overseas territories. Expect
  `partial` or `DESTINATION_NOT_FOUND` for some sources.
- **This is not travel, legal or insurance advice.** Always read the linked official pages before making
  decisions.

### Using it from an AI agent (MCP)

Connect your agent to the Apify MCP server (`https://mcp.apify.com`) and search for "travel
advisory", or add this Actor as a tool directly. Call it with `{"destination": "<country>"}` and read
`status`, `advisories[].normalizedSeverity` and `comparison`.

### FAQ

**Does it call an LLM?** No. Parsing is rule-based, so outputs are reproducible.

**Why do the US and UK numbers differ so often?** The scales are different. The UK has no "increased
caution" national level, and the US level 2 is common. `materialDisagreement` only flags gaps of two
or more levels.

**Can I look up several countries?** One destination per run, so each lookup is priced and
cached independently. Run it once per country.

# Actor input Schema

## `destination` (type: `string`):

One country or territory, in English. Common alternate names and ISO 3166-1 codes are accepted, e.g. "Trinidad and Tobago", "Turkey" (resolves to Türkiye), "Ivory Coast", "TT". Ambiguous or unknown names return status "invalid_destination" and are not charged.

## `sources` (type: `array`):

Governments to compare (at least two). Canonical codes: US (U.S. Department of State), UK (U.K. Foreign, Commonwealth & Development Office), CA (Government of Canada). Case-insensitive aliases are also accepted and normalized: us, usa, united states, state department; uk, fcdo, united kingdom, gov.uk; ca, can, canada, travel.gc.ca.

## `includeRegional` (type: `boolean`):

Include the list of sub-national (regional) warnings that could be extracted from each source (availability varies by source). Regional maximum severity is always reported in normalizedSeverity.

## Actor input object example

```json
{
  "destination": "Trinidad and Tobago",
  "sources": [
    "US",
    "UK",
    "CA"
  ],
  "includeRegional": true
}
```

# Actor output Schema

## `comparison` (type: `string`):

The single comparison record (status, resolved destination, per-government advisories, normalized severities, regional warnings, comparison summary and billing flag).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "destination": "Trinidad and Tobago"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rhincodontypus/official-travel-advisory-comparator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "destination": "Trinidad and Tobago" }

# Run the Actor and wait for it to finish
run = client.actor("rhincodontypus/official-travel-advisory-comparator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "destination": "Trinidad and Tobago"
}' |
apify call rhincodontypus/official-travel-advisory-comparator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rhincodontypus/official-travel-advisory-comparator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NlGhYH3A5vpWZe3Th/builds/KS0FmI5NpYqyXtq6C/openapi.json
