Get Ofac Batch
curl --request GET \
--url https://api.baselayer.com/ofac/searches/batches/{batch_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/ofac/searches/batches/{batch_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/ofac/searches/batches/{batch_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.baselayer.com/ofac/searches/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/ofac/searches/batches/{batch_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/ofac/searches/batches/{batch_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/ofac/searches/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "a2e702a1-34b6-4401-bc1c-2d5d07b2a957",
"name": "ofac_batch_1.csv",
"similarity_threshold": 0.9,
"state": "COMPLETED",
"entities_count": 100,
"valid_entities_count": 100,
"entities_with_match_count": 10,
"invalid_entities_count": 10,
"created_at": "2026-08-31T10:31:07.823202",
"updated_at": "2026-08-31T10:31:07.823211"
}{
"code": 1,
"message": "Could not locate the resource for the given URI.",
"metadata": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}OFAC Batch Screening
Get Ofac Batch
Get the status of an OFAC batch.
GET
/
ofac
/
searches
/
batches
/
{batch_id}
Get Ofac Batch
curl --request GET \
--url https://api.baselayer.com/ofac/searches/batches/{batch_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/ofac/searches/batches/{batch_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/ofac/searches/batches/{batch_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.baselayer.com/ofac/searches/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/ofac/searches/batches/{batch_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/ofac/searches/batches/{batch_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/ofac/searches/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "a2e702a1-34b6-4401-bc1c-2d5d07b2a957",
"name": "ofac_batch_1.csv",
"similarity_threshold": 0.9,
"state": "COMPLETED",
"entities_count": 100,
"valid_entities_count": 100,
"entities_with_match_count": 10,
"invalid_entities_count": 10,
"created_at": "2026-08-31T10:31:07.823202",
"updated_at": "2026-08-31T10:31:07.823211"
}{
"code": 1,
"message": "Could not locate the resource for the given URI.",
"metadata": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
The unique identifier of the OFAC batch to download.
Example:
"c1182ab3-5235-4359-8354-b820ad67cb38"
Response
Retrieved status of the OFAC batch.
The unique identifier of the OFAC batch.
Example:
"a2e702a1-34b6-4401-bc1c-2d5d07b2a957"
The name of the ofac batch file
Example:
"ofac_batch_1.csv"
The similarity threshold for the OFAC search
Required range:
0 <= x <= 1Examples:
0.9
0.95
0.99
The current processing state of the ofac batch
Available options:
PENDING, EXECUTING, COMPLETED, FAILED, CANCELLED Example:
"COMPLETED"
Total number of entities in the batch
Example:
100
Total number of valid entities in the batch
Example:
100
Total number of entities with a match in the batch
Example:
10
Total number of invalid entities in the batch
Example:
10
When the ofac batch was created
Example:
"2026-08-31T10:31:07.823202"
When the ofac batch was updated
Example:
"2026-08-31T10:31:07.823211"