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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

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

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.opensanctions.org/search/default?q=Vladimir+Putin&limit=5";
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Open Data
Difficulty Beginner
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →