Skip to content
Office of Foreign Asset Control (OFAC) - US Sanctions Search API
Branch: master
Clone or download
adamdecaf Merge pull request #89 from adamdecaf/address-search-multi-params
cmd/server: search: handle Country and average weight with Address
Latest commit 2834e0e Jun 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
client client: add ?country search param Jun 12, 2019
cmd cmd/server: search: test only country param on Address search Jun 13, 2019
docs docs: add "A Framework for OFAC Compliance Commitments" from the US T… Jun 3, 2019
examples/webhook all: gofmt -s -w Apr 26, 2019
test/testdata Increase reader.go test coverage Jan 17, 2019
.codecov.yml Create .codecov.yml Jan 24, 2019
.gitignore cmd/server: add sqlite and example migrations Jan 30, 2019
.travis.yml Update .travis.yml Apr 30, 2019
AUTHORS docs: contrib and getting help sections Feb 21, 2019 docs: changelog++ May 16, 2019 docs: contrib and getting help sections Feb 21, 2019
Dockerfile build: update to Go 1.12 Feb 26, 2019
LICENSE Initial commit Jan 2, 2019 docs: describe moov's primary usage of OFAC (for paygate) Jun 5, 2019
download.go cmd/server: download OFAC data and start Elasticsearch concurrently Jan 18, 2019
download_test.go cmd/server: download OFAC data and start Elasticsearch concurrently Jan 18, 2019
go.mod chore(deps): update all May 20, 2019
go.sum vendor: go mod tidy Jun 3, 2019
makefile client: bump OpenAPITools generator to 4.0.1 Jun 3, 2019
ofac.go client: fixup JSON names for ofac.AlternateIdentity Feb 14, 2019
openapi-generator client: start generating a client from our OpenAPI doc Jan 29, 2019
openapi.yaml client: add ?country search param Jun 12, 2019
reader.go cmd/server: misc docs around the codebase Feb 15, 2019
reader_test.go ofac: drop Array suffix from Reader fields Jan 23, 2019
version.go bump version for dev Apr 25, 2019


GoDoc Build Status Coverage Status Go Report Card Apache 2 licensed

Office of Foreign Asset Control (OFAC) is an HTTP API and Go library to download, parse and serve United States OFAC sanction data for applications and humans. Also supported is an async webhook notification service to initiate processes on remote systems connected with OFAC. The US Treasury department offers a search page for OFAC records.

All United States companies are required to comply with OFAC regulations and sanction lists. Moov's primary usage for this project is with ACH origination in our paygate project.

To get started using OFAC download the latest release or our Docker image. We also have a demo OFAC instance as part of Moov's demo environment.

# Run as a binary
$ wget
$ chmod +x ofac-darwin-amd64
$ ./ofac-darwin-amd64
ts=2019-02-05T00:03:31.9583844Z caller=main.go:42 startup="Starting ofac server version v0.7.0"

# Run as a Docker image
$ docker run -p 8084:8084 -p 9094:9094 -it moov/ofac:v0.7.0
ts=2019-02-05T00:03:31.9583844Z caller=main.go:42 startup="Starting ofac server version v0.7.0"

# Perform a basic search
$ curl -s localhost:8084/search?name=...
  "SDNs": [
      "entityID": "...",
      "sdnName": "...",
      "sdnType": "...",
      "program": "...",
      "title": "...",
      "callSign": "...",
      "vesselType": "...",
      "tonnage": "...",
      "grossRegisteredTonnage": "...",
      "vesselFlag": "...",
      "vesselOwner": "...",
      "remarks": "..."
  "altNames": null,
  "addresses": null

We offer hosted api docs as part of Moov's tools and an OpenAPI specification for use with generated clients.

Docs: | api docs


Environmental Variable Description Default
OFAC_DATA_REFRESH Interval for OFAC data redownload and reparse. 12h
OFAC_DOWNLOAD_TEMPLATE HTTP address for downloading raw OFAC files. (OFAC website)
SQLITE_DB_PATH Local filepath location for the paygate SQLite database. ofac.db
WEBHOOK_BATCH_SIZE How many watches to read from database per batch of async searches. 100


  • Download OFAC data on startup
  • Index data for searches
  • Async searches and notifications (webhooks)
  • Manual overrides to mark a Company or Customer as unsafe (blocked) or exception (never blocked).
  • Library to download and parse OFAC files

Webhook Notifications

When OFAC sends a webhook to your application the body will contain a JSON representation of the Company or Customer model as the body to a POST request. You can see an example in Go.

An Authorization header will also be sent with the authToken provided when setting up the watch. Clients should verify this token to ensure authenticated communicated.

Webhook notifications are ran after the OFAC data is successfully refreshed, which is determined by the OFAC_DATA_REFRESH environmental variable.

Watching a specific Customer or Company by ID

OFAC supports sending a webhook periodically when a specific Company or Customer is to be watched. This is designed to update another system about an OFAC entry's sanction status.

Watching a customer or company name

OFAC supports sending a webhook periodically with a free-form name of a Company or Customer. This allows external applications to be notified when an entity matching that name is added to the OFAC list. The match percentage will be included in the JSON payload.

Getting Help

We maintain a runbook for common issues and configuration options. Also, if you've encountered a security issue please contact us at

channel info
Project Documentation Our project documentation available online.
Google Group moov-users The Moov users Google group is for contributors other people contributing to the Moov project. You can join them without a google account by sending an email to After receiving the join-request message, you can simply reply to that to confirm the subscription.
Twitter @moov_io You can follow Moov.IO's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories.
GitHub Issue If you are able to reproduce an problem please open a GitHub Issue under the specific project that caused the error.
moov-io slack Join our slack channel to have an interactive discussion about the development of the project. Request an invite to the slack channel


Yes please! Please review our Contributing guide and Code of Conduct to get started!

Note: This project uses Go Modules, which requires Go 1.11 or higher, but we ship the vendor directory in our repository.



Apache License 2.0 See LICENSE for details.

You can’t perform that action at this time.