> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baselayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Watchlists & Sanctions: Standalone Checks

> Screen a name against OFAC and PEP lists without running a full Business Search.

## Standalone Sanctions & PEP Checks

Baselayer offers dedicated endpoints for running sanctions and PEP screening independently from Business Search. These are useful when you need to check individual names, run batch screening, or build custom compliance workflows outside of the standard business verification flow. Sanction lists are updated daily.

For watchlist screening as part of Business Search, see the [Watchlists & Sanctions: Business Search](https://docs.baselayer.com/docs/watchlists-sanctions-basics.md) guide. For a deeper understanding of sanctions compliance concepts, see the [Watchlists, Sanctions & Compliance Screening](https://docs.baselayer.com/docs/watchlists-sanctions-and-compliance-screening.md) guide.

***

## When to Use Standalone Checks

Standalone sanctions and PEP endpoints are designed for workflows where you need screening outside of a full Business Search:

* **Individual KYC** — Screening a person's name (e.g., a beneficial owner or authorized signer) without running a full business verification
* **Batch processing** — Screening many names at once by uploading a CSV file, such as during periodic rescreening of an existing customer base
* **Re-screening existing customers** — Running updated checks against current sanctions lists for customers already onboarded
* **Custom compliance workflows** — Integrating sanctions checks at specific points in your application flow (e.g., before disbursing funds, during periodic reviews)
* **Pre-screening** — Quick name checks before initiating a full Business Search

***

## Available Endpoints

### OFAC Sanctions Check

`POST /ofac/searches`

Checks a name against OFAC sanctions lists (SDN, SSI, and other OFAC-administered lists).

```json theme={null}
POST /ofac/searches
{
  "name": "John Smith",
  "similarity_threshold": 0.9
}
```

### PEP Check

`POST /pep/searches`

Checks a name against Politically Exposed Persons databases to identify individuals holding or having held prominent public positions.

```json theme={null}
POST /pep/searches
{
  "name": "Jane Doe",
  "similarity_threshold": 0.9
}
```

***

## The Similarity Threshold

Both standalone endpoints accept a `similarity_threshold` parameter that controls how closely a name must match a watchlist entry to be flagged. They also accept `limit`, the most matches to return (default 1, max 50).

### How It Works

The threshold is a value between `0.0` and `1.0` (0% to 100% similarity). A name must meet or exceed the threshold to be returned as a match.

* **0.9 (90%)** — High precision. Our recommended starting point to limit false positives, while maximizing coverage.
* **0.85 (85%)** — Balanced. Catches more name variations and cases with additional words.
* **0.7–0.8 (70–80%)** — High recall. Catches more name variations (transliterations, abbreviations, typos) but generates more false positives requiring manual review.

### Choosing a Threshold

The default for standalone checks is **0.9 (90%)** if no `similarity_threshold` is specified. This provides high precision with fewer false positives. Adjust based on your results:

* If you're seeing too many false positives (common names flagging unrelated watchlist entries), raise the threshold toward 0.95.
* If you're in a highly regulated industry and want maximum coverage, lower it toward 0.7 — but expect more manual review.

Note: Business Search screens at the thresholds set in your organization's [Account Settings](https://docs.baselayer.com/docs/account-settings.md) (0.95 for every list by default). Standalone checks do **not** use Account Settings: they default to 0.9 and give you explicit control over this parameter per request, allowing you to tune sensitivity for different workflows.

***

## Reading the Response

Standalone check responses return match results directly.

### Key Fields

* `total_matches` — Number of matches found. A value of 0 means no matches.
* `matches`: Array of individual match records, each containing name, addresses, alternative names, and similarity score.

### Identifying Matches

Any response where `total_matches > 0` indicates a positive match requiring review. Examine the `matches` array to understand what matched and assess whether it's a true positive or false positive.

***

## Implementation Examples

### OFAC Sanctions Check

```python theme={null}
import requests

def check_ofac(name, similarity_threshold=0.9):
    """
    Perform an independent OFAC sanctions check.
    """
    url = "https://api.baselayer.com/ofac/searches"
    headers = {
        "X-API-Key": "your-api-key",
        "Content-Type": "application/json"
    }
    payload = {
        "name": name,
        "similarity_threshold": similarity_threshold
    }
    
    response = requests.post(url, json=payload, headers=headers)
    response.raise_for_status()
    
    data = response.json()
    total_matches = data.get('total_matches', 0)
    
    return {
        'has_hit': total_matches > 0,
        'hit_count': total_matches,
        'hits': data.get('matches', [])
    }

# Usage
result = check_ofac("John Doe", similarity_threshold=0.9)
if result['has_hit']:
    print(f"⚠️ OFAC hit: {result['hit_count']} match(es)")
    for hit in result['hits']:
        print(f"  - {hit['name']} (Program: {hit.get('program')})")
else:
    print("✅ No OFAC matches")
```

### PEP Check

```python theme={null}
def check_pep(name, similarity_threshold=0.9):
    """
    Perform an independent PEP check.
    """
    url = "https://api.baselayer.com/pep/searches"
    headers = {
        "X-API-Key": "your-api-key",
        "Content-Type": "application/json"
    }
    payload = {
        "name": name,
        "similarity_threshold": similarity_threshold
    }
    
    response = requests.post(url, json=payload, headers=headers)
    response.raise_for_status()
    
    data = response.json()
    total_matches = data.get('total_matches', 0)
    
    return {
        'has_hit': total_matches > 0,
        'hit_count': total_matches,
        'hits': data.get('matches', [])
    }

# Usage
result = check_pep("Jane Doe", similarity_threshold=0.9)
if result['has_hit']:
    print(f"⚠️ PEP hit: {result['hit_count']} match(es)")
    for hit in result['hits']:
        print(f"  - {hit['name']} (Position: {hit.get('title')})")
else:
    print("✅ No PEP matches")
```

### Batch OFAC Screening

For screening many names at once — such as periodic rescreening of an existing customer base — Baselayer provides a dedicated batch endpoint that accepts a CSV file.

`POST /ofac/searches/batches`

Submit a CSV file (max 5MB) with two columns: `entity_name` and `reference_id`. The `reference_id` is your internal identifier for each entity, allowing you to match results back to your records.

**Sample CSV: [here](https://storage.googleapis.com/osiris-public-assets-prod/schemas/ofac_batch_csv_example.csv)**

```csv theme={null}
entity_name,reference_id
Alice Johnson,CUST-001
Bob Chen,CUST-002
Carlos Rivera,CUST-003
```

**Request:**

```python theme={null}
import requests

def batch_ofac_screen(csv_file_path, similarity_threshold=0.9):
    """
    Submit a CSV for batch OFAC screening.
    """
    url = "https://api.baselayer.com/ofac/searches/batches"
    headers = {
        "X-API-Key": "your-api-key",
        "accept": "application/json"
    }
    params = {"similarity_threshold": similarity_threshold}
    
    with open(csv_file_path, "rb") as f:
        files = {"file": ("customers.csv", f, "text/csv")}
        response = requests.post(url, headers=headers, params=params, files=files)
    
    response.raise_for_status()
    return response.json()

# Usage
result = batch_ofac_screen("customers.csv", similarity_threshold=0.9)
print(f"Batch ID: {result['id']}")
print(f"State: {result['state']}")
print(f"Total entities: {result['entities_count']}")
print(f"Entities with matches: {result['entities_with_match_count']}")
```

**Response:**

The API returns a summary of the batch analysis:

```json theme={null}
{
  "id": "fce8c776-163d-4c28-bd3d-cc2797b4f9af",
  "name": "customers.csv",
  "similarity_threshold": 0.9,
  "state": "PENDING",
  "entities_count": 100,
  "valid_entities_count": 100,
  "entities_with_match_count": 10,
  "invalid_entities_count": 0,
  "created_at": "2026-03-31T23:48:20.569048",
  "updated_at": "2026-03-31T23:48:20.569059"
}
```

The `similarity_threshold` parameter defaults to 0.9 and can be adjusted per batch via query parameter.

Poll `GET /ofac/searches/batches/{batch_id}` until the state is `COMPLETED`, then download the results from `GET /ofac/searches/batches/{batch_id}/download`.

***

## Best Practices

**Use standalone checks for individual screening.** If you're verifying a person (not a business), standalone endpoints are the right tool. Don't run a full Business Search just to check a name.

**Match your threshold to your risk tolerance.** Start at 0.9 and adjust. Highly regulated industries may want 0.7.

**Always review match details.** A positive match doesn't always mean a true hit. Examine names, addresses, and sanctions programs to distinguish true positives from false positives caused by common names.

**Log everything.** Record the name checked, threshold used, timestamp, and full response. Regulators may require proof of screening.

**Combine with Business Search.** Standalone checks are complementary to — not a replacement for — Business Search watchlist screening. Use standalone checks for individual names and edge cases; use Business Search for full business verification workflows.

**Set up ongoing monitoring.** Standalone checks are point-in-time. For continuous screening, use [Portfolio Monitoring](https://docs.baselayer.com/docs/portfolio-monitoring.md) to automatically rescreen your customer base when watchlists are updated.

***

## Next Steps

* **Learn the fundamentals:** Read [Watchlists, Sanctions & Compliance Screening](https://docs.baselayer.com/docs/watchlists-sanctions-and-compliance-screening.md) for compliance concepts
* **Business Search screening:** See [Watchlists & Sanctions: Business Search](https://docs.baselayer.com/docs/watchlists-sanctions-basics.md) for integrated screening
* **Set up monitoring:** Use [Portfolio Monitoring](https://docs.baselayer.com/docs/portfolio-monitoring.md) to continuously screen your customer base
* **API reference:** [POST /ofac/searches](https://docs.baselayer.com/api-reference/ofac/search-ofac.md) | [POST /ofac/searches/batches](https://docs.baselayer.com/api-reference/ofac/post-ofac-batch.md) | [POST /pep/searches](https://docs.baselayer.com/api-reference/pep/search-pep.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.