5 Free Sanctions APIs That Automate EU AI Act Compliance
security, #api, #ai, #cybersecurity A green CI/CD build means almost nothing to a regulator. Your AI hiring tool can pass every unit test, lint rule, and license scan, and still ship training labels from a sanctioned data broker. Legal only has to ask one question to turn that green pipeline red: who screened the vendors? High-risk AI systems need more than accurate models. A sanctioned supplier can poison your training data, cloud bill, or payment rail. The failure is usually not negligence; it is that compliance checks live in spreadsheets while the code lives in Git. A CI-ready sanctions helper in 40 lines I wanted the check inside the same pipeline that runs pytest. This helper screens a list of names against all five major sanctions lists and prints a markdown report that the CI runner can fail on. import os import sys import requests API_KEY = os . getenv ( " RAPIDAPI_KEY " ) if not API_KEY : sys . exit ( " RAPIDAPI_KEY is not set " ) URL = " https://sanctions-screener.p.rapidapi.com/screen " HEADERS = { " X-RapidAPI-Key " : API_KEY , " X-RapidAPI-Host " : " sanctions-screener.p.rapidapi.com " , } def screen_name ( name : str ) -> dict : try : r = requests . get ( URL , headers = HEADERS , params = { " name " : name }, timeout = 10 , ) r . raise_for_status () return r . json () except requests . exceptions . Timeout : return { " error " : f " timeout for { name } " } except requests . exceptions . RequestException as e : return { " error " : f " request failed: { e } " } def print_report ( name : str , result : dict ) -> None : print ( f " ## { name } " ) if " error " in result : print ( f " **ERROR:** { result [ ' error ' ] } " ) return verdict = result . get ( " verdict " , " UNKNOWN " ) print ( f " **Verdict:** { verdict } " ) matches = result . get ( " matches " , []) if not matches : print ( " - No matches " ) return for hit in matches : field = hit . get ( " matched_field " , " unknown " ) mtype = hit . get ( " match_type " , " unknown " ) tokens = hit .