Find an API

Search public APIs with auth details & Postman guides

← All APIs

US Treasury OFAC Sanctions List API

treasury.gov · Government

Government API Key Free & Open Government Financial Services Banking Compliance Security Government

Search the OFAC Specially Designated Nationals (SDN) list and other sanctions lists maintained by the US Treasury. Essential for KYC/AML compliance checks. Returns matches against individuals, companies, and vessels under US sanctions.

Authentication

API Key Free API key from ofac-api.treasury.gov. Required for all requests.

Parameter name: apiKey (in header)

Sample Requests

GET Search sanctions list by name

Returns SDN list matches for a person or entity name. minScore controls fuzzy matching sensitivity (0-100).

https://ofac-api.treasury.gov/v1/search?name=John Smith&source=SDN&minScore=85

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
apiKey auth YOUR_API_KEY
curl -X GET "https://ofac-api.treasury.gov/v1/search?name=John%20Smith&source=SDN&minScore=85" \
  -H "apiKey: YOUR_API_KEY"
import requests
params = {
    "name": "John Smith",
    "source": "SDN",
    "minScore": "85"
}
headers = {
    "apiKey": "YOUR_API_KEY"
}
response = requests.get(
    "https://ofac-api.treasury.gov/v1/search",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://ofac-api.treasury.gov/v1/search');
url.searchParams.set('name', 'John Smith');
url.searchParams.set('source', 'SDN');
url.searchParams.set('minScore', '85');

const response = await fetch(url, {
  headers: {
    'apiKey': 'YOUR_API_KEY'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://ofac-api.treasury.gov/v1/search")
	q := baseURL.Query()
	q.Set("name", "John Smith")
	q.Set("source", "SDN")
	q.Set("minScore", "85")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)
	req.Header.Set("apiKey", "YOUR_API_KEY")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://ofac-api.treasury.gov/v1/search")
uri.query = URI.encode_www_form({
  "name" => "John Smith",
  "source" => "SDN",
  "minScore" => "85"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)
req["apiKey"] = "YOUR_API_KEY"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://ofac-api.treasury.gov/v1/search?" . http_build_query([
    "name" => "John Smith",
    "source" => "SDN",
    "minScore" => "85"
]);
$opts = ["http" => [
    "method" => "GET",
    "header" => implode("\r\n", [
        "apiKey: YOUR_API_KEY"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. Request a free API key at https://ofac-api.treasury.gov/
  2. In Postman, add header: apiKey = YOUR_API_KEY
  3. GET https://ofac-api.treasury.gov/v1/search?name={name}&minScore=85
  4. minScore 85-90 recommended for production KYC — higher = fewer false positives
  5. source param: SDN (main list), CONS (consolidated), or omit for all lists
  6. Response includes match score, entity type, and program (sanctions program name)

What can you build with US Treasury OFAC Sanctions List API?

US Treasury OFAC Sanctions List API is a Government API. Developers commonly use government APIs for:

  • surfacing public datasets in citizen-facing apps
  • building transparency and civic engagement tools
  • accessing legislation, court records, and official data
  • powering research and journalism tools
  • creating compliance and regulatory monitoring dashboards

API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control. US Treasury OFAC Sanctions List API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗