Fetch only. This package fetches and parses the list. It does not screen names and it stores nothing. List data alone is not a clearance decision.

The UK Sanctions List published by the FCDO (uk), the single source of UK designations since the OFSI Consolidated List closed on 28 January 2026. About 6,400 designations: individuals, entities and ships.

Format used: the XML file (https://sanctionslist.fcdo.gov.uk/docs/UK-Sanctions-List.xml, about 22 MB; the CSV is about 50 MB because it repeats every field per name). It is larger than the default 16 MiB response cap, so it is downloaded in 8 MiB Range requests, which the server supports. Change detection uses its ETag: current-version reads it without downloading the list, and fetch skips the download when you pass the version you already hold.

Example

out ::uk::sanctions/fetch()
out.version
first(out.entries).name

Values

LIST_NAME

LIST_NAME: Str "UK Sanctions List"

MONTHS

MONTHS: Map {
  jan: "01",
  feb: "02",
  mar: "03",
  apr: "04",
  may: "05",
  jun: "06",
  jul: "07",
  aug: "08",
  sep: "09",
  oct: "10",
  nov: "11",
  dec: "12"
}

URL

URL: Str "https://sanctionslist.fcdo.gov.uk/docs/UK-Sanctions-List.xml"

Functions

clean-list

fn (values: Vec): Vec<Str>

Trim strings, drop blanks and duplicates, keep the first-seen order.

Example

::uk::sanctions/clean-list([" Iran ", "Iran", "", null, "Syria"])  // ["Iran", "Syria"]

current-version

fn (): Str?

The list's current version from one HEAD request, without downloading the list: its ETag, or Last-Modified. Compare it with the version you hold to skip a download. Null when the server sends neither, an Err when the request fails.

Example

::uk::sanctions/current-version()

fetch

fn (): Map
fn (known-version: Str?): Map

Download and parse the UK list. Returns {version, entries, unchanged}, with Designation records in entries. known-version is the version you already hold: when the HEAD ETag (or Last-Modified) equals it, nothing is downloaded, unchanged is true and entries is null. A list that parses to no records is an Err.

Example

out ::uk::sanctions/fetch()
again ::uk::sanctions/fetch(out.version)
again.unchanged

iso-date

fn (raw: Str?): Str?

Normalize one published date of birth to ISO 8601, or null when it has no year. Accepts 1948-12-10, 10 Dec 1948, Dec 1948, 1948, circa 1948, 10/12/1948 and dd/mm/1948 (day first), and ranges such as 1959 to 1962 or 01 Jan 1960 to 31 Dec 1962 (1959/1962, 1960/1962).

Example

::uk::sanctions/iso-date("10 Dec 1948")  // "1948-12-10"
::uk::sanctions/iso-date("dd/mm/1963")   // "1963"
::uk::sanctions/iso-date("1959 to 1962") // "1959/1962"

other-names

fn (aliases: Vec, name: Str): Vec<Str>

Cleaned aliases without the primary name, ignoring case.

Example

::uk::sanctions/other-names(["Jane Roe", "JANE ROE", "J. Roe"], "Jane Roe")  // ["J. Roe"]

parse

fn (doc: Str): Vec<Designation>

Parse the whole UK Sanctions List XML into Designation records (pure). Records without a name or id are skipped.

Example

file "<Designations><Designation><UniqueID>CYB0001</UniqueID><Names><Name><Name6>Acme Trading</Name6><NameType>Primary Name</NameType></Name></Names><IndividualEntityShip>Entity</IndividualEntityShip></Designation></Designations>"
map(::uk::sanctions/parse(file), (d) { d.name })  // ["Acme Trading"]

parse-designation

fn (record: Str): Designation

Turn one <Designation> record string into a Designation. Exposed for testing.

Example

record "<Designation><UniqueID>AFG0007</UniqueID><Names><Name><Name1>Jane</Name1><Name6>ROE</Name6><NameType>Primary Name</NameType></Name><Name><Name6>J Roe</Name6><NameType>Alias</NameType></Name></Names><IndividualEntityShip>Individual</IndividualEntityShip></Designation>"
d ::uk::sanctions/parse-designation(record)
d.name  // "Jane ROE"
d.kind  // "individual"
d.aliases  // ["J Roe"]

require-entries

fn (entries: Vec): Vec

The parsed records, or an Err when there are none: a changed file format can parse to nothing, and an empty list must not pass for a list with nobody on it.

Example

::uk::sanctions/require-entries([{id: "AFG0007"}])  // [{id: "AFG0007"}]
is-err(::uk::sanctions/require-entries([]))  // true

Types

Designation

Designation type {
    id: Str,
    kind: DesignationKind,
    name: Str,
    aliases: Vec<Str>,
    dobs: Vec<Str>,
    nationalities: Vec<Str>,
    regimes: Vec<Str>,
    addresses: Vec<Str>,
    other-information: Str?,
    designation-source: Str?,
    un-reference: Str?,
    ofsi-group-id: Str?,
    date-designated: Str?,
    last-updated: Str?,
    url: Str
}

One designation, as the UK Sanctions List XML publishes it.

Fields

  • id — the UniqueID
  • kind — a DesignationKind
  • name — the primary name, its Name1 to Name6 parts joined
  • aliases — every other name, then the non-Latin names
  • dobs — dates of birth as ISO 8601: YYYY-MM-DD, YYYY-MM or YYYY (dd/mm/1963 is "1963")
  • nationalities — as published
  • regimes — the sanctions regime names
  • addresses — one line per address
  • other-information — the OtherInformation text
  • designation-source — who designated it, e.g. "UN"
  • un-reference — the UNReferenceNumber
  • ofsi-group-id — the OFSIGroupID
  • date-designated, last-updated — as published (dd/mm/yyyy)
  • url — the list file

DesignationKind

DesignationKind type "individual" | "entity" | "vessel"

What is designated. The list says Individual, Entity or Ship, and a ship is "vessel" here.