{
  "openapi": "3.0.1",
  "info": {
    "title": "RUI IVASS Insurance Intermediaries",
    "description": "Search, verify, export and monitor the RUI IVASS register of Italian insurance intermediaries. Batch-check RUI numbers, build full profiles, export relationships, mandates, offices and websites, and detect registry changes from official IVASS open data.",
    "version": "0.0",
    "x-build-id": "XnNAs2eq8uUJpHVE8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/beyondforge~rui-ivass-insurance-intermediaries/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-beyondforge-rui-ivass-insurance-intermediaries",
        "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/beyondforge~rui-ivass-insurance-intermediaries/runs": {
      "post": {
        "operationId": "runs-sync-beyondforge-rui-ivass-insurance-intermediaries",
        "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/beyondforge~rui-ivass-insurance-intermediaries/run-sync": {
      "post": {
        "operationId": "run-sync-beyondforge-rui-ivass-insurance-intermediaries",
        "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": "Operation",
            "enum": [
              "search",
              "verify",
              "full_profile",
              "relationships",
              "changes"
            ],
            "type": "string",
            "description": "Choose what this run should do.",
            "default": "search"
          },
          "nameQuery": {
            "title": "Name or company name",
            "type": "string",
            "description": "Search mode only. Match a person's name or a company name. Leave empty to search only by filters."
          },
          "sections": {
            "title": "RUI sections",
            "uniqueItems": true,
            "type": "array",
            "description": "Search mode only. Limit results to one or more RUI sections. Leave empty for all sections and the EU Annex.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "EU"
              ],
              "enumTitles": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "EU Annex"
              ]
            }
          },
          "entityType": {
            "title": "Entity type",
            "enum": [
              "all",
              "person",
              "company"
            ],
            "type": "string",
            "description": "Search mode only. Filter persons or companies.",
            "default": "all"
          },
          "operationalStatus": {
            "title": "Operational status",
            "enum": [
              "all",
              "operational",
              "inoperative"
            ],
            "type": "string",
            "description": "Search mode only. Filter by the operational status published in the current IVASS data.",
            "default": "all"
          },
          "regions": {
            "title": "Regions",
            "uniqueItems": true,
            "type": "array",
            "description": "Search mode only. Filter using available office/location data. Records without compatible geographic data will not be inferred.",
            "items": {
              "type": "string",
              "enum": [
                "Abruzzo",
                "Basilicata",
                "Calabria",
                "Campania",
                "Emilia-Romagna",
                "Friuli-Venezia Giulia",
                "Lazio",
                "Liguria",
                "Lombardia",
                "Marche",
                "Molise",
                "Piemonte",
                "Puglia",
                "Sardegna",
                "Sicilia",
                "Toscana",
                "Trentino-Alto Adige",
                "Umbria",
                "Valle d'Aosta",
                "Veneto"
              ]
            }
          },
          "provinces": {
            "title": "Provinces",
            "uniqueItems": true,
            "type": "array",
            "description": "Search mode only. Enter province names or abbreviations. Geography is applied only where the source provides compatible office/location data.",
            "items": {
              "type": "string"
            }
          },
          "insuranceCompanies": {
            "title": "Insurance companies / mandates",
            "uniqueItems": true,
            "type": "array",
            "description": "Search mode only. Return intermediaries linked to any of these insurance-company names or codes in the mandates dataset.",
            "items": {
              "type": "string"
            }
          },
          "hasWebsite": {
            "title": "Website in IVASS data",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Search mode only. Filter by whether at least one website or URL is present in the IVASS website dataset.",
            "default": "any"
          },
          "registrationDateFrom": {
            "title": "Registered from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Search mode only. Earliest registration date, inclusive."
          },
          "registrationDateTo": {
            "title": "Registered to",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Search mode only. Latest registration date, inclusive."
          },
          "activityRegimes": {
            "title": "EU activity regimes",
            "uniqueItems": true,
            "type": "array",
            "description": "Search mode only. Optional filter for EU Annex intermediaries.",
            "items": {
              "type": "string",
              "enum": [
                "lps",
                "establishment",
                "lps_and_establishment"
              ],
              "enumTitles": [
                "Freedom to provide services (LPS)",
                "Establishment",
                "LPS and establishment"
              ]
            }
          },
          "verificationType": {
            "title": "Verification type",
            "enum": [
              "rui_number",
              "name",
              "domain"
            ],
            "type": "string",
            "description": "Verify mode only. Choose what the supplied values represent.",
            "default": "rui_number"
          },
          "verificationValues": {
            "title": "Values to verify",
            "maxItems": 10000,
            "uniqueItems": true,
            "type": "array",
            "description": "Verify mode only. Enter RUI numbers, names, or domains according to Verification type.",
            "items": {
              "type": "string"
            }
          },
          "nameMatchMode": {
            "title": "Name matching",
            "enum": [
              "exact_only",
              "exact_then_partial"
            ],
            "type": "string",
            "description": "Verify mode with names only. Exact then partial returns exact matches first and partial candidates when no unique exact match exists.",
            "default": "exact_then_partial"
          },
          "profileRuiNumbers": {
            "title": "RUI numbers",
            "maxItems": 5000,
            "uniqueItems": true,
            "type": "array",
            "description": "Full profile mode only. Enter one or more RUI numbers for which complete joined profiles should be built.",
            "items": {
              "type": "string"
            }
          },
          "includeCollaboratorsInProfile": {
            "title": "Embed collaborators in profile",
            "type": "boolean",
            "description": "Full profile mode only. If enabled, include complete collaborator relationships inside each profile when technically safe. The complete relationships export remains available separately.",
            "default": false
          },
          "relationshipTypes": {
            "title": "Relationship types",
            "uniqueItems": true,
            "type": "array",
            "description": "Relationships mode only. Leave empty to export all supported relationship types.",
            "items": {
              "type": "string",
              "enum": [
                "collaborations",
                "accessory_intermediaries",
                "offices",
                "websites",
                "mandates",
                "corporate_roles",
                "section_d_responsibles",
                "non_standard_product_agents"
              ],
              "enumTitles": [
                "Collaborations",
                "Accessory intermediaries",
                "Offices",
                "Websites",
                "Mandates",
                "Corporate roles",
                "Section D responsibles",
                "Non-standard product agents"
              ]
            }
          },
          "relationshipRuiNumbers": {
            "title": "Limit to RUI numbers",
            "maxItems": 10000,
            "uniqueItems": true,
            "type": "array",
            "description": "Relationships mode only. Optional list of principal RUI numbers. Leave empty to export relationships across the registry.",
            "items": {
              "type": "string"
            }
          },
          "collaborationLevels": {
            "title": "Collaboration levels",
            "uniqueItems": true,
            "type": "array",
            "description": "Relationships mode only. Filter collaboration records by level. Leave empty for both levels.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2"
              ],
              "enumTitles": [
                "Level 1",
                "Level 2"
              ]
            }
          },
          "includeLinkedIntermediaryDetails": {
            "title": "Enrich linked RUI numbers",
            "type": "boolean",
            "description": "Relationships mode only. Add available intermediary identity and status details to linked RUI numbers.",
            "default": true
          },
          "changeTypes": {
            "title": "Change types",
            "uniqueItems": true,
            "type": "array",
            "description": "Changes mode only. Leave empty to return all detected change types.",
            "items": {
              "type": "string",
              "enum": [
                "INTERMEDIARY_ADDED",
                "INTERMEDIARY_REMOVED",
                "STATUS_CHANGED",
                "WEBSITE_ADDED",
                "WEBSITE_REMOVED",
                "OFFICE_ADDED",
                "OFFICE_REMOVED",
                "MANDATE_ADDED",
                "MANDATE_REMOVED",
                "COLLABORATOR_ADDED",
                "COLLABORATOR_REMOVED",
                "ROLE_ADDED",
                "ROLE_REMOVED",
                "RESPONSIBLE_D_CHANGED"
              ],
              "enumTitles": [
                "Intermediary added",
                "Intermediary removed",
                "Operational status changed",
                "Website added",
                "Website removed",
                "Office added",
                "Office removed",
                "Mandate added",
                "Mandate removed",
                "Collaborator added",
                "Collaborator removed",
                "Corporate role added",
                "Corporate role removed",
                "Section D responsible changed"
              ]
            }
          },
          "changeRuiNumbers": {
            "title": "Limit changes to RUI numbers",
            "maxItems": 10000,
            "uniqueItems": true,
            "type": "array",
            "description": "Changes mode only. Optional list of RUI numbers to filter emitted change records.",
            "items": {
              "type": "string"
            }
          },
          "historyNamespace": {
            "title": "History namespace",
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "type": "string",
            "description": "Changes mode only. Advanced: use a separate name to maintain an independent monitoring baseline. Keep the default unless you need multiple histories.",
            "default": "default"
          },
          "updateBaseline": {
            "title": "Update baseline after comparison",
            "type": "boolean",
            "description": "Changes mode only. Save the current valid snapshot as the new baseline after comparison.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum Dataset items for Search, Relationships, or Changes. Use 0 for all matching results. Does not truncate source parsing or validation.",
            "default": 1000
          },
          "includeDataQuality": {
            "title": "Include data-quality metadata",
            "type": "boolean",
            "description": "Include source warnings such as duplicate RUI numbers, recovered malformed rows, suspicious dates, orphan references, or ambiguous matches.",
            "default": true
          },
          "includeSourceMetadata": {
            "title": "Include source metadata",
            "type": "boolean",
            "description": "Include IVASS source, snapshot date, and retrieval timestamp in output records.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}