OpenSanctions Entities Scraper
Pricing
Pay per event
OpenSanctions Entities Scraper
Stream public OpenSanctions entities for AML/KYC screening. Filter sanctions, PEPs, companies, vessels, and watchlists by dataset, topic, schema, country, or name.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Export sanctions, PEP, company, vessel, and watchlist entities from public OpenSanctions FollowTheMoney datasets.
OpenSanctions publishes a large public compliance data graph. This Apify Actor streams the official entities.ftm.json exports, applies practical filters, and saves normalized records that are ready for AML, KYC, KYB, due-diligence, and monitoring workflows.
What does OpenSanctions Entities Scraper do?
OpenSanctions Entities Scraper reads public OpenSanctions entity exports over HTTP.
It does not use a browser.
It does not need a login.
It does not download the whole multi-GB export into memory.
Instead, it streams line-delimited FollowTheMoney JSON and stops when your requested result count or scan limit is reached.
Use it to collect:
- ๐งพ Sanctions entities
- ๐งโ๐ผ Politically exposed persons (PEPs)
- ๐ข Companies and organizations
- ๐ข Vessels
- ๐ Watchlist and risk-related entities
- ๐ Source URLs and provenance metadata
Who is it for?
Compliance teams use it to export screening data for AML and KYC operations.
Risk analysts use it to collect watchlist candidates for enhanced due diligence.
Data engineers use it to pipe OpenSanctions records into warehouses, screening systems, and graph databases.
Investigators use it to create bounded extracts around a topic, country, schema, dataset, or name.
Developers use it when they need an API-friendly OpenSanctions exporter inside Apify workflows.
Why use this scraper?
OpenSanctions bulk exports are powerful, but the default aggregated entity file is very large.
A naive script can load too much data, run out of memory, or spend time scanning records that are not relevant.
This actor provides a safer workflow:
- โ Stream official public exports
- โ
Cap saved entities with
maxItems - โ
Cap scanned lines with
maxScanLines - โ Filter by schema, country, dataset, topic, target flag, or name
- โ Keep normalized fields stable for integrations
- โ Optionally include raw FollowTheMoney properties
Data source
The actor uses public OpenSanctions export URLs such as:
https://data.opensanctions.org/datasets/latest/default/entities.ftm.json
You can set datasetSlug to use another public dataset folder.
You can also provide a full exportUrl when you need a specific public OpenSanctions export.
Input options
| Field | Type | Description |
|---|---|---|
datasetSlug | string | OpenSanctions dataset folder, default default. |
exportUrl | string | Optional full HTTPS OpenSanctions export URL. |
maxItems | integer | Maximum matching entities to save. |
maxScanLines | integer | Safety limit for scanned JSON lines. |
schemas | string[] | FollowTheMoney schemas such as Person, Company, Vessel. |
countries | string[] | Country, nationality, citizenship, jurisdiction, or incorporation filters. |
datasets | string[] | Source dataset ids such as us_ofac_sdn or wd_peps. |
topics | string[] | Inferred topics such as sanctions, peps, crime, debarment, watchlists. |
nameQuery | string | Case-insensitive caption/name/alias substring. |
targetOnly | boolean | Return only entities marked as screening targets. |
includeProperties | boolean | Include raw FollowTheMoney properties. |
Example input: PEP people and companies
{"datasetSlug": "default","maxItems": 100,"maxScanLines": 50000,"schemas": ["Person", "Company"],"topics": ["peps"],"targetOnly": false,"includeProperties": false}
Example input: sanctions targets
{"datasetSlug": "default","maxItems": 250,"maxScanLines": 200000,"topics": ["sanctions"],"targetOnly": true}
Example input: name search
{"datasetSlug": "default","nameQuery": "gazprom","maxItems": 50,"maxScanLines": 500000,"includeProperties": true}
Output data
Each dataset item is one OpenSanctions entity.
| Field | Description |
|---|---|
id | OpenSanctions entity id. |
caption | Human-readable entity caption. |
schema | FollowTheMoney schema. |
entityType | Same schema value, optimized for table exports. |
target | Whether OpenSanctions marks the entity as a screening target. |
datasets | Source OpenSanctions dataset ids. |
referents | Referent identifiers attached to the entity. |
countries | Country and jurisdiction-like values. |
topics | Inferred topics such as sanctions or PEPs. |
names | Name properties. |
aliases | Alias and weak alias properties. |
identifiers | Tax, registration, LEI, ISIN, IMO, passport, and id values where present. |
birthDates | Birth dates and birth places where present. |
sanctionsPrograms | Program, authority, publisher, or classification fields where present. |
sourceUrls | Source URLs embedded in the OpenSanctions properties. |
firstSeen | First seen timestamp from OpenSanctions. |
lastSeen | Last seen timestamp from OpenSanctions. |
lastChange | Last changed timestamp from OpenSanctions. |
datasetSlug | Dataset slug used for this run. |
exportUrl | Export URL streamed by the actor. |
matchedBy | Filters that matched the record. |
scannedLine | Line number in the streamed export. |
properties | Optional raw properties object. |
scrapedAt | Actor scrape timestamp. |
How much does it cost to export OpenSanctions entities?
The actor uses pay-per-event pricing.
There is a small start charge per run.
There is a per-entity charge for every saved dataset item.
Current bootstrap pricing is configured in the actor package and will be calibrated from cloud cost runs before Store publication.
Use lower maxItems and targeted filters for small ad-hoc checks.
Use larger maxScanLines for narrow searches that may appear later in the export.
How to run it
- Open the actor on Apify.
- Choose an OpenSanctions
datasetSlugor provide anexportUrl. - Set
maxItemsto the number of entities you need. - Add filters for schemas, topics, countries, source datasets, or names.
- Start the run.
- Download results as JSON, CSV, Excel, or via the Apify API.
Tips for better results
Start broad with a low maxItems value.
Increase maxScanLines when you use narrow filters.
Use targetOnly=true for screening-target exports.
Use includeProperties=true only when your downstream system needs raw FollowTheMoney fields.
Use datasets when you know the exact OpenSanctions source list id.
Use topics for faster business-friendly filtering.
Integrations
Send results to an AML screening queue.
Load entities into a data warehouse.
Create recurring Apify schedules for watchlist monitoring.
Send dataset items to Make, Zapier, Airbyte, or a webhook.
Join entity ids with your internal counterparty records.
Store raw properties for graph enrichment.
API usage with Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('automation-lab/opensanctions-entities-scraper').call({datasetSlug: 'default',maxItems: 100,maxScanLines: 50000,topics: ['peps'],schemas: ['Person', 'Company']});console.log(run.defaultDatasetId);
API usage with Python
from apify_client import ApifyClientclient = ApifyClient()run = client.actor('automation-lab/opensanctions-entities-scraper').call(run_input={'datasetSlug': 'default','maxItems': 100,'maxScanLines': 50000,'topics': ['peps'],'schemas': ['Person', 'Company'],})print(run['defaultDatasetId'])
API usage with cURL
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~opensanctions-entities-scraper/runs?token=YOUR_APIFY_TOKEN' \-H 'Content-Type: application/json' \-d '{"datasetSlug":"default","maxItems":100,"maxScanLines":50000,"topics":["peps"],"schemas":["Person","Company"]}'
MCP usage
Use the Apify MCP server when you want AI tools to run this actor.
MCP URL for hosted HTTP clients:
https://mcp.apify.com/?tools=automation-lab/opensanctions-entities-scraper
Claude Code setup:
claude mcp add --transport http apify-opensanctions \"https://mcp.apify.com/?tools=automation-lab/opensanctions-entities-scraper"
Claude Desktop setup:
- Open Settings โ Developer โ Edit Config.
- Add the server below.
- Restart Claude Desktop and ask for the OpenSanctions tool.
Cursor setup:
- Open Cursor Settings โ MCP โ Add new server.
- Choose HTTP transport.
- Paste
https://mcp.apify.com/?tools=automation-lab/opensanctions-entities-scraper.
VS Code setup:
- Install an MCP-compatible assistant extension.
- Add a new HTTP MCP server.
- Use
https://mcp.apify.com/?tools=automation-lab/opensanctions-entities-scraperas the server URL.
Local stdio fallback for desktop clients that do not support HTTP MCP:
{"mcpServers": {"apify-opensanctions": {"command": "npx","args": ["-y","@apify/actors-mcp-server","--actors","automation-lab/opensanctions-entities-scraper"],"env": {"APIFY_TOKEN": "YOUR_APIFY_TOKEN"}}}}
Example prompts:
- "Export 100 PEP-related OpenSanctions entities and summarize the countries represented."
- "Find OpenSanctions entities whose caption contains Gazprom and include raw properties."
- "Create a sanctions target extract with source URLs and identifiers."
Performance notes
The default OpenSanctions export can be several GB.
The actor streams it instead of buffering it.
A run can still take longer when filters are rare.
maxScanLines is the main safety control for scan time.
maxItems is the main cost and output control.
Troubleshooting: no results
If the run succeeds with zero items, your filters may be too narrow for the scanned section of the export.
Try one of these changes:
- Remove
countriesordatasetsfilters. - Increase
maxScanLines. - Use a broader
topicsvalue. - Disable
targetOnly. - Run a small unfiltered sample to inspect available schemas and datasets.
Troubleshooting: large rows
If rows are too large, set includeProperties=false.
The normalized fields usually cover common analytics workflows.
Raw properties are useful for engineering pipelines but can significantly increase export size.
Legality and responsible use
OpenSanctions publishes public datasets for transparency, compliance, research, and public-interest use cases.
You are responsible for complying with applicable laws, OpenSanctions terms, privacy requirements, sanctions-screening obligations, and internal compliance policies.
Do not use exported data to make automated decisions without appropriate review and controls.
Related scrapers
Related automation-lab actors may help when you need a narrower official list instead of the OpenSanctions aggregate.
- https://apify.com/automation-lab/ofac-sanctions-list-scraper
- https://apify.com/automation-lab/eu-sanctions-scraper
Use this OpenSanctions scraper when you need the broader aggregated entity graph.
FAQ
Does this actor require an OpenSanctions API key?
No. It reads public OpenSanctions export files.
Does it use a browser?
No. It is an HTTP streaming actor.
Can I select a specific OpenSanctions dataset?
Yes. Use datasetSlug or provide a full public exportUrl.
Can I export raw FollowTheMoney properties?
Yes. Set includeProperties=true.
Why is there a scan-line limit?
The default export is very large. The limit prevents accidental long scans and makes costs predictable.
Can I schedule this actor?
Yes. Use Apify schedules to create recurring OpenSanctions monitoring exports.
Changelog
Initial version streams public OpenSanctions entity exports, filters records, and saves normalized compliance-ready dataset rows.