{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Payment Institution & EMI Licence Monitor",
    "description": "Check EU/EEA payment institutions, EMIs, AISPs and PISPs in the EBA PSD2 Register. Save a baseline, then see what changed in authorisation, payment services and passporting on later runs.",
    "version": "0.1",
    "x-build-id": "f2uuQJego9DRYYVem"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~eba-psd2-payment-institution-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-eba-psd2-payment-institution-monitor",
        "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/automa-flow~eba-psd2-payment-institution-monitor/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-eba-psd2-payment-institution-monitor",
        "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/automa-flow~eba-psd2-payment-institution-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-eba-psd2-payment-institution-monitor",
        "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": [
          "institutions"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "watchlist",
              "lookup"
            ],
            "type": "string",
            "description": "watchlist compares each institution with last successful state. lookup returns the current snapshot only and does not write monitor state.",
            "default": "watchlist"
          },
          "monitorKey": {
            "title": "Monitor key",
            "pattern": "^[A-Za-z0-9_-]{1,80}$",
            "minLength": 1,
            "maxLength": 80,
            "type": "string",
            "description": "One key per watchlist. The same key reuses last verified state across scheduled runs. lookup ignores stored state. This is a namespace, not a secret.",
            "default": "default"
          },
          "institutions": {
            "title": "Institutions",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Up to 500 institutions. Resolve in this order: official EBA registerId (EntityCode), exact nationalId, then exact name plus ISO country. Duplicate identifiers are evaluated once. Ambiguous names are returned, not guessed. Passport-heavy EMIs can fill the 8 MiB state cap well before 500 ids — split those watchlists.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "registerId": {
                  "title": "EBA register id",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Stable EBA EntityCode such as IE_CBI!C187865."
                },
                "nationalId": {
                  "title": "National registration id",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Exact national identification number from the EBA register. If it matches more than one institution, the Actor returns AMBIGUOUS_TARGET."
                },
                "name": {
                  "title": "Institution name",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Exact EBA institution name. Requires country. Not used when registerId is set."
                },
                "country": {
                  "title": "Home country",
                  "type": "string",
                  "editor": "textfield",
                  "description": "ISO 3166-1 alpha-2 home country. Required with name. Example: IE."
                }
              }
            }
          },
          "includeServices": {
            "title": "Include payment and e-money services",
            "type": "boolean",
            "description": "Official PSD2/EMD2 service codes from the EBA dump.",
            "default": true
          },
          "includePassporting": {
            "title": "Include passporting",
            "type": "boolean",
            "description": "Host-country freedom-to-provide-services rows from the register dump. Branch establishment is included when includeBranches is true.",
            "default": true
          },
          "includeAgents": {
            "title": "Include agents",
            "type": "boolean",
            "description": "Attach agent EntityCodes, host countries and status. Names, addresses and national identifiers of agents are omitted. Leave off unless you need agent churn — large agent lists inflate monitor state.",
            "default": false
          },
          "includeBranches": {
            "title": "Include branches",
            "type": "boolean",
            "description": "Attach EEA branch EntityCodes, host countries and status.",
            "default": true
          },
          "changesOnly": {
            "title": "Changes only",
            "type": "boolean",
            "description": "When true, later watchlist runs emit CHANGE rows and diagnostics only. Unchanged institutions stay in CHECKS with an empty Dataset. The first run still emits BASELINE. lookup always emits snapshots. The example keeps it off so every run shows the current record.",
            "default": true
          },
          "baselineMode": {
            "title": "Baseline mode",
            "enum": [
              "emitSnapshot",
              "storeOnly"
            ],
            "type": "string",
            "description": "emitSnapshot returns each institution's first verified observation, including the Console prefill. storeOnly saves that baseline without Dataset rows — do not use it for the Store default run.",
            "default": "emitSnapshot"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}