{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Compliance & KYB Pack — BORME + EU/UN/UK Sanctions",
    "description": "Automated Spanish KYB & compliance pack combining BORME company registry acts, EU/UN/UK financial sanctions screening and optional OEPM trademark conflict checks. Screen your own company list or monitor daily BORME filings. $1 per 1,000 compliance records (+ child events).",
    "version": "0.1",
    "x-build-id": "cDGnBdStJu22dcPzK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icarodata~spain-compliance-kyb-pack/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icarodata-spain-compliance-kyb-pack",
        "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/icarodata~spain-compliance-kyb-pack/runs": {
      "post": {
        "operationId": "runs-sync-icarodata-spain-compliance-kyb-pack",
        "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/icarodata~spain-compliance-kyb-pack/run-sync": {
      "post": {
        "operationId": "run-sync-icarodata-spain-compliance-kyb-pack",
        "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": "Compliance mode",
            "enum": [
              "borme_sanctions",
              "screen_names"
            ],
            "type": "string",
            "description": "<b>borme_sanctions</b>: pull Spanish corporate acts from BORME and automatically screen every unique company name (plus CIF if present) against EU/UN/UK sanctions. <b>screen_names</b>: screen your own company/entity list against EU/UN/UK sanctions and optionally OEPM trademark filings.",
            "default": "borme_sanctions"
          },
          "companyNames": {
            "title": "Company / entity names (screen_names mode)",
            "type": "array",
            "description": "Company or entity names to check in 'screen_names' mode.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "provinces": {
            "title": "BORME provinces (borme_sanctions mode)",
            "type": "array",
            "description": "Optional INE 2-digit province codes for BORME acts. Leave empty for all of Spain.",
            "items": {
              "type": "string",
              "enum": [
                "01",
                "02",
                "03",
                "04",
                "05",
                "06",
                "07",
                "08",
                "09",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "32",
                "33",
                "34",
                "35",
                "36",
                "37",
                "38",
                "39",
                "40",
                "41",
                "42",
                "43",
                "44",
                "45",
                "46",
                "47",
                "48",
                "49",
                "50",
                "51",
                "52"
              ],
              "enumTitles": [
                "Araba/Álava (01)",
                "Albacete (02)",
                "Alicante/Alacant (03)",
                "Almería (04)",
                "Ávila (05)",
                "Badajoz (06)",
                "Illes Balears (07)",
                "Barcelona (08)",
                "Burgos (09)",
                "Cáceres (10)",
                "Cádiz (11)",
                "Castellón/Castelló (12)",
                "Ciudad Real (13)",
                "Córdoba (14)",
                "A Coruña (15)",
                "Cuenca (16)",
                "Girona (17)",
                "Granada (18)",
                "Guadalajara (19)",
                "Gipuzkoa (20)",
                "Huelva (21)",
                "Huesca (22)",
                "Jaén (23)",
                "León (24)",
                "Lleida (25)",
                "La Rioja (26)",
                "Lugo (27)",
                "Madrid (28)",
                "Málaga (29)",
                "Murcia (30)",
                "Navarra (31)",
                "Ourense (32)",
                "Asturias (33)",
                "Palencia (34)",
                "Las Palmas (35)",
                "Pontevedra (36)",
                "Salamanca (37)",
                "Santa Cruz de Tenerife (38)",
                "Cantabria (39)",
                "Segovia (40)",
                "Sevilla (41)",
                "Soria (42)",
                "Tarragona (43)",
                "Teruel (44)",
                "Toledo (45)",
                "Valencia/València (46)",
                "Valladolid (47)",
                "Bizkaia (48)",
                "Zamora (49)",
                "Zaragoza (50)",
                "Ceuta (51)",
                "Melilla (52)"
              ]
            },
            "default": []
          },
          "actTypes": {
            "title": "BORME act types",
            "type": "array",
            "description": "Corporate acts to pull from BORME.",
            "items": {
              "type": "string",
              "enum": [
                "constitution",
                "dissolution",
                "bankruptcy",
                "capital_change",
                "appointment"
              ],
              "enumTitles": [
                "Constitutions",
                "Dissolutions",
                "Bankruptcy / concurso",
                "Capital changes",
                "Appointments (names redacted)"
              ]
            },
            "default": [
              "constitution",
              "dissolution",
              "bankruptcy",
              "capital_change"
            ]
          },
          "keyword": {
            "title": "BORME keyword filter",
            "type": "string",
            "description": "Optional case-insensitive keyword on BORME company name or redacted act text.",
            "default": ""
          },
          "maxItems": {
            "title": "Max BORME acts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum BORME acts to retrieve and screen (1 to 1,000). Keep low (e.g. 2-10) for test runs.",
            "default": 10
          },
          "onlyNewSinceLastRun": {
            "title": "Only new BORME acts since last run",
            "type": "boolean",
            "description": "Passed to borme-feed and tracked in 'spain-compliance-kyb-pack-state' so scheduled runs only screen new companies.",
            "default": false
          },
          "sanctionsLists": {
            "title": "Sanctions lists",
            "type": "array",
            "description": "Sanctions lists to screen against via icarodata/eu-sanctions-screening.",
            "items": {
              "type": "string",
              "enum": [
                "EU",
                "UN",
                "UK"
              ],
              "enumTitles": [
                "EU Consolidated Financial Sanctions List",
                "UN Security Council Consolidated List",
                "UK Sanctions List (FCDO)"
              ]
            },
            "default": [
              "EU",
              "UN",
              "UK"
            ]
          },
          "threshold": {
            "title": "Sanctions match threshold (50-100)",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum fuzzy score to report a potential sanctions match.",
            "default": 85
          },
          "onlyMatches": {
            "title": "Only output companies with sanctions/trademark hits",
            "type": "boolean",
            "description": "If true, clean ('clear') companies are omitted from the output dataset (child screening events are still billed).",
            "default": false
          },
          "includeTrademarkWatch": {
            "title": "Also check OEPM trademark conflicts (optional)",
            "type": "boolean",
            "description": "Off by default. When on, checks the screened company names against recent OEPM BOPI trademark filings via icarodata/spain-trademark-watch ($0.05 per conflict found).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}