Sanctions check

Screen a person or company name against OFAC, EU and UN sanctions lists.

Risk screening OpenAPI document

🎁 Free trial: 3 free calls / day (per caller, per tool)

Tools

Try a real call right now

HTTPcURLNode.jsPython

What your agent sends

{
  "name": "Acme Trading Ltd",
  "type": "company"
}
🎁 3 of 3 free calls left today

Plain curl stops at the 402 challenge: add an x402 client (Node.js or Python tabs) to pay automatically.

Shell
# Plain curl stops at the 402 challenge: add an x402 client (Node.js or Python tabs) to pay automatically.
curl -X POST 'https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name' \
  -H 'content-type: application/json' \
  -d '{"name":"Acme Trading Ltd","type":"company"}'

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

TypeScript
// npm install @x402/fetch @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

const res = await fetchWithPayment("https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"name":"Acme Trading Ltd","type":"company"}),
});
console.log(await res.json());

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

Python 3
# pip install "x402[httpx]" eth_account
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client


async def main() -> None:
    client = x402Client()
    account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
    register_exact_evm_client(client, EthAccountSigner(account))
    async with x402HttpxClient(client) as http:
        response = await http.post("https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name", json={"name":"Acme Trading Ltd","type":"company"})
        await response.aread()
        print(response.json())


asyncio.run(main())

The x402 Java reference client from the official repository. There is no published Java SDK yet: you supply the signature (for example with web3j).

Java 11+
// Reference client from github.com/coinbase/x402 (java/): build it with `mvn clean install`, then
// <dependency><groupId>org.x402</groupId><artifactId>x402</artifactId><version>1.0.0-SNAPSHOT</version></dependency>
import org.x402.client.X402HttpClient;
import org.x402.crypto.CryptoSigner;
import java.math.BigInteger;
import java.net.URI;
import java.net.http.HttpResponse;
import java.util.Map;

public class Call {
  public static void main(String[] args) throws Exception {
    // You provide the EIP-3009 signature (for example with web3j) from your private key (env EVM_PRIVATE_KEY).
    CryptoSigner signer = new CryptoSigner() {
      @Override
      public String sign(Map<String, Object> payload) {
        return signWithWallet(System.getenv("EVM_PRIVATE_KEY"), payload);
      }
    };
    X402HttpClient client = new X402HttpClient(signer);

    BigInteger amount = BigInteger.valueOf(10000); // $0.01 in USDC (6 decimals)
    String usdcOnBase = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
    String payTo = "<the seller address from the 402 challenge>";
    HttpResponse<String> response = client.get(URI.create("https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name"), amount, usdcOnBase, payTo);
    System.out.println(response.body());
  }
}

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

Go
// go get github.com/x402-foundation/x402/go/v2
package main

import (
	"context"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
	"strings"

	x402 "github.com/x402-foundation/x402/go/v2"
	x402http "github.com/x402-foundation/x402/go/v2/http"
	evm "github.com/x402-foundation/x402/go/v2/mechanisms/evm/exact/client"
	evmsigners "github.com/x402-foundation/x402/go/v2/signers/evm"
)

func main() {
	signer, _ := evmsigners.NewClientSignerFromPrivateKey(os.Getenv("EVM_PRIVATE_KEY"))
	client := x402.Newx402Client().Register("eip155:*", evm.NewExactEvmScheme(signer))
	httpClient := x402http.WrapHTTPClientWithPayment(http.DefaultClient, x402http.Newx402HTTPClient(client))

	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()
	req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name", strings.NewReader(`{"name":"Acme Trading Ltd","type":"company"}`))
	req.Header.Set("content-type", "application/json")
	res, err := httpClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(body))
}

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

Rust
// Cargo.toml: x402-reqwest = "0.6", x402-chain-eip155, alloy-signer-local, reqwest, tokio (features = ["full"])
use alloy_signer_local::PrivateKeySigner;
use reqwest::Client;
use std::sync::Arc;
use x402_chain_eip155::V2Eip155ExactClient;
use x402_reqwest::{ReqwestWithPayments, ReqwestWithPaymentsBuild, X402Client};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let signer: Arc<PrivateKeySigner> = Arc::new(std::env::var("EVM_PRIVATE_KEY")?.parse()?);
    let x402 = X402Client::new().register(V2Eip155ExactClient::new(signer));
    let http = Client::new().with_payments(x402).build();

    let res = http
        .post("https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name")
        .header("content-type", "application/json")
        .body(r#"{"name":"Acme Trading Ltd","type":"company"}"#)
        .send()
        .await?;
    println!("{} {}", res.status(), res.text().await?);
    Ok(())
}

What your agent's x402 client does behind the scenes (technical, illustrative).

  1. 1

    Call the endpoint

    →
    POST https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name
    content-type: application/json
    
    {
      "name": "Acme Trading Ltd",
      "type": "company"
    }
    ←
    402 Payment Required
    HTTP/1.1 402 Payment Required
    PAYMENT-REQUIRED: <base64>
    
    {
      "x402Version": 2,
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "10000",
          "asset": "USDC",
          "payTo": "0x…"
        }
      ]
    }
  2. 2

    Sign the payment (local)

    Your wallet signs a USDC authorisation locally. Nothing leaves your machine except the signature.

    →
    wallet.sign(transferWithAuthorization,
      to: payTo, value: 10000 ($0.01 USDC), network: base)
    ←
    signature
    PAYMENT-SIGNATURE: <signed authorisation>
  3. 3

    Retry with the signature

    →
    POST https://api.17711.xyz/registry/sanctions-check-service/v1/sanctions-check/screen_name
    PAYMENT-SIGNATURE: <signed authorisation>
    content-type: application/json
    
    {
      "name": "Acme Trading Ltd",
      "type": "company"
    }
    ←
    200 OK
    HTTP/1.1 200 OK
    PAYMENT-RESPONSE: <settlement receipt>
    
    { … the tool's JSON answer … }

The x402 SDK does steps 2 and 3 for you.

Try it live

A real call to the API from your browser, using the free calls included with this service.

OpenAPI definition

OpenAPI definition · sanctions_check_screen_name
openapi.json
{
  "operationId": "sanctions_check_screen_name",
  "summary": "Sanctions screening: OFAC sanctions list check of a person or company name against OFAC SDN, EU and UN lists for AML KYC compliance ($0.01, x402)",
  "description": "Screens a person, company, vessel or aircraft name against the OFAC Specially Designated Nationals list, the European Union consolidated financial sanctions list and the United Nations Security Council consolidated list. Send the `name`; optionally restrict it with `type` (person, entity, vessel, aircraft) and give a person's `birth_year` to rank listed namesakes with another birth year lower. Matching ignores word order (`Putin, Vladimir` = `Vladimir Putin`), accents and capitalisation, tolerates one-letter spelling variants in longer words, and also searches every published alias. The answer is a verdict (`match`, `possible_match` or `no_match`) and up to ten matches, each with its list, entry id, listed name, the alias that matched, a 0-1 score, programmes, countries, listing date, published birth years and remarks. The response also states which lists were screened with their size, publication date and download time, and which could not be loaded. The lists are downloaded again every six hours. Fixed rules, no language model. A `no_match` does not clear a party and a match needs human review: this is a screening aid, not legal advice. If the lists are not loaded the call fails and is not charged. Costs $0.01 per call and takes well under a second. Free trial: 3 free calls per caller IP address, per tool, per 24 hours (and at most 50 free calls per window for this tool across all callers; MCP callers, whose address is not known, share a single anonymous free call). After that, every call is paid via x402 at $0.01 USDC per call.",
  "x-price-usdc": "0.01",
  "x-payment-info": {
    "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.010000"
    },
    "protocols": [
      {
        "x402": {}
      }
    ]
  },
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name to screen: a person (`Vladimir Putin`, `Putin, Vladimir`) or a company, vessel or organisation. Word order, accents, capitalisation and small spelling variants do not matter."
            },
            "type": {
              "description": "Restrict the screening to `person`, `entity`, `vessel` or `aircraft`. Omit it to screen everything.",
              "type": [
                "string",
                "null"
              ]
            },
            "birth_year": {
              "description": "A person's year of birth. Listed people whose published birth years do not include it are ranked lower and marked `birth_year_consistent: false`.",
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 65535
            }
          },
          "required": [
            "name"
          ]
        },
        "example": {
          "name": "string",
          "type": "string",
          "birth_year": 0
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name as screened."
              },
              "verdict": {
                "type": "string",
                "description": "`match` (an exact or close match), `possible_match` (a partial match to review) or `no_match`."
              },
              "matches": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "list": {
                      "type": "string",
                      "description": "`OFAC SDN`, `EU consolidated` or `UN Security Council`."
                    },
                    "entry_id": {
                      "type": "string",
                      "description": "The entry's identifier in that list."
                    },
                    "kind": {
                      "type": "string",
                      "description": "`person`, `entity`, `vessel` or `aircraft`."
                    },
                    "listed_name": {
                      "type": "string",
                      "description": "The listed primary name."
                    },
                    "matched_alias": {
                      "description": "The name or alias that matched, when it is not the primary name.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "score": {
                      "type": "number",
                      "description": "0 to 1: 1 means the same words (any order); lower means a partial or approximate match."
                    },
                    "match_type": {
                      "type": "string",
                      "description": "`exact`, `close` or `possible`."
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Other names the entry is listed under (at most 5)."
                    },
                    "programs": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Sanctions programmes or regimes."
                    },
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Nationalities or countries, when published."
                    },
                    "listed_on": {
                      "description": "Date of listing, when published.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "birth_years": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535
                      },
                      "description": "Published years of birth."
                    },
                    "birth_year_consistent": {
                      "description": "`true`/`false` when a `birth_year` was given and the entry publishes birth years.",
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "remarks": {
                      "description": "Published remarks (truncated).",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "list",
                    "entry_id",
                    "kind",
                    "listed_name",
                    "score",
                    "match_type",
                    "aliases",
                    "programs",
                    "countries",
                    "birth_years"
                  ]
                },
                "description": "The best matches, highest score first (at most 10)."
              },
              "lists_screened": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "list": {
                      "type": "string"
                    },
                    "entries": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "published": {
                      "description": "Publication date announced by the list itself, when it states one.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fetched_at": {
                      "type": "string",
                      "description": "When this service last downloaded the list (UTC)."
                    }
                  },
                  "required": [
                    "list",
                    "entries",
                    "fetched_at"
                  ]
                },
                "description": "The lists that were screened, with their size and freshness."
              },
              "lists_missing": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Lists that could not be loaded: the screening did not cover them."
              },
              "disclaimer": {
                "type": "string"
              },
              "screened_at": {
                "type": "string",
                "description": "When the screening ran (UTC)."
              }
            },
            "required": [
              "name",
              "verdict",
              "matches",
              "lists_screened",
              "lists_missing",
              "disclaimer",
              "screened_at"
            ]
          },
          "example": {
            "name": "string",
            "verdict": "string",
            "matches": [
              {
                "list": "string",
                "entry_id": "string",
                "kind": "string",
                "listed_name": "string",
                "matched_alias": "string",
                "score": 0,
                "match_type": "string",
                "aliases": [
                  "string"
                ],
                "programs": [
                  "string"
                ],
                "countries": [
                  "string"
                ],
                "listed_on": "string",
                "birth_years": [
                  0
                ],
                "birth_year_consistent": false,
                "remarks": "string"
              }
            ],
            "lists_screened": [
              {
                "list": "string",
                "entries": 0,
                "published": "string",
                "fetched_at": "string"
              }
            ],
            "lists_missing": [
              "string"
            ],
            "disclaimer": "string",
            "screened_at": "string"
          }
        }
      }
    },
    "402": {
      "description": "Payment required -- a free-call quota exists (default 5 calls, see PLATFORM_FREEMIUM_FREE_CALLS) before this status applies; beyond it, pay via the real x402 protocol (PAYMENT-REQUIRED response header, decode and retry with a signed PAYMENT-SIGNATURE header).",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "description": "x402 v2 PaymentRequired challenge",
            "properties": {
              "x402Version": {
                "type": "integer"
              },
              "error": {
                "type": "string"
              },
              "resource": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string"
                  }
                }
              },
              "accepts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "scheme": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string",
                      "description": "Token atomic units, NOT decimal USD -- see x-payment-info.price.amount for the decimal form."
                    },
                    "asset": {
                      "type": "string"
                    },
                    "payTo": {
                      "type": "string"
                    },
                    "maxTimeoutSeconds": {
                      "type": "integer"
                    },
                    "extra": {
                      "type": "object"
                    }
                  }
                }
              }
            },
            "required": [
              "x402Version",
              "accepts"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Standardized error envelope, on every non-2xx response from this fleet: {\"error\": {\"code\": <dotted string, e.g. \"request.bad_request\">, \"index\": <integer>, \"status\": <HTTP status code>, \"message\": <client-safe description>, \"debug\": <object, present only for an authorized caller>}}.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "description": "ErrorEnvelope"
          }
        }
      }
    }
  }
}

Related services