DEV Community

Sigurdur B
Sigurdur B

Posted on

Build a sanctions check in 10 minutes with SanctionSnap API

Goal: show you how to screen names against global sanctions lists with one HTTP request—no CSV files, no cron jobs.


1 · Get a free API key

  1. Sign up at sanctionsnap.com
  2. Open Dashboard → API Keys → “Create key”
  3. Copy the key (free plan = 250 calls/month)

2 · Quick health check

curl https://sanctionsnap.com/api/health
# → { "status": "ok" }
Enter fullscreen mode Exit fullscreen mode

2 · Single-name search

curl -X POST https://sanctionsnap.com/api/search \
     -H "X-API-Key: YOUR_KEY" \
     -H "Content-Type: application/json" \
     -d '{"name":"Vladimir Putin"}' | jq
Enter fullscreen mode Exit fullscreen mode

Response (trimmed):

[
  {
    "id": 12345,
    "source": "ofac",
    "name": "PUTIN, Vladimir Vladimirovich",
    "similarity_score": 0.95,
    "program": "RUSSIA-EO13661"
  }
]
Enter fullscreen mode Exit fullscreen mode

3 · Batch screen many names (JSON)

curl -X POST https://sanctionsnap.com/api/screen \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "records": [
          { "id": "c001", "name": "John Smith" },
          { "id": "c002", "name": "Nicolás Maduro" }
        ]
      }'
Enter fullscreen mode Exit fullscreen mode

Each record returns is_match: true/false plus any hits.

4 · Python Example

import requests

API_KEY = "YOUR_KEY"
url = "https://sanctionsnap.com/api/search"

payload = {"name": "Ali Akbar Salehi"}
headers = {"X-API-Key": API_KEY}

res = requests.post(url, json=payload, headers=headers, timeout=10)
res.raise_for_status()
for hit in res.json():
    print(hit["name"], hit["source"], hit["program"])
Enter fullscreen mode Exit fullscreen mode

5 Node Example

import fetch from "node-fetch";

const apiKey = process.env.SNAP_KEY;
const res = await fetch("https://sanctionsnap.com/api/search", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": apiKey,
  },
  body: JSON.stringify({ name: "Kim Jong Un" }),
});

const data = await res.json();
console.log(data);
Enter fullscreen mode Exit fullscreen mode

Upload CSV/XLSX in the Web Console for one-click batch checks
Explore the full docs for advanced search.
Stop parsing sanctions spreadsheets—call an endpoint instead. 🚀

Top comments (0)