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

# OpenSanctions

> OpenSanctions' hosted API over its consolidated sanctions, politically exposed persons and watchlist database: multi-property screening matches, full-text entity search, full entity records with relationships, and raw statements.

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/opensanctions.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=11b4c123765f07da85635ac3efb53513)

[Web Catalog · Government](https://docs.webrouter.net/data-apis.md?category=government)

Needs&#x20;

`OPENSANCTIONS_API_KEY`

Endpoints

6

Auth

Key in header

[Vendor docs](https://www.opensanctions.org/docs/api/)

## Setup

| Variable | | What it is |
| - | - | - |
| `OPENSANCTIONS_API_KEY` | required | OpenSanctions API key from the customer portal; free keys are issued for journalism, civil-society and academic work. Sent as 'Authorization: ApiKey \<key>'. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Paid from prepaid credit bundles: one credit per metered operation. statements.list is not charged but still needs a key.
* Use match.query for screening (scored candidates from structured properties); search.query is a user-facing text search and is not meant for screening.
* The dataset path segment scopes a query: 'default' (recommended) is the combined collection of all datasets; a narrower name such as us\_ofac\_sdn only considers candidates from that source, and may miss enriched entities like relatives of PEPs. catalog.get lists every dataset name.
* Paging on search and adjacent entities: limit up to 500, offset up to 9,499.

## Endpoints

POST

Screen entities against the lists

Scored candidate matches for one or more people, companies or vessels described by their properties (name, birth date, nationality, registration number...).

[Open](#opensanctions-match)

GET

Search entities by text

Entities whose names or text match a query, with facet counts by country, topic and dataset.

[Open](#opensanctions-search)

GET

Get an entity

One entity in full, with data from every source dataset and nested sanctions, identifiers, family and business relationships.

[Open](#opensanctions-entities-get)

GET

List an entity's related entities

Passports, sanctions, associates and other adjacent entities of one entity, paged (beta).

[Open](#opensanctions-entities-adjacent)

GET

List datasets

The service manifest: every indexed dataset and collection and how often each is loaded.

[Open](#opensanctions-catalog-get)

GET

List raw statements

Raw entity data as statements (the statement-based data model).

[Open](#opensanctions-statements-list)

### Screen entities against the lists

POST

`/match/{dataset}`

`opensanctions.match`

Scored candidate matches for one or more people, companies or vessels described by their properties (name, birth date, nationality, registration number...).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`dataset` required</td><td>string</td><td>path</td><td>Dataset or collection to match against. Example `default`</td></tr>
    <tr><td>`queries` required</td><td>object</td><td>body</td><td>Map of your own query keys to entity examples \{schema, properties}; property values are lists. Example `{"q1": {"schema": "Person", "properties": {"name": ["John Doe"], "birthDate": ["1975-04-21"], "nationality": ["us"]}}}`</td></tr>
    <tr><td>`weights`</td><td>object</td><td>body</td><td>Scoring feature weights to override. Example `{"name_literal": 0.8}`</td></tr>

    <tr>
      <td>
        `config`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        Algorithm-specific configuration parameters.
      </td>
    </tr>

    <tr><td>`limit`</td><td>integer</td><td>query</td><td>Candidates per query: default 5, max 500. Example `5`</td></tr>
    <tr><td>`threshold`</td><td>number</td><td>query</td><td>Score at or above which a candidate counts as a match (default 0.7, which the default algorithm is calibrated for; raise it for fewer false positives). Example `0.7`</td></tr>
    <tr><td>`algorithm`</td><td>string</td><td>query</td><td>Scoring algorithm (default best; algorithms are listed at /algorithms). Example `best`</td></tr>

    <tr>
      <td>
        `topics`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Only entities with these risk topics, e.g. sanction, role.pep.
      </td>
    </tr>

    <tr>
      <td>
        `exclude_dataset`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Ignore entities from these datasets.
      </td>
    </tr>

    <tr>
      <td>
        `changed_since`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only entities changed since this date (YYYY-MM-DD, optional time).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.opensanctions.org/docs/api/request/) · Same job: [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-sanctions-screen), [Pappers](https://docs.webrouter.net/data-apis/pappers.md#pappers-compliance-person)

```python Python theme={null}
router.call_data_api("opensanctions.match", {'dataset': 'default', 'queries': {'q1': {'schema': 'Person', 'properties': {'name': ['John Doe'], 'birthDate': ['1975-04-21'], 'nationality': ['us']}}}, 'weights': {'name_literal': 0.8}, 'limit': 5, 'threshold': 0.7, 'algorithm': 'best'})
```

```text MCP theme={null}
call_data_api(endpoint="opensanctions.match", params={"dataset": "default", "queries": {"q1": {"schema": "Person", "properties": {"name": ["John Doe"], "birthDate": ["1975-04-21"], "nationality": ["us"]}}}, "weights": {"name_literal": 0.8}, "limit": 5, "threshold": 0.7, "algorithm": "best"})
```

> [!NOTE]
>
> * A read over POST. Each query in the batch is answered under its own key in responses.

### Search entities by text

GET

`/search/{dataset}`

`opensanctions.search`

Entities whose names or text match a query, with facet counts by country, topic and dataset.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`dataset` required</td><td>string</td><td>path</td><td>Dataset or collection to search. Example `default`</td></tr>
    <tr><td>`q`</td><td>string</td><td>query</td><td>Text query; field filters, wildcards and fuzzy syntax allowed. Example `Vladimir Putin`</td></tr>
    <tr><td>`schema`</td><td>string</td><td>query</td><td>Entity type, e.g. Person, Company, Vessel (default Thing, all). Example `Person`</td></tr>
    <tr><td>`countries`</td><td>array</td><td>query</td><td>Country codes to filter on. Example `["ru"]`</td></tr>

    <tr>
      <td>
        `topics`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Risk topics to filter on, e.g. sanction.
      </td>
    </tr>

    <tr>
      <td>
        `datasets`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Datasets to filter on.
      </td>
    </tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        field:value filters, e.g. properties.birthDate:1985.
      </td>
    </tr>

    <tr><td>`filter_op`</td><td>string</td><td>query</td><td>How multiple values on one filter combine; OR is the legacy default, AND recommended. One of `OR`, `AND`</td></tr>

    <tr>
      <td>
        `fuzzy`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Fuzzy matching.
      </td>
    </tr>

    <tr><td>`limit`</td><td>integer</td><td>query</td><td>Results: default 10, max 500. Example `10`</td></tr>
    <tr><td>`offset`</td><td>integer</td><td>query</td><td>Offset, max 9,499. Example `0`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.opensanctions.org/docs/api/search/) · Same job: [Consolidated Screening List (trade.gov)](https://docs.webrouter.net/data-apis/trade-gov.md#trade-gov-screening-search)

```python Python theme={null}
router.call_data_api("opensanctions.search", {'dataset': 'default', 'q': 'Vladimir Putin', 'schema': 'Person', 'countries': ['ru'], 'limit': 10, 'offset': 0})
```

```text MCP theme={null}
call_data_api(endpoint="opensanctions.search", params={"dataset": "default", "q": "Vladimir Putin", "schema": "Person", "countries": ["ru"], "limit": 10, "offset": 0})
```

### Get an entity

GET

`/entities/{entity_id}`

`opensanctions.entities.get`

One entity in full, with data from every source dataset and nested sanctions, identifiers, family and business relationships.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`entity_id` required</td><td>string</td><td>path</td><td>Entity id (e.g. a Wikidata id like Q7747 or an OpenSanctions id). Example `Q7747`</td></tr>

    <tr>
      <td>
        `nested`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Include adjacent entities inline (default true).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.opensanctions.org/docs/api/)

```python Python theme={null}
router.call_data_api("opensanctions.entities.get", {'entity_id': 'Q7747'})
```

```text MCP theme={null}
call_data_api(endpoint="opensanctions.entities.get", params={"entity_id": "Q7747"})
```

> [!NOTE]
>
> * A merged id redirects to its canonical entity.

### List an entity's related entities

GET

`/entities/{entity_id}/adjacent`

`opensanctions.entities.adjacent`

Passports, sanctions, associates and other adjacent entities of one entity, paged (beta).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`entity_id` required</td><td>string</td><td>path</td><td>Entity id. Example `Q7747`</td></tr>
    <tr><td>`limit`</td><td>integer</td><td>query</td><td>Default 10, max 500. Example `10`</td></tr>
    <tr><td>`offset`</td><td>integer</td><td>query</td><td>Offset, max 9,499. Example `0`</td></tr>
  </tbody>
</table>

[Vendor docs](https://api.opensanctions.org/openapi.json)

```python Python theme={null}
router.call_data_api("opensanctions.entities.adjacent", {'entity_id': 'Q7747', 'limit': 10, 'offset': 0})
```

```text MCP theme={null}
call_data_api(endpoint="opensanctions.entities.adjacent", params={"entity_id": "Q7747", "limit": 10, "offset": 0})
```

> [!NOTE]
>
> * Beta: the interface may change without announcement. Use it when entities.get would nest too many related records.

### List datasets

GET

`/catalog`

`opensanctions.catalog.get`

The service manifest: every indexed dataset and collection and how often each is loaded.

Input

No inputs.

[Vendor docs](https://api.opensanctions.org/openapi.json) · Same job: [Consolidated Screening List (trade.gov)](https://docs.webrouter.net/data-apis/trade-gov.md#trade-gov-screening-sources)

```python Python theme={null}
router.call_data_api("opensanctions.catalog.get")
```

```text MCP theme={null}
call_data_api(endpoint="opensanctions.catalog.get")
```

### List raw statements

GET

`/statements`

`opensanctions.statements.list`

Raw entity data as statements (the statement-based data model).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `dataset`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Dataset name.
      </td>
    </tr>

    <tr>
      <td>
        `entity_id`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Source entity id.
      </td>
    </tr>

    <tr><td>`canonical_id`</td><td>string</td><td>query</td><td>Canonical (merged) entity id. Example `Q7747`</td></tr>

    <tr>
      <td>
        `prop`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Property name, e.g. name.
      </td>
    </tr>

    <tr>
      <td>
        `schema`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Entity type.
      </td>
    </tr>

    <tr><td>`limit`</td><td>integer</td><td>query</td><td>Default 50, max 5000. Example `50`</td></tr>
    <tr><td>`offset`</td><td>integer</td><td>query</td><td>Offset, max 9,499. Example `0`</td></tr>
  </tbody>
</table>

[Vendor docs](https://api.opensanctions.org/openapi.json)

```python Python theme={null}
router.call_data_api("opensanctions.statements.list", {'canonical_id': 'Q7747', 'limit': 50, 'offset': 0})
```

```text MCP theme={null}
call_data_api(endpoint="opensanctions.statements.list", params={"canonical_id": "Q7747", "limit": 50, "offset": 0})
```

> [!NOTE]
>
> * Not charged, but a valid key is still required.


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