# OpenSanctions API reference

> OpenSanctions publishes a database of sanctioned people and companies, politically exposed persons and related entities, merged from many source lists. Its API screens a name (with optional birth date, nationality and so on) against that data and returns scored candidates, and returns the full…

Source: https://osinttools.io/apis/opensanctions/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/opensanctions/

- Base URL: https://api.opensanctions.org
- Authentication: API key in the `Authorization` header, after `ApiKey`. Get a key: https://www.opensanctions.org/ The key is sent after the word ApiKey in the Authorization header.
- Free tier: a free trial only
- Pricing: Credits
- Rate limits: Not stated in the docs
- Vendor docs: https://www.opensanctions.org/docs/api/
- OpenAPI spec: https://api.opensanctions.org/openapi.json

## Overview

OpenSanctions publishes a database of sanctioned people and companies, politically exposed persons and related entities, merged from many source lists. Its API screens a name (with optional birth date, nationality and so on) against that data and returns scored candidates, and returns the full record of an entity by ID.

The `/match` endpoint takes query-by-example entities: a FollowTheMoney `schema` such as `Person` or `Company` and a `properties` object whose values are always lists. Each result carries a score from 0 to 1; by default 0.7 or above counts as a match. The score measures how likely the result is the entity queried, not a risk score. `/entities/{id}` returns the record with related entities nested.

The key goes in the `Authorization` header as `ApiKey <key>`. The API is paid from prepaid credit bundles; business-email sign-ups start with a free trial, and free keys are available for journalism, civil-society advocacy and academic research. The API also has a `/search` endpoint, which is not described here because its parameters are not documented on the pages read.

## Screening

### Screen one or more people or companies against a dataset and get scored candidates.

`POST /match/{dataset}`

- Takes: Name
- Footprint: passive (the target is not contacted)

The dataset in the path sets which sources are queried; default covers all data. Filters in one parameter are combined with OR, across parameters with AND. Property values must be lists of strings even for a single value; country names are normalised to codes. The response normalises the input and may add fields you did not provide, so compare query with what you sent.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `dataset` | path | string | yes | Dataset scope, such as default, us_ofac_sdn or eu_sanctions Example: default |
| `topics` | query | string | no | Only candidates with at least one listed topic; repeatable Example: sanction |
| `include_dataset` | query | string | no | Only candidates in at least one listed dataset; repeatable Example: us_ofac_sdn |
| `exclude_dataset` | query | string | no | Exclude candidates that appear only in the listed datasets; repeatable Example: eu_sanctions |
| `algorithm` | query | string | no | Matching algorithm; the docs suggest pinning it Example: logic-v2 |
| `threshold` | query | number | no | Minimum score to count as a match Example: 0.8 |
| `limit` | query | integer | no | Maximum results per query; higher values make queries slower Example: 5 |

Response fields:

- `responses.q.status` (integer): HTTP status of that query
- `responses.q.total` (integer): Total candidates evaluated
- `responses.q.query` (object): How the API parsed the input
- `responses.q.results[].id` (string): Entity ID, usable with /entities/{id}
- `responses.q.results[].caption` (string): Display name
- `responses.q.results[].schema` (string): Entity type
- `responses.q.results[].properties` (object): Aggregated values from all source datasets; each key maps to a list
- `responses.q.results[].datasets[]` (string): Sources mentioning the entity
- `responses.q.results[].target` (boolean): True if the entity has risk topics
- `responses.q.results[].score` (number): 0 to 1 confidence that this is the queried entity; not a risk score
- `responses.q.results[].match` (boolean): True when the score meets the threshold
- `responses.q.results[].explanations` (object): Per-feature breakdown of the score
- `limit` (integer): Maximum results per query

```bash
curl -X POST 'https://api.opensanctions.org/match/default' \
  -H 'Authorization: ApiKey YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"queries":{"q":{"schema":"Person","properties":{"name":["Jane Example"],"birthDate":["1970"],"nationality":["Ruritania"]}}}}'
```

Example response (200):

```json
{
  "responses": {
    "q": {
      "status": 200,
      "total": 1,
      "query": {
        "schema": "Person",
        "properties": {
          "name": [
            "Jane Example"
          ]
        }
      },
      "results": [
        {
          "id": "NK-example0000000000000000",
          "caption": "Jane Example",
          "schema": "Person",
          "properties": {
            "name": [
              "Jane Example"
            ],
            "birthDate": [
              "1970-01-01"
            ],
            "country": [
              "xx"
            ]
          },
          "datasets": [
            "example_sanctions"
          ],
          "referents": [
            "example-0001"
          ],
          "target": true,
          "first_seen": "2024-01-01T00:00:00",
          "last_seen": "2026-01-01T00:00:00",
          "score": 0.92,
          "match": true
        }
      ]
    }
  },
  "limit": 5
}
```

## Entities

### Full record of one entity, with related entities nested.

`GET /entities/{id}`

- Footprint: passive (the target is not contacted)

An ID that appears in the referents of a merged entity returns a 308 redirect to the new canonical ID for six months; after that the API returns 404. Check stored IDs every three months and follow the redirect.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Entity ID Example: NK-example0000000000000000 |
| `nested` | query | boolean | no | Set false for flat properties holding entity IDs instead of nested objects Example: false |

Response fields:

- `id` (string): Canonical entity ID
- `schema` (string): Entity type, such as Person or Company
- `properties` (object): Entity attributes; related entities such as ownershipOwner and sanctions appear here
- `datasets[]` (string): Sources that mention the entity
- `referents[]` (string): Source-specific and old IDs that map to this ID
- `target` (boolean): Whether the entity is a sanctioned target
- `first_seen` (string): First appearance in the data
- `last_seen` (string): Most recent appearance in the data

```bash
curl 'https://api.opensanctions.org/entities/NK-example0000000000000000' \
  -H 'Authorization: ApiKey YOUR_API_KEY'
```

Example response (200):

```json
{
  "id": "NK-example0000000000000000",
  "schema": "Person",
  "properties": {
    "name": [
      "Jane Example"
    ],
    "birthDate": [
      "1970-01-01"
    ],
    "country": [
      "xx"
    ],
    "sanctions": [
      {
        "id": "example-sanction-0001",
        "schema": "Sanction",
        "properties": {
          "authority": [
            "Example Authority"
          ],
          "program": [
            "EXAMPLE-PROGRAM"
          ],
          "country": [
            "xx"
          ]
        }
      }
    ]
  },
  "datasets": [
    "example_sanctions"
  ],
  "referents": [
    "example-0001"
  ],
  "target": true,
  "first_seen": "2024-01-01T00:00:00",
  "last_seen": "2026-01-01T00:00:00"
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
