Skip to content

n3xpect/ofac-sanction-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofac-sdn

A Go CLI tool for querying the OFAC SDN (Specially Designated Nationals) Enhanced XML list.

Indexes a 101MB XML file containing 18,707 entities in 2-3 seconds; all subsequent queries respond in <50ms.

Installation

go build -o ofac-sdn .

Usage

1. Build index (run once)

./ofac-sdn build

The index is saved to ~/.cache/ofac-sdn/index.db.

Custom XML/DB path:

./ofac-sdn build --xml /path/to/SDN_ENHANCED.XML --db /path/to/index.db

2. Search

Search by name:

./ofac-sdn search --name "banco nacional"
./ofac-sdn search --name "putin"

Filter by program:

./ofac-sdn search --program IRAN
./ofac-sdn search --program CUBA --type Entity

Filter by type:

./ofac-sdn search --type Vessel
./ofac-sdn search --type Aircraft --program RUSSIA-EO14024

Filter by country:

./ofac-sdn search --country Russia
./ofac-sdn search --country Iran --type Individual --limit 50

Combinations (AND logic):

./ofac-sdn search --program IRAN --type Individual --name "ali"

Single entity detail:

./ofac-sdn get --id 306
./ofac-sdn get --id 35096

JSON output:

./ofac-sdn search --name "putin" --json
./ofac-sdn get --id 306 --json

Verbose output:

./ofac-sdn search --program CUBA --verbose

3. List

./ofac-sdn list-programs    # all program codes and counts
./ofac-sdn list-countries   # all countries and counts

Global Flags

Flag Description
--xml PATH Path to XML file (default: ./SDN_ENHANCED.XML)
--db PATH Path to index database (default: ~/.cache/ofac-sdn/index.db)
--json JSON output
--verbose Full detailed output

Environment variables: OFAC_XML_PATH, OFAC_DB_PATH

Entity Types

  • Individual — Individuals (7,391 records)
  • Entity — Companies/Organizations (9,519 records)
  • Vessel — Ships (1,455 records)
  • Aircraft — Aircraft (342 records)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors