Screen a country for sanctions designations
Updated
The GET /screen/country/{country} endpoint returns the sanctions designations covering a given country or region. You can pass either a country name (for example, Iran) or an ISO country code (for example, IR). The response follows the standard screening envelope and returns one entry in matches per sanctions program that covers the country, so a heavily sanctioned country may produce multiple matches reflecting different programs.
How to screen a country
- Obtain your API token from the Tokens page.
- Send a GET request with the country name or ISO code in the path:
GET https://api.compliapi.com/api/v1/screen/country/{country}
- Include your token as a bearer header:
Authorization: Bearer capi_...
- Check
sanctionedin the response —truemeans at least one government sanctions program covers this country. - Review
matchesfor the specific programs, with each match carrying asource_urllinking to the official designation.
What the response tells you
Country data is OFAC-curated today, so matches reflect US Treasury OFAC designations. Each entry in matches names the specific sanctions program (for example, comprehensive Iran sanctions or targeted North Korea programs), giving you a program-level breakdown rather than a single yes/no answer. This is useful when your compliance workflow requires logging which program triggered a block.
Filtering by list
Add ?lists= with a comma-separated set of slugs from GET /screen/lists to limit which lists contribute to the check:
GET /api/v1/screen/country/IR?lists=ofac
An unknown slug returns 400. Country screening costs one credit per request regardless of how many program matches are returned. For IP-based country detection — for instance, flagging users connecting from a sanctioned country — see the GET /geo/{ip_address} endpoint, which returns the IP's country and a sanctioned flag in one call.