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

# API v2

> One way to send a value, one response envelope, one set of names — the next version of the API

> [!WARNING]
>
> **v2 is under active development.** It does not yet carry v1's [compatibility guarantees](https://docs.compliapi.com/api/versioning.md): fields may still change before it is declared stable. v1 is unchanged and keeps running; nothing here requires you to migrate.

Version 2 lives at `https://api.compliapi.com/api/v2`. It runs the same screening as v1, against the same lists. Authentication, request costs, x402 prices, the audit trail, rate limits and the meanings of `sanctioned` and `flagged` are all the same. What changes is the shape. The OpenAPI spec at [compliapi.com/openapi.json](https://compliapi.com/openapi.json) describes v2. v1's spec is at `https://api.compliapi.com/api/v1/openapi.json`.

## Endpoints

| Method | Path | |
| - | - | - |
| `GET` | `/screen/{type}?value=…` | Every screen. `type` is one of `crypto_address`, `email`, `website`, `government_id`, `vessel`, `aircraft`, `country`, `name`, `pep` |
| `POST` | `/screen/batch` | Up to 50 subjects of any type, PEP included. API token only |
| `GET` | `/search?q=…` | Fuzzy search. Free without a token, metered with one (see below) |
| `GET` | `/ip?ip=…` | VPN detection, location and the location's country screen, in one call. Omit `ip` for the caller's address |
| `GET` | `/lists`, `/lists/{slug}` | Every list, with counts per type, version and refresh schedule. Unauthenticated |
| `GET` | `/lists/{slug}/activity` | One list's listings and delistings per month. Unauthenticated |
| `GET` | `/delistings?cursor=…` | Recently delisted entities, paged. Unauthenticated |

Every screen takes `value`, an optional `ref` (your own id for the subject, echoed and audited) and, except `pep`, an optional `lists` filter. `name` also takes `party_type`, `birth_date`, `country`, `id_number`, `threshold` and `limit`; `pep` takes `birth_date`, `country` and `limit`. Percent-encode `value` as in any query string (`+` is `%2B`).

## The envelope

Every screen — PEP and country included — returns the same object:

```json theme={null}
{
  "type": "crypto_address",
  "value": "0x098B716B8Aaf21512996dC57EB0615e2383E2f96",
  "input": "example.eth",
  "ref": "wallet-77",
  "sanctioned": true,
  "flagged": true,
  "lists_checked": ["ofac", "ofac_consolidated", "un_sc"],
  "list_versions": { "ofac": { "updated_at": "2026-11-28T07:22:04Z", "publication_id": 1234, "checked_at": "2026-11-28T07:37:00Z" } },
  "matches": [
    {
      "list": "ofac",
      "list_name": "OFAC SDN",
      "list_type": "sanctions",
      "match": "exact",
      "score": 100,
      "matched_value": "0x098b716b8aaf21512996dc57eb0615e2383e2f96",
      "matched_name_type": null,
      "party": { "id": "31337", "name": "LAZARUS GROUP", "type": null },
      "reasons": [],
      "source_url": "https://sanctionssearch.ofac.treas.gov/Details.aspx?id=31337",
      "metadata": {}
    }
  ],
  "candidates": [],
  "excluded": 0
}
```

* `value` is what was screened. `input` is what you sent, reported only when the screen changed it (an ENS name resolved to an address).
* `sanctioned` is true only for a match on a government **sanctions** list; `flagged` for any match. A PEP match sets `flagged`, never `sanctioned`.
* Every match has the same fields. `match` is `exact`, `partial` or `fuzzy` (a scored name or PEP match). `score` is 0–100, and `null` for a partial identifier match, which is not scored. `party` is the listed party, when the list names one.
* `candidates` holds PEP results that fell below OpenSanctions' match threshold, for review; they are not matches. `excluded` counts name matches dropped because every listed birth date disagreed.

## Search

`GET /search` is one endpoint with two modes:

* **Without a token** it is free and stores nothing. It is rate-limited per client IP and returns up to 25 results.
* **With an API token** it costs one request and is written to your audit trail. It is rate-limited per organization and returns up to 50 results.

`metered` in the response says which mode ran. Results are ranked candidates (each with a 0–100 `score`), never a verdict.

## IP

```json theme={null}
{
  "ip": "91.218.114.206",
  "ref": null,
  "vpn": false,
  "location": { "city": "Moscow", "region": "Moscow", "country": "RU" },
  "country_screen": { "type": "country", "value": "RU", "sanctioned": true, "flagged": true, "...": "the envelope" }
}
```

One call costs one request (v1 charges one each for `/vpn` and `/geo`). `vpn` is `null` when there is no privacy data for the address, and `country_screen` honours `lists`.

## Errors

Errors are [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details (`application/problem+json`), with v1's [error codes](https://docs.compliapi.com/api/overview.md#error-codes) in `code`:

```json theme={null}
{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "detail": "Unknown list(s): nope. Known lists: ofac, ofac_consolidated, …",
  "code": "INVALID_INPUT"
}
```

A `422` adds `errors`, one `{field, detail}` per invalid parameter. A quota `429` adds `resets_at` and `upgrade_url`. The x402 `402` is unchanged: it is the [x402 protocol's challenge](https://docs.compliapi.com/payments.md).

## From v1

| v1 | v2 |
| - | - |
| `GET /screen/crypto/{address}` | `GET /screen/crypto_address?value=` |
| `GET /screen/email/{email}`, `/screen/id/{government_id}`, `/screen/vessel/{identifier}`, `/screen/aircraft/{identifier}`, `/screen/country/{country}` | `GET /screen/email?value=`, `/screen/government_id?value=`, `/screen/vessel?value=`, `/screen/aircraft?value=`, `/screen/country?value=` |
| `GET /screen/website?address=`, `/screen/name?name=`, `/screen/pep?name=` | `GET /screen/website?value=`, `/screen/name?value=`, `/screen/pep?value=` |
| `type=` on `/screen/name`, `kind=vessel` on search | `party_type=` |
| PEP's `pep` flag and `matches[].match` | `flagged`, and `matches` / `candidates` |
| A match's `value`, `name`, `name_type` | `matched_value`, `party.name`, `matched_name_type` |
| Search `similarity` (0–1), PEP `score` (0–1) | `score` (0–100) |
| `GET /search` and `GET /screen/search` | `GET /search` |
| `GET /vpn`, `GET /geo` | `GET /ip` |
| `GET /screen/lists` and `GET /stats` | `GET /lists` |
| `GET /screen/lists/{slug}/activity` | `GET /lists/{slug}/activity` |
| `GET /delisted` | `GET /delistings` (with `next_cursor`) |
| `{"detail", "code"}` errors | RFC 9457 problem details |

v2 has no whole-list downloads; the v1 ones are [retired](https://docs.compliapi.com/api/versioning.md#current-deprecations).

The [MCP tools](https://docs.compliapi.com/mcp/tools.md) switch to the v2 envelope on **26 February 2027**, with 90 days' notice.


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