OpenSanctions API

⭐ Beginner's Pick Open Data / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

OpenSanctions provides open access to a consolidated database of sanctioned individuals, criminal entities, and politically exposed persons (PEPs) from over 100 official sources worldwide. No API key is needed for basic searches, making it easy to get started immediately. It is a valuable tool for compliance checks, investigative journalism, and anti-money-laundering (AML) applications.

💡

Beginner Tip

Search for an entity by name using https://api.opensanctions.org/search/default?q=PERSON_NAME and parse the results array for matches. The free API works without authentication, though commercial use requires a license.

Available Data

country name and code
population
capital city
region and subregion
flag image URL
phone number validation

Example Response

JSON Response
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

results List of matched entity objects from the sanctions database
results[].id Unique OpenSanctions identifier for the entity
results[].caption Primary display name of the entity
results[].schema Entity type classification, e.g., "Person", "Organization", "Vessel"
results[].properties.country List of country codes associated with the entity
results[].datasets List of source dataset names where this entity appears (e.g., "us_ofac_sdn")

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.opensanctions.org/docs/api/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

402 Payment Required Commercial use of the API without a license
For non-commercial or research use, the API is free; register at opensanctions.org for a commercial license if needed
Empty results array Name spelling differs from the official sanctions list entry
Try alternate spellings, transliterations, or use the fuzzy parameter for approximate matching
Slow response on large result sets Broad queries can return thousands of matches
Use the limit parameter to cap results and the offset parameter for pagination, e.g. ?limit=20&offset=0

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 675ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Open Data
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →