{
  "openapi": "3.0.1",
  "info": {
    "title": "AML Screening API - Sanctions, PEP, Adverse Media, Vessels",
    "description": "AML watchlist screening with the Castellum.AI API: batch screen people, companies, vessels and aircraft against sanctions, PEP, law enforcement, export control and adverse media lists, run freeform screens, pull sanctioned bank ID and crypto wallet reports and list sources. Bring your own key.",
    "version": "0.1",
    "x-build-id": "A7RWHxzp7rG9oXprW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~aml-watchlist-screening-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-aml-watchlist-screening-api",
        "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/nabeelbaghoor~aml-watchlist-screening-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-aml-watchlist-screening-api",
        "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/nabeelbaghoor~aml-watchlist-screening-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-aml-watchlist-screening-api",
        "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",
        "properties": {
          "mode": {
            "title": "What to run",
            "enum": [
              "screen",
              "freeform",
              "report",
              "listSources"
            ],
            "type": "string",
            "description": "Screen names batch screens people, companies, vessels and aircraft against the categories and list sources you pick, one row per hit. Freeform screening sends an unstructured description (name, birth date, place) that Castellum.AI parses before screening. Bank ID and crypto sanctions report lists sanctioned bank identifiers and crypto wallet addresses. List sources returns every list source your credentials can screen against, with exact names to use in the list source input.",
            "default": "screen"
          },
          "names": {
            "title": "Names",
            "type": "array",
            "description": "Screen names only. One person, company, vessel or aircraft name per line, up to 1,000 a run. Each name is one billable query on your Castellum.AI contract.",
            "items": {
              "type": "string"
            }
          },
          "freeformTexts": {
            "title": "Freeform descriptions",
            "type": "array",
            "description": "Freeform screening only. One unstructured description per line, up to 100 a run, such as John Smith born January 15 1980 living in New York.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Screen names and Freeform screening. The list source categories to screen against. At least one category or one list source is required. Adverse media hits have the entity type Media.",
            "items": {
              "type": "string",
              "enum": [
                "Sanctions",
                "PEPs",
                "Law Enforcement",
                "Export Control",
                "Delisted",
                "Contract Debarment",
                "Elevated Risk",
                "Regulatory Enforcement",
                "High-Risk Ownership",
                "Adverse Media"
              ],
              "enumTitles": [
                "Sanctions",
                "PEPs (politically exposed persons)",
                "Law enforcement",
                "Export control",
                "Delisted",
                "Contract debarment",
                "Elevated risk",
                "Regulatory enforcement",
                "High-risk ownership",
                "Adverse media"
              ]
            },
            "default": [
              "Sanctions",
              "PEPs"
            ]
          },
          "listSourceNames": {
            "title": "List sources",
            "type": "array",
            "description": "Screen names, Freeform screening and the report. Optional exact list source names, one per line, such as US OFAC SDN. Run the List sources mode to see the names your credentials cover. Castellum.AI recommends categories or list sources over single lists, because lists change often.",
            "items": {
              "type": "string"
            }
          },
          "entityTypes": {
            "title": "Entity types",
            "type": "array",
            "description": "Screen names only. Leave empty to match every type.",
            "items": {
              "type": "string",
              "enum": [
                "Individual",
                "Entity",
                "Vessel",
                "Aircraft",
                "Location",
                "Media",
                "Security",
                "Shipment"
              ],
              "enumTitles": [
                "Individual (person)",
                "Entity (company or organisation)",
                "Vessel",
                "Aircraft",
                "Location",
                "Media (adverse media article)",
                "Security (financial instrument)",
                "Shipment"
              ]
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Screen names only. Optional ISO 3166-1 alpha-2 country codes, one per line, such as RU or IR.",
            "items": {
              "type": "string"
            }
          },
          "minScore": {
            "title": "Minimum match score",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "Screen names and Freeform screening. Hits scoring below this (0 to 1) are not returned. Castellum.AI's own examples use 0.8 to 0.85.",
            "default": 0.85
          },
          "excludeWeakAkas": {
            "title": "Exclude weak aliases",
            "type": "boolean",
            "description": "Screen names only. Leaves out matches on aliases the source marks as weak, which cuts false positives.",
            "default": false
          },
          "hitsPerName": {
            "title": "Hits per name",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Screen names only. The most hits returned for each name (page size, 1 to 200).",
            "default": 10
          },
          "asOf": {
            "title": "Updated since",
            "type": "string",
            "description": "Screen names and the report. Optional YYYY-MM-DD or ISO date-time. Runs a delta screen: only list entries updated on or after this date are returned."
          },
          "flattenCatchall": {
            "title": "Flatten extra list data",
            "type": "boolean",
            "description": "Screen names only. Asks Castellum.AI to return the catch-all source data on each list entry in a flat format.",
            "default": false
          },
          "reportTypes": {
            "title": "Report types",
            "type": "array",
            "description": "Bank ID and crypto sanctions report only. Narrow it with list sources and the updated since date.",
            "items": {
              "type": "string",
              "enum": [
                "bank_ids",
                "crypto_sanctions",
                "enriched_bank_ids"
              ],
              "enumTitles": [
                "Sanctioned bank IDs",
                "Crypto sanctions (wallet addresses)",
                "Enriched bank IDs"
              ]
            },
            "default": [
              "crypto_sanctions"
            ]
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Only this many names or descriptions are sent to Castellum.AI, so no query is spent on rows that would be cut.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. A rate limit answer is waited out and retried; a used up allowance ends the run.",
            "default": 60
          },
          "clientId": {
            "title": "Client ID",
            "type": "string",
            "description": "Your own Castellum.AI production API client id, issued by the Castellum.AI sales team. Stored as a secret. You can instead set the DATA_API_CLIENT_ID environment secret."
          },
          "apiKey": {
            "title": "Client secret",
            "type": "string",
            "description": "The client secret that goes with the client id. The pair is exchanged at auth.castellum.ai for an access token, reused for the whole run. You can paste a ready access token here instead and leave the client id empty. Stored as a secret, sent only to Castellum.AI, never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}