# OFAC Sanctions List Export Scraper (`automation-lab/ofac-sanctions-list-export-scraper`) Actor

Export official OFAC SDN and consolidated sanctions lists with aliases, addresses, programs, and source metadata for AML/KYC workflows.

- **URL**: https://apify.com/automation-lab/ofac-sanctions-list-export-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Business
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## OFAC Sanctions List Export Scraper

Export and normalize public OFAC sanctions lists for AML, KYC, procurement, compliance, and risk monitoring workflows.

The actor downloads official OFAC export data, joins primary records with aliases and addresses, and outputs clean dataset rows that are ready for screening, enrichment, or change-detection pipelines. If OFAC's CSV endpoint is protected by its browser challenge, the actor automatically uses OpenSanctions' daily mirror of the same OFAC lists.

### What does OFAC Sanctions List Export Scraper do?

This actor fetches public OFAC sanctions data from the official OFAC sanctions list service.

It currently supports:

- Specially Designated Nationals (SDN) primary export
- SDN aliases / alternate names
- SDN address records
- Consolidated non-SDN primary export
- Consolidated non-SDN aliases
- Consolidated non-SDN address records

Each output item represents one sanctions entity.

Aliases and addresses are attached to the entity as nested arrays.

The output also includes source URLs, source digest headers, Last-Modified metadata, and the scrape timestamp.

### Who is it for?

This actor is for compliance, AML, legal, procurement, and data teams.

Typical users include:

- Fintech compliance teams screening customers and counterparties
- KYC vendors enriching onboarding workflows
- Procurement teams monitoring vendors and beneficial owners
- Legal teams checking entities against sanctions programs
- Data engineers building sanctions snapshots in warehouses
- Risk teams comparing current and previous list exports

Use this actor when you need repeatable OFAC export data in Apify datasets, APIs, or integrations.

### Why use it?

OFAC provides public export files, but teams still need structured rows that are easy to automate.

This actor helps by:

- Downloading the relevant public files in one run
- Normalizing CSV rows into JSON records
- Joining aliases and addresses to the primary entity
- Preserving official OFAC UID values
- Capturing source metadata for audit trails
- Supporting small smoke tests and larger exports

### Data you can extract

| Field | Description |
| --- | --- |
| `uid` | Official OFAC UID from the source file |
| `list` | `sdn` or `consolidated` |
| `sourceListName` | Human-readable list name |
| `name` | Entity, vessel, organization, or individual name |
| `entityType` | OFAC entity type when provided |
| `programs` | Sanctions programs or list codes |
| `remarks` | OFAC remarks such as DOB, POB, or notes |
| `aliases` | Alternate names / aka records |
| `addresses` | Address records with country and full address |
| `sourceDigest` | Digest header from the source export response |
| `sourceLastModified` | Last-Modified header from the source export response |
| `scrapedAt` | Actor run timestamp |

### How much does it cost to export OFAC sanctions lists?

The actor uses pay-per-event pricing.

There is a small start charge per run and a tiered per-entity charge for records emitted to the dataset.

The exact live prices are shown on the Apify Store pricing tab.

For testing, keep `maxItems` low.

For full snapshots, increase `maxItems` high enough to include all selected lists.

### Input configuration

The input has only a few practical options.

```json
{
  "lists": ["sdn"],
  "maxItems": 200,
  "includeAliases": true,
  "includeAddresses": true,
  "includeRawFields": false
}
```

#### `lists`

Choose one or both supported export groups.

- `sdn` downloads SDN primary, alias, and address CSV files.
- `consolidated` downloads consolidated non-SDN primary, alias, and address CSV files.

#### `maxItems`

Limits the total number of entity rows emitted across all selected lists. When you select multiple lists, the Actor divides the limit evenly so every selected list contributes records when `maxItems` is at least the number of lists.

Use a small value for quick tests.

Use a large value for complete exports.

#### `includeAliases`

When enabled, each entity includes an `aliases` array.

Each alias contains an alias ID, alias type, name, and optional remarks.

#### `includeAddresses`

When enabled, each entity includes an `addresses` array.

Each address contains the OFAC address ID, address lines, country, and normalized full address.

#### `includeRawFields`

Enable this only for audits or troubleshooting.

It adds the raw primary source record as `rawFields` (CSV fields for direct OFAC downloads, or the mirrored JSON record when fallback is active).

### Output example

```json
{
  "uid": "306",
  "list": "sdn",
  "sourceListName": "Specially Designated Nationals (SDN)",
  "name": "BANCO NACIONAL DE CUBA",
  "entityType": null,
  "programs": ["CUBA"],
  "remarks": "a.k.a. 'BNC'.",
  "aliasCount": 1,
  "addressCount": 3,
  "sourceUrls": ["https://sanctionslistservice.ofac.treas.gov/api/PublicationPreview/exports/SDN.CSV"],
  "scrapedAt": "2026-06-29T00:00:00.000Z"
}
```

### How to run

1. Open the actor on Apify.
2. Choose SDN, consolidated, or both lists.
3. Set `maxItems`.
4. Keep aliases and addresses enabled for screening use cases.
5. Start the run.
6. Export the dataset as JSON, CSV, Excel, or via API.

### Practical workflows

Common workflows include:

- Daily sanctions snapshot export
- Vendor list screening enrichment
- Customer onboarding watchlist checks
- Internal warehouse refreshes
- OFAC change monitoring using `sourceDigest`
- Legal review exports for specific programs

### Integrations

You can send the dataset to:

- Google Sheets
- BigQuery
- Snowflake
- S3-compatible storage
- Zapier or Make
- Internal compliance APIs
- Apify webhooks

For change monitoring, store the previous run's digest and compare it with the current run.

### API usage with Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/ofac-sanctions-list-export-scraper').call({
  lists: ['sdn', 'consolidated'],
  maxItems: 1000,
  includeAliases: true,
  includeAddresses: true
});

console.log(run.defaultDatasetId);
```

### API usage with Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/ofac-sanctions-list-export-scraper').call(run_input={
    'lists': ['sdn'],
    'maxItems': 500,
    'includeAliases': True,
    'includeAddresses': True,
})
print(run['defaultDatasetId'])
```

### API usage with cURL

```bash
curl "https://api.apify.com/v2/acts/automation-lab~ofac-sanctions-list-export-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"lists":["sdn"],"maxItems":200,"includeAliases":true,"includeAddresses":true}'
```

### MCP usage

Use Apify MCP when you want Claude Desktop, Claude Code, or another MCP client to run this actor.

Add the actor tool in Claude Code:

```bash
claude mcp add --transport http apify-ofac-sanctions https://mcp.apify.com/?tools=automation-lab/ofac-sanctions-list-export-scraper
```

Claude Desktop, Cursor, and VS Code JSON configuration:

```json
{
  "mcpServers": {
    "apify-ofac-sanctions": {
      "url": "https://mcp.apify.com/?tools=automation-lab/ofac-sanctions-list-export-scraper"
    }
  }
}
```

MCP server URL:

```text
https://mcp.apify.com/?tools=automation-lab/ofac-sanctions-list-export-scraper
```

Example prompts:

- "Export the first 500 OFAC SDN entities with aliases."
- "Run the OFAC sanctions export and summarize how many entities have addresses."
- "Fetch consolidated non-SDN records and prepare a CSV for compliance review."

### Data freshness

The actor prefers files downloaded directly from OFAC during each run. When OFAC's browser challenge blocks automated downloads, it uses OpenSanctions' daily OFAC mirror.

Freshness therefore depends on the current official OFAC files or, during fallback, the latest daily mirror refresh.

Use `sourceLastModified` and `sourceDigest` to record which source version was used.

### Limitations

The actor normalizes OFAC export files; it does not make legal decisions.

It does not replace a sanctions screening engine.

It does not score matches, resolve identities, or adjudicate false positives.

OFAC source formatting can change, so downstream workflows should monitor schema changes.

### Troubleshooting

If a run returns fewer records than expected, check `maxItems` first.

If aliases or addresses are missing, confirm `includeAliases` and `includeAddresses` are enabled.

If source metadata changes, compare `sourceDigest` and `sourceLastModified` across runs.

If the official OFAC CSV endpoint is unavailable, the actor automatically switches to the daily OFAC mirror; no proxy or browser is required.

### Legality

OFAC sanctions export files are public government data, but sanctions compliance is a regulated workflow.

Use the actor as a data collection and normalization tool, not as legal advice or screening adjudication.

### Is it legal to scrape OFAC sanctions data?

OFAC sanctions export files are public government data.

You are responsible for using the data lawfully and for complying with sanctions, privacy, procurement, and record-retention rules that apply to your organization.

Consult qualified counsel for legal interpretations.

### Related scrapers

Related Automation Labs actors for compliance and government-data workflows:

- https://apify.com/automation-lab/website-contact-finder
- https://apify.com/automation-lab/google-search-results-scraper

More sanctions, procurement, and compliance actors may be added as the portfolio grows.

### FAQ

#### Can this actor export the full OFAC SDN list?

Yes. Set `maxItems` high enough to include all entities.

#### Does it include aliases?

Yes. Keep `includeAliases` enabled.

#### Does it include addresses?

Yes. Keep `includeAddresses` enabled.

#### Does it use a browser?

No. It downloads source files over HTTP and automatically uses the daily OpenSanctions OFAC mirror when OFAC presents a browser challenge.

#### Does it use proxies?

No. Direct downloads and the automatic mirror fallback do not use a proxy.

#### Can I use this for screening?

You can use it as a data input for screening workflows, but matching and legal adjudication must be handled by your compliance process.

#### How do I detect list changes?

Compare `sourceDigest`, `sourceLastModified`, dataset counts, or the records themselves across scheduled runs.

#### What happens if OFAC changes the CSV format?

The actor may need an update. Keep an eye on logs and output fields if OFAC announces format changes.

### Support

If the actor fails or the output does not match the current OFAC export files, open an Apify issue with the run ID and your input.

Include whether you selected SDN, consolidated, or both lists.

### Changelog

Initial version supports official OFAC SDN and consolidated non-SDN CSV exports with aliases, addresses, programs, and source metadata.

# Actor input Schema

## `lists` (type: `array`):

Choose which public OFAC export files to download and normalize. SDN is the main Specially Designated Nationals list; consolidated includes non-SDN lists.

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

Maximum sanctions entity records to emit across all selected lists. With multiple lists, the limit is divided evenly so each list contributes when the limit permits.

## `includeAliases` (type: `boolean`):

Attach OFAC alternate names / aka records to each entity.

## `includeAddresses` (type: `boolean`):

Attach OFAC address records to each entity.

## `includeRawFields` (type: `boolean`):

Include the raw primary CSV row fields for audits or schema troubleshooting.

## Actor input object example

```json
{
  "lists": [
    "sdn"
  ],
  "maxItems": 20,
  "includeAliases": true,
  "includeAddresses": true,
  "includeRawFields": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset containing the normalized OFAC sanctions records produced by this run.

# 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 = {
    "lists": [
        "sdn"
    ],
    "maxItems": 20,
    "includeAliases": true,
    "includeAddresses": true,
    "includeRawFields": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/ofac-sanctions-list-export-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 = {
    "lists": ["sdn"],
    "maxItems": 20,
    "includeAliases": True,
    "includeAddresses": True,
    "includeRawFields": False,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/ofac-sanctions-list-export-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "lists": [
    "sdn"
  ],
  "maxItems": 20,
  "includeAliases": true,
  "includeAddresses": true,
  "includeRawFields": false
}' |
apify call automation-lab/ofac-sanctions-list-export-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/ofac-sanctions-list-export-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/00gah01qXMXWuCyCX/builds/JerWphnJMZh3f1FMT/openapi.json
