Data & source
Source feed
Section titled “Source feed”The data comes from the official U.S. Department of State advisories feed:
https://travel.state.gov/_res/rss/TAsTWs.xmlIt’s a standard RSS feed with one <item> per country advisory. Each item
carries the threat level and a country code as <category> tags:
<category domain="Threat-Level">Level 3: Reconsider Travel</category><category domain="Country-Tag">NI</category>The advisories endpoint
Section titled “The advisories endpoint”That feed sends no CORS headers, so a browser can’t read it directly. A small serverless proxy (a Netlify function) fetches it server-side, parses every item, and returns clean JSON with permissive CORS. It’s edge-cached for about an hour. Its canonical home is the dedicated subdomain:
GET https://advisories.visamundi.app/api/advisoriesSee Installation for a drop-in snippet that consumes it.
{ "source": "https://travel.state.gov/_res/rss/TAsTWs.xml", "updated": "2026-06-22T08:00:00.000Z", "count": 214, "advisories": [ { "country": "Nigeria", "fips": "NI", "iso2": "NG", "level": 3, "levelLabel": "Reconsider Travel", "date": "Fri, 12 Jun 2026", "link": "https://travel.state.gov/.../nigeria-travel-advisory.html", "summary": "Reconsider travel to Nigeria due to crime, terrorism, unrest, kidnapping, and inconsistent availability of health care services." } ]}The widget renders and filters this list entirely in the browser, so it’s always current — no rebuild needed.
Why the flags need a code mapping
Section titled “Why the flags need a code mapping”The feed’s Country-Tag is a State-Department code, not ISO 3166 — Lesotho is
LT (ISO LS), Turkey is TU (ISO TR), Botswana is BC (ISO BW). Flag
images are keyed by ISO code, so the proxy maps each Country-Tag to its ISO
country code (the iso2 field above) before the widget requests the rounded
flag. A couple of entries (e.g. “French West Indies”) have no single-country flag
and render without one.