# OFAC SDN Sanctions List, Crypto Addresses & Delta Scraper (`groundplanes/ofac-sanctions-crypto-entity-delta-scraper`) Actor

Flatten the US Treasury OFAC SDN and consolidated sanctions lists into one row per designated person, entity, vessel or aircraft, with aliases, addresses, crypto wallet addresses, IDs, and new-or-modified delta monitoring.

- **URL**: https://apify.com/groundplanes/ofac-sanctions-crypto-entity-delta-scraper.md
- **Developed by:** [Groundplane Labs](https://apify.com/groundplanes) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 entries

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## OFAC SDN Sanctions List, Crypto Addresses & Delta Scraper

Turn the US Treasury OFAC sanctions lists into clean JSON: one row per designated person, company, vessel or aircraft, with every alias, address, program, crypto wallet address, vessel IMO or aircraft tail number, and tax or business-registration ID. Monitor mode returns only the entries that are new or changed since your last run.

> This actor is an independent tool. It is not affiliated with or endorsed by the U.S. Department of the Treasury or the Office of Foreign Assets Control (OFAC). It is a data feed, not a screening decision: confirm any potential match against OFAC's own Sanctions List Search before acting.

### What it does

- Downloads OFAC's official **enhanced XML** exports from the Sanctions List Service: `SDN_ENHANCED.XML` (the Specially Designated Nationals and Blocked Persons list, about 110 MB) and `CONS_ENHANCED.XML` (OFAC's non-SDN consolidated lists: Sectoral Sanctions Identifications, Non-SDN Menu-Based Sanctions and others).
- Streams each file to disk and parses it incrementally, so the full 110 MB document is never held in memory.
- Proves the file is complete before emitting anything: the SDN file's sha-256 is checked against the Digest header OFAC sends, the entity count from a raw byte scan must equal the parser's count, and the list must clear a minimum size. A short, truncated or reshaped file fails loudly; it never ships as a smaller list.
- Applies your filters (list, entity type, program, crypto-only) and sorts newest listing first.
- **Monitor mode** compares every entry's content hash with your last snapshot and emits only `NEW` and `MODIFIED` entries. A run with any source problem never advances the snapshot.

### Who it's for

- Crypto exchanges, wallets and blockchain analytics teams who need every OFAC-listed wallet address in a machine-readable feed.
- Compliance and KYC teams that load OFAC data into their own screening tools and want a daily delta instead of a full reload.
- Maritime and aviation risk teams tracking sanctioned vessels (IMO numbers) and aircraft (tail numbers).

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `listSource` | enum | `SDN_AND_CONSOLIDATED` | `SDN_ONLY`, `CONSOLIDATED_ONLY`, or both. |
| `entityTypesFilter` | array | all four | `Entity`, `Individual`, `Vessel`, `Aircraft`. Empty = all. |
| `onlyWithDigitalCurrencyAddresses` | boolean | `false` | Only entries that list at least one crypto wallet address. |
| `sanctionsProgramsFilter` | array | `[]` (all) | Program codes as OFAC publishes them, for example `SDGT`, `IRAN`, `CYBER2`, `DPRK3`, `RUSSIA-EO14024`. Matches if an entry carries any of them. Case does not matter. |
| `onlyNewOrModifiedSinceLastRun` | boolean | `false` | Monitor mode (see below). |
| `maxItems` | integer | `5000` | Maximum rows, newest listing first. **The full list is about 19,900 entries.** Set 25000 or more to get all of it. A run that stops at this cap ends `PARTIAL` and says how many entries were left out. |

#### Example input (canary)

```json
{
  "listSource": "SDN_AND_CONSOLIDATED",
  "entityTypesFilter": ["Entity", "Individual", "Vessel", "Aircraft"],
  "onlyWithDigitalCurrencyAddresses": true,
  "sanctionsProgramsFilter": [],
  "onlyNewOrModifiedSinceLastRun": false,
  "maxItems": 5000
}
```

On the 2026-10-28 SDN publication this returns 109 entries with crypto addresses.

#### Example run options (default $50 max charge)

```json
{ "maxTotalChargeUsd": 50 }
```

The actor checks your max charge before every dataset push and stops cleanly when the limit is reached.

### Output

One row per designated entry. An entry that appears on both the SDN file and the consolidated file (about 90 Sectoral Sanctions entries do) is delivered once.

| Field | Type | Description |
|---|---|---|
| `ofacUid` | string | OFAC's unique entry id. |
| `primaryName` | string | Primary name, Latin script. |
| `entityType` | string | `Entity`, `Individual`, `Vessel` or `Aircraft`. |
| `programs` | array of strings | Sanctions program codes. |
| `sanctionsLists` | array of strings | The OFAC list(s) the entry is on, for example `SDN List`. |
| `aliases` | array of strings | Every other published name and spelling (a.k.a., f.k.a., n.k.a.), including Arabic, Cyrillic and other scripts. |
| `addresses` | array of objects | `address1`, `address2`, `address3`, `city`, `stateOrProvince`, `postalCode`, `region`, `country`. |
| `digitalCurrencyAddresses` | array of objects | `currency` (OFAC's code: `XBT` for bitcoin, `ETH`, `USDT`, `TRX` and others) and `address`. |
| `vesselImoOrAircraftTail` | string or null | Vessels: OFAC's vessel registration id, usually `IMO nnnnnnn`. Aircraft: the tail number. OFAC publishes a tail number for about 45% of listed aircraft; the rest have null. |
| `taxOrRegistrationIds` | array of objects | Tax and business-registration identifiers only (tax ID, company number, registration number, VAT, RFC and similar): `type`, `number`, `issuingCountry`. Passports, national ID cards and other personal documents are never output. |
| `publishDate` | string | Date the entry was first published on its list, YYYY-MM-DD. |
| `deltaAction` | string | `CURRENT` when monitor mode is off. In monitor mode: `NEW` or `MODIFIED`. |
| `sourceFile` | string | `SDN_ENHANCED.XML` or `CONS_ENHANCED.XML`. |

#### Sample row (real, abridged)

```json
{
  "ofacUid": "58361",
  "primaryName": "XINBI GUARANTEE",
  "entityType": "Entity",
  "programs": ["TCO"],
  "sanctionsLists": ["SDN List"],
  "digitalCurrencyAddresses": [
    { "currency": "TRX", "address": "TW5tokvhEfrb77z98Rc8HqbkzQJ6sxYtGX" }
  ],
  "deltaAction": "CURRENT"
}
```

### Monitor mode

- The snapshot lives in the named key-value store `ofac-state-snapshot` on your account, record `OFAC_STATE_SNAPSHOT`: each delivered entry's uid and a hash of its content.
- The **first** monitor run delivers everything that matches as `NEW` (raise `maxItems` to 25000 for the full list).
- Later runs deliver only entries whose content changed (`MODIFIED`) or that were added (`NEW`). Entries removed from the list are counted in the status message; they are not emitted as rows.
- Only delivered entries are written to the snapshot. If a run stops at `maxItems` or the charge limit, the undelivered changes come out on the next run.
- A run with any source problem (failed download, checksum mismatch, short file, stale file) does not advance the snapshot at all; the next run re-compares against the last good snapshot.
- Changing filters between runs is safe: entries you never received are still `NEW` when they first match.

### How pricing works

Pay per result. You only pay for rows returned.

### Data source and terms

- **OFAC Sanctions List Service (SLS)**, https://sanctionslist.ofac.treas.gov/Home/SdnList. Files: `https://sanctionslistservice.ofac.treas.gov/api/PublicationPreview/exports/SDN_ENHANCED.XML` and `.../CONS_ENHANCED.XML`, the download links on OFAC's own Data Center page. Schema: `ENHANCED_XML.xsd` at the same path.
- **Terms:** US government data. The data.gov catalog entry for the enhanced SDN file states: "This data is in the public domain and may be used without restriction."
- **Update cadence:** OFAC republishes whenever it designates, removes or amends entries, usually several times a month and with no fixed schedule. Each file states its own publication date (`dataAsOf`), which appears in the run's status message.
- **Freshness check:** if a file's publication date is more than **45 days** old, the run ends `PARTIAL` with the date, because OFAC normally publishes far more often.

### Limits and FAQ

- **Why PARTIAL on a default run?** The default `maxItems` of 5000 is below the full list (about 19,900 entries). The status says exactly how many were left out. Raise `maxItems` for the full list; truncation is never silent. A full-list run returns about 19,900 rows, which can cost more than the default $50 max charge: raise your max charge as well, or the run stops cleanly at the limit and says so.
- **No FinCEN data.** This actor covers OFAC lists only.
- **Removed entries** are reported as a count in monitor mode, not as rows.
- **Program codes** are OFAC's exact tags. A filter code that no entry carries returns `Complete: 0` and a warning in the log.
- Each run downloads the files it needs in full (about 114 MB for both). Typical run time is under one minute; peak memory in local tests was about 140 MB.

### Privacy note

OFAC's lists name sanctioned individuals as well as companies, and publish their addresses and identifying documents so that businesses can screen against them. This actor passes through names, aliases and addresses as OFAC publishes them, but outputs **only tax and business-registration identifiers**: passports, national ID numbers, voter cards and driver's licences are dropped. Set `entityTypesFilter` to `["Entity", "Vessel", "Aircraft"]` to exclude individuals entirely. Use the data for sanctions compliance, not to target individuals.

### Troubleshooting

- **FAILED with "does not match the service Digest"**: the downloaded SDN file did not match OFAC's checksum twice in a row. Nothing from that file was delivered.
- **FAILED with "parser read N entities but the file has M entity tags", "below the floor", "root element" or "schema drift"**: OFAC changed the file format or served an incomplete file. That file was not delivered.
- **PARTIAL with "data is N days old"**: OFAC has not republished for longer than usual. Rows were delivered; check OFAC's Recent Actions page.
- **PARTIAL with "Reached maxItems"**: raise `maxItems`.
- **Complete: 0**: no entry matched your filters. Check the program codes and entity types.

If this keeps happening, please open an issue on this actor's Issues tab and we'll fix it fast.

### Changelog

- **0.1.1** (2026-11-01): fix round. An empty `entityTypesFilter` now returns all four types, matching the documented empty = all behavior. Removed an internal HTML comment from the top of this README.
- **0.1** (2026-11-01): first build.

# Actor input Schema

## `entityTypesFilter` (type: `array`):

Which kinds of designations to include. Leave empty for all types.

## `listSource` (type: `string`):

SDN = the Specially Designated Nationals and Blocked Persons list. CONSOLIDATED = OFAC's non-SDN lists (Sectoral Sanctions, Foreign Sanctions Evaders, Non-SDN Menu-Based and others). Or both.

## `maxItems` (type: `integer`):

Maximum entries to return, newest listing first. The full SDN list has over 19,000 entries: raise this above 25,000 for the complete list. A run that stops at this cap ends PARTIAL and says how many were left out.

## `onlyNewOrModifiedSinceLastRun` (type: `boolean`):

When on, emits only entries that are new or whose content changed since your last monitor run (snapshot in the named key-value store 'ofac-state-snapshot' on your account). The first monitor run emits everything as NEW. A run with a source problem never advances the snapshot.

## `onlyWithDigitalCurrencyAddresses` (type: `boolean`):

Only designations that list at least one digital currency (crypto wallet) address.

## `sanctionsProgramsFilter` (type: `array`):

OFAC program codes as published, for example SDGT, IRAN, CYBER2, DPRK3, RUSSIA-EO14024. An entry matches if it carries any listed program. Leave empty for all programs.

## Actor input object example

```json
{
  "entityTypesFilter": [
    "Entity",
    "Individual",
    "Vessel",
    "Aircraft"
  ],
  "listSource": "SDN_AND_CONSOLIDATED",
  "maxItems": 5000,
  "onlyNewOrModifiedSinceLastRun": false,
  "onlyWithDigitalCurrencyAddresses": false,
  "sanctionsProgramsFilter": []
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "entityTypesFilter": [
        "Entity",
        "Individual",
        "Vessel",
        "Aircraft"
    ],
    "listSource": "SDN_AND_CONSOLIDATED",
    "maxItems": 5000,
    "sanctionsProgramsFilter": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/ofac-sanctions-crypto-entity-delta-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "entityTypesFilter": [
        "Entity",
        "Individual",
        "Vessel",
        "Aircraft",
    ],
    "listSource": "SDN_AND_CONSOLIDATED",
    "maxItems": 5000,
    "sanctionsProgramsFilter": [],
}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/ofac-sanctions-crypto-entity-delta-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "entityTypesFilter": [
    "Entity",
    "Individual",
    "Vessel",
    "Aircraft"
  ],
  "listSource": "SDN_AND_CONSOLIDATED",
  "maxItems": 5000,
  "sanctionsProgramsFilter": []
}' |
apify call groundplanes/ofac-sanctions-crypto-entity-delta-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/ofac-sanctions-crypto-entity-delta-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DPaVEpRs66EakC0mx/builds/nOYoads3S0bKcNqWw/openapi.json
