DEV Community

DataForge
DataForge

Posted on

Screen a supplier list against OFAC, UN and UK sanctions lists in Python

If you onboard suppliers or customers, someone eventually asks whether they were checked against sanctions lists. The lists are public, but downloading, parsing and matching names across OFAC, UN and UK files is tedious. This is a small way to do a first-pass screen.

Disclosure: I built the Actor used here. It is a screening helper, not a compliance or KYC service, and a clean result is not a legal clearance.

What it checks

  • OFAC SDN and Consolidated lists
  • UN Security Council Consolidated List
  • UK Sanctions List (entities only)

It does not cover the EU list, ownership or control chains, individuals, or all name variants. Those gaps are returned in a NOT_COVERED field on every record so they stay visible.

Run it

from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("dataforge_api/counterparty-risk-check-ppe").call(run_input={
    "counterparties": ["Rosneft Oil Company", "Apple Inc.|US", "Bank Melli Iran"],
    "sanctionsLists": ["OFAC", "UN", "UK"],
    "deepReport": False,
})
for r in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(r["query"], r["risk_level"], r["sanctions_status"], r["risk_flags"])
Enter fullscreen mode Exit fullscreen mode

Real output from this run:

Rosneft Oil Company  high            potential_match           ['sanctions_exact_match']
Apple Inc.           low_or_unknown  no_match_in_checked_lists []
Bank Melli Iran      high            potential_match           ['sanctions_exact_match']
Enter fullscreen mode Exit fullscreen mode

Add a two-letter country code after a pipe (Apple Inc.|US) to reduce false hits.

Matching and false positives

The Actor reports exact name matches, exact token matches and fuzzy matches with the matched list entry, so a person can review each hit. Common names will produce false positives. Treat every potential_match as a prompt for manual review, not as a verdict.

Optional deep report

With deepReport: true it adds the company's GLEIF LEI status and ultimate parent, and total US federal awards from USAspending. Real output for two companies:

Siemens AG                   LEI 529900QBVWXMWANH7H45  parent: Siemens Aktiengesellschaft
Lockheed Martin Corporation  LEI DPRBOZP0K5RM2YE8UU08  US federal awards: about $15.6 billion
Enter fullscreen mode Exit fullscreen mode

Cost

Pay per event: $0.04 per check, $0.08 for a deep report. Checking 100 vendors costs $4.

Audit trail

Log the input, the run ID and the output record for each check. The record includes which lists were checked.

Actor page and ready-made examples: https://apify.com/dataforge_api/counterparty-risk-check-ppe

Top comments (0)