OpenSanctions Entities Scraper avatar

OpenSanctions Entities Scraper

Pricing

Pay per event

Go to Apify Store
OpenSanctions Entities Scraper

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

Stas Persiianenko

Maintained by Community

Actor 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

FieldTypeDescription
datasetSlugstringOpenSanctions dataset folder, default default.
exportUrlstringOptional full HTTPS OpenSanctions export URL.
maxItemsintegerMaximum matching entities to save.
maxScanLinesintegerSafety limit for scanned JSON lines.
schemasstring[]FollowTheMoney schemas such as Person, Company, Vessel.
countriesstring[]Country, nationality, citizenship, jurisdiction, or incorporation filters.
datasetsstring[]Source dataset ids such as us_ofac_sdn or wd_peps.
topicsstring[]Inferred topics such as sanctions, peps, crime, debarment, watchlists.
nameQuerystringCase-insensitive caption/name/alias substring.
targetOnlybooleanReturn only entities marked as screening targets.
includePropertiesbooleanInclude 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
}
{
"datasetSlug": "default",
"nameQuery": "gazprom",
"maxItems": 50,
"maxScanLines": 500000,
"includeProperties": true
}

Output data

Each dataset item is one OpenSanctions entity.

FieldDescription
idOpenSanctions entity id.
captionHuman-readable entity caption.
schemaFollowTheMoney schema.
entityTypeSame schema value, optimized for table exports.
targetWhether OpenSanctions marks the entity as a screening target.
datasetsSource OpenSanctions dataset ids.
referentsReferent identifiers attached to the entity.
countriesCountry and jurisdiction-like values.
topicsInferred topics such as sanctions or PEPs.
namesName properties.
aliasesAlias and weak alias properties.
identifiersTax, registration, LEI, ISIN, IMO, passport, and id values where present.
birthDatesBirth dates and birth places where present.
sanctionsProgramsProgram, authority, publisher, or classification fields where present.
sourceUrlsSource URLs embedded in the OpenSanctions properties.
firstSeenFirst seen timestamp from OpenSanctions.
lastSeenLast seen timestamp from OpenSanctions.
lastChangeLast changed timestamp from OpenSanctions.
datasetSlugDataset slug used for this run.
exportUrlExport URL streamed by the actor.
matchedByFilters that matched the record.
scannedLineLine number in the streamed export.
propertiesOptional raw properties object.
scrapedAtActor 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

  1. Open the actor on Apify.
  2. Choose an OpenSanctions datasetSlug or provide an exportUrl.
  3. Set maxItems to the number of entities you need.
  4. Add filters for schemas, topics, countries, source datasets, or names.
  5. Start the run.
  6. 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 ApifyClient
client = 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:

  1. Open Settings โ†’ Developer โ†’ Edit Config.
  2. Add the server below.
  3. Restart Claude Desktop and ask for the OpenSanctions tool.

Cursor setup:

  1. Open Cursor Settings โ†’ MCP โ†’ Add new server.
  2. Choose HTTP transport.
  3. Paste https://mcp.apify.com/?tools=automation-lab/opensanctions-entities-scraper.

VS Code setup:

  1. Install an MCP-compatible assistant extension.
  2. Add a new HTTP MCP server.
  3. Use https://mcp.apify.com/?tools=automation-lab/opensanctions-entities-scraper as 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 countries or datasets filters.
  • Increase maxScanLines.
  • Use a broader topics value.
  • 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 automation-lab actors may help when you need a narrower official list instead of the OpenSanctions aggregate.

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.