{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenSanctions Sanctions, PEP & Watchlist Data Extractor",
    "description": "Stream sanctions, PEP, crime and debarment entities from OpenSanctions' free bulk datasets. List every dataset (OFAC, EU, UN, INTERPOL, PEPs, 400+ more) or stream one dataset's entities with names, countries, topics and source links.",
    "version": "1.0",
    "x-build-id": "TvCM1eTMxZ9H1YeLy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~opensanctions-sanctions-pep-and-watchlist-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-opensanctions-sanctions-pep-and-watchlist-data",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nimbryxo-studio~opensanctions-sanctions-pep-and-watchlist-data/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-opensanctions-sanctions-pep-and-watchlist-data",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nimbryxo-studio~opensanctions-sanctions-pep-and-watchlist-data/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-opensanctions-sanctions-pep-and-watchlist-data",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "getDatasetEntities",
              "listDatasets"
            ],
            "type": "string",
            "description": "What to scrape: stream the entities of one dataset, or list all available datasets.",
            "default": "getDatasetEntities"
          },
          "dataset": {
            "title": "Dataset",
            "enum": [
              "us_ofac_sdn",
              "us_ofac_cons",
              "us_bis_denied",
              "us_trade_csl",
              "eu_fsf",
              "un_sc_sanctions",
              "ch_seco_sanctions",
              "ca_dfatd_sema_sanctions",
              "au_dfat_sanctions",
              "fr_tresor_gels_avoir",
              "jp_mof_sanctions",
              "interpol_red_notices",
              "ru_acf_bribetakers",
              "everypolitician",
              "wd_peps",
              "sanctions",
              "us_sanctions",
              "eu_sanctions",
              "peps",
              "crime",
              "debarment",
              "wanted",
              "default"
            ],
            "type": "string",
            "description": "Which dataset to stream entities from (used in `getDatasetEntities` mode). Pick a well-known sanctions/PEP list or a consolidated collection. Run `listDatasets` to discover all 400+ dataset names.",
            "default": "us_ofac_sdn"
          },
          "datasetName": {
            "title": "Dataset name (advanced override)",
            "type": "string",
            "description": "Optional: type any dataset name from the index to override the dropdown above (e.g. \"gb_hmt_sanctions\", \"il_mod_terror\"). Also accepts an OpenSanctions dataset page URL. Leave empty to use the dropdown. Run `listDatasets` to discover valid names."
          },
          "schema": {
            "title": "Entity type (schema)",
            "enum": [
              "Any",
              "Person",
              "Organization",
              "Company",
              "LegalEntity",
              "Vessel",
              "Address"
            ],
            "type": "string",
            "description": "Filter entities by FollowTheMoney type. `Organization` includes companies and public bodies; `Legal entity` includes persons and organizations. Applies to `getDatasetEntities` mode.",
            "default": "Any"
          },
          "topic": {
            "title": "Topic",
            "enum": [
              "any",
              "sanction",
              "sanction.linked",
              "sanction.control",
              "role.pep",
              "role.rca",
              "role.oligarch",
              "crime",
              "crime.fin",
              "crime.fraud",
              "crime.terror",
              "crime.war",
              "crime.traffick",
              "debarment",
              "export.control",
              "poi",
              "wanted"
            ],
            "type": "string",
            "description": "Filter entities by OpenSanctions topic. Topics are hierarchical: choosing `crime` also matches `crime.fin`, `crime.fraud`, etc. Applies to `getDatasetEntities` mode.",
            "default": "any"
          },
          "datasetType": {
            "title": "Dataset type filter",
            "enum": [
              "all",
              "source",
              "collection",
              "external"
            ],
            "type": "string",
            "description": "When listing datasets (`listDatasets` mode), restrict to sources, collections, or external datasets.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of records to return (entities or datasets).",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}