{
  "openapi": "3.0.1",
  "info": {
    "title": "Advertencias CNMV: chiringuitos financieros y reguladores",
    "description": "Extrae las advertencias de la CNMV (Spain CNMV warnings): chiringuitos financieros, entidades no autorizadas, clones y boiler rooms advertidos por la CNMV y por reguladores extranjeros. Nombres, webs, fecha, regulador y PDF oficiales. Modo incremental para KYC/AML y compliance.",
    "version": "0.3",
    "x-build-id": "h3rONUZaiZTHkgdtN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crispish_guava~cnmv-advertencias/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crispish_guava-cnmv-advertencias",
        "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/crispish_guava~cnmv-advertencias/runs": {
      "post": {
        "operationId": "runs-sync-crispish_guava-cnmv-advertencias",
        "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/crispish_guava~cnmv-advertencias/run-sync": {
      "post": {
        "operationId": "run-sync-crispish_guava-cnmv-advertencias",
        "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": {
          "lists": {
            "title": "Listas de advertencias",
            "type": "array",
            "description": "cnmv-no-autorizadas: entidades no autorizadas advertidas por la CNMV («chiringuitos», ~3.700). reguladores-no-autorizadas: entidades no autorizadas advertidas por reguladores extranjeros (~5.300). reguladores-otras: otras advertencias de reguladores extranjeros (~200). Vacío = las tres.",
            "items": {
              "type": "string",
              "enum": [
                "cnmv-no-autorizadas",
                "reguladores-no-autorizadas",
                "reguladores-otras"
              ],
              "enumTitles": [
                "CNMV: entidades no autorizadas (chiringuitos)",
                "Reguladores extranjeros: entidades no autorizadas",
                "Reguladores extranjeros: otras advertencias"
              ]
            },
            "default": [
              "cnmv-no-autorizadas",
              "reguladores-no-autorizadas",
              "reguladores-otras"
            ]
          },
          "nombre": {
            "title": "Denominación (nombre o web)",
            "type": "string",
            "description": "Texto a buscar en la denominación de la entidad advertida, p.ej. «FREIXO» o un dominio. Lo aplica el buscador oficial de la CNMV."
          },
          "fechaDesde": {
            "title": "Fecha de advertencia desde",
            "type": "string",
            "description": "aaaa-mm-dd. Si se deja vacío pero se indica «hasta», desde el principio del registro."
          },
          "fechaHasta": {
            "title": "Fecha de advertencia hasta",
            "type": "string",
            "description": "aaaa-mm-dd. Si se deja vacío, hasta hoy."
          },
          "maxItems": {
            "title": "Máximo de advertencias",
            "minimum": 0,
            "type": "integer",
            "description": "Número máximo de advertencias a guardar (en total, sumando listas; primero las más recientes). Por defecto 500 (~50 páginas, en torno a 1 minuto). 0 = sin límite: el registro completo son ~9.200 advertencias (~920 páginas, unos 15-20 minutos a 1 petición/s) y cada advertencia se cobra; no lo lances entero por accidente. El ejemplo de la Store (prefill) es 5, para que la prueba automática de Apify acabe en segundos; el valor por defecto sigue siendo 500.",
            "default": 500
          },
          "incremental": {
            "title": "Modo incremental (solo nuevas)",
            "type": "boolean",
            "description": "Devuelve solo advertencias no vistas en ejecuciones anteriores con la misma clave de estado. Tras la primera ejecución revisa desde la última fecha conocida menos la ventana de revisión. Ideal para una ejecución programada diaria o semanal.",
            "default": false
          },
          "incrementalStateKey": {
            "title": "Clave de estado incremental",
            "type": "string",
            "description": "Usa claves distintas para seguimientos distintos (p.ej. «chiringuitos», «bafin»).",
            "default": "default"
          },
          "incrementalLookbackDays": {
            "title": "Ventana de revisión (días)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Días hacia atrás desde la última fecha conocida que se vuelven a revisar en modo incremental (por si la CNMV incorpora advertencias con fecha anterior).",
            "default": 30
          },
          "redactPersonalData": {
            "title": "Enmascarar datos personales",
            "type": "boolean",
            "description": "Sustituye por [DATO OMITIDO] patrones de NIF/DNI, NIE, email, teléfono e IBAN si apareciesen en observaciones o entidades. Los nombres y webs de las entidades advertidas se conservan siempre (son el contenido oficial). Desactívalo si necesitas la reproducción literal.",
            "default": true
          },
          "requestDelaySecs": {
            "title": "Retardo entre peticiones (s)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Tiempo mínimo entre peticiones a www.cnmv.es. Mínimo 1 s (impuesto en el código).",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Concurrencia máxima",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "Páginas de listado pedidas en paralelo (máx. 2 por respeto al servidor público).",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Reintentos por petición",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Reintentos con backoff exponencial + jitter ante errores transitorios (5xx, 408, 429, red). Respeta Retry-After.",
            "default": 4
          },
          "healthCheck": {
            "title": "Fallar si no hay resultados (health check)",
            "type": "boolean",
            "description": "Si está activo, la ejecución falla cuando el listado no devuelve ninguna advertencia (útil para detectar cambios en la web).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Normalmente no es necesario. Úsalo solo si www.cnmv.es rechaza las peticiones desde la IP de la plataforma."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}