{
  "openapi": "3.0.1",
  "info": {
    "title": "BODACC Insolvency Alerts France: Watchlist & Sector",
    "description": "New French insolvency notices from the official BODACC, only what you have not seen yet: watch your own list of SIRENs (customers, suppliers) or a sector by department and NAF code. Safeguard, receivership, liquidation, plans, closures; corrections and cancellations as updates.",
    "version": "0.1",
    "x-build-id": "pl75mykmEtinKtHEW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/geckostar~bodacc-insolvency-alerts-france/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-geckostar-bodacc-insolvency-alerts-france",
        "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/geckostar~bodacc-insolvency-alerts-france/runs": {
      "post": {
        "operationId": "runs-sync-geckostar-bodacc-insolvency-alerts-france",
        "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/geckostar~bodacc-insolvency-alerts-france/run-sync": {
      "post": {
        "operationId": "run-sync-geckostar-bodacc-insolvency-alerts-france",
        "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": [
          "watchId"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "watchlist",
              "sector"
            ],
            "type": "string",
            "description": "Watchlist: your own list of SIRENs (customers, suppliers, debtors). Sector: every company with a new notice in some departments, optionally filtered by NAF code.",
            "default": "watchlist"
          },
          "watchId": {
            "title": "Watch name",
            "type": "string",
            "description": "Name of this watch (lowercase letters, digits and hyphens, 40 characters at most). Runs with the same name only return notices not seen yet; the watch state is stored in your Apify account, in a key-value store named bodacc-alerts-<name>. Use one name per list or sector."
          },
          "sirens": {
            "title": "SIRENs to watch (watchlist mode)",
            "type": "array",
            "description": "One SIREN (9 digits) or SIRET (14 digits) per line, spaces allowed. 20,000 at most. Invalid lines are skipped and counted in the run summary.",
            "items": {
              "type": "string"
            }
          },
          "departements": {
            "title": "Departments",
            "type": "array",
            "description": "Department codes of the company (31, 75, 2A, 971…). Sector mode: the area to watch; empty means all of France. Watchlist mode: optional, narrows the reading.",
            "items": {
              "type": "string"
            }
          },
          "nafCodes": {
            "title": "NAF codes (sector mode)",
            "type": "array",
            "description": "NAF activity codes or code prefixes: “43” (specialised construction), “56.10A”… The BODACC has no NAF code: each new notice is looked up in the public Recherche d'entreprises API. Empty: all activities.",
            "items": {
              "type": "string"
            }
          },
          "procedureTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Personal sanctions (personal bankruptcy, ban from managing) are never returned. Claims lists are left out by default.",
            "items": {
              "type": "string",
              "enum": [
                "SAUVEGARDE",
                "REDRESSEMENT_JUDICIAIRE",
                "LIQUIDATION_JUDICIAIRE",
                "PLAN_SAUVEGARDE",
                "PLAN_REDRESSEMENT",
                "PLAN_CESSION",
                "CLOTURE_INSUFFISANCE_ACTIF",
                "FIN_PROCEDURE",
                "AUTRE_JUGEMENT",
                "DEPOT_CREANCES"
              ],
              "enumTitles": [
                "Safeguard opened",
                "Receivership opened",
                "Liquidation (opened or converted)",
                "Safeguard plan",
                "Recovery plan",
                "Sale plan",
                "Closed for lack of assets",
                "Proceedings ended",
                "Other judgment",
                "Claims list filed"
              ]
            },
            "default": [
              "SAUVEGARDE",
              "REDRESSEMENT_JUDICIAIRE",
              "LIQUIDATION_JUDICIAIRE",
              "PLAN_SAUVEGARDE",
              "PLAN_REDRESSEMENT",
              "PLAN_CESSION",
              "CLOTURE_INSUFFISANCE_ACTIF",
              "FIN_PROCEDURE",
              "AUTRE_JUGEMENT"
            ]
          },
          "includeLastDays": {
            "title": "First run: include the last N days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Only used on the first run of a watch. 0 (default): the first run records the current state without returning or charging anything, and later runs return only new notices. 1 to 30: the first run also returns the notices published in the last N days.",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum number of new notices per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Notices beyond this number are kept for the next run, not lost.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}