{
  "openapi": "3.0.1",
  "info": {
    "title": "France BODACC Watch: Insolvency and Company Events by SIREN",
    "description": "Watch the French BODACC gazette by SIREN or across France. Insolvency, liquidation, receivership, conciliation, sales, deregistrations and filings from DILA open data, classified by event and risk level. Only-new mode for daily alerts. Natural persons are never returned.",
    "version": "1.0",
    "x-build-id": "uL6cVtFgp9fesdhcm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~bodacc-siren-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-bodacc-siren-watch",
        "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/atesen-software~bodacc-siren-watch/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-bodacc-siren-watch",
        "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/atesen-software~bodacc-siren-watch/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-bodacc-siren-watch",
        "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": {
          "eventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "Which kinds of BODACC notices to return. insolvency = procedures collectives (safeguard, receivership, liquidation, plans, closures); conciliation = court-approved conciliation agreements; sales = sales and transfers of businesses, mergers; deregistrations = removals from the commercial register; registrations = new companies and establishments; modifications = changes such as dissolution, cessation of activity, capital or management; accounts = annual accounts filed (a very large stream).",
            "items": {
              "type": "string",
              "enum": [
                "insolvency",
                "conciliation",
                "sales",
                "deregistrations",
                "registrations",
                "modifications",
                "accounts"
              ],
              "enumTitles": [
                "Insolvency (safeguard, receivership, liquidation)",
                "Conciliation agreements",
                "Business sales, transfers and mergers",
                "Deregistrations (radiations)",
                "New registrations",
                "Modifications (dissolution, cessation, capital, management)",
                "Annual accounts filed"
              ]
            },
            "default": [
              "insolvency",
              "conciliation"
            ]
          },
          "sirens": {
            "title": "SIREN watchlist (optional)",
            "type": "array",
            "description": "SIREN (9 digits) or SIRET (14 digits) numbers of the companies to watch, one per line, for example your suppliers or customers. Spaces are allowed. Numbers with a wrong check digit are ignored with a warning. Leave empty to scan the whole gazette. With a watchlist the date window can reach back up to 1830 days.",
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 1830,
            "type": "integer",
            "description": "How many days of publications to read, counted back from today (or from dateTo). Ignored when dateFrom is set. At most 366 days without a SIREN watchlist, 1830 days with one.",
            "default": 7
          },
          "dateFrom": {
            "title": "From date (optional)",
            "type": "string",
            "description": "First publication day, format YYYY-MM-DD. Overrides the look-back days."
          },
          "dateTo": {
            "title": "To date (optional)",
            "type": "string",
            "description": "Last publication day, format YYYY-MM-DD. Default: today."
          },
          "departments": {
            "title": "Departments (optional)",
            "type": "array",
            "description": "Keep only notices of these French departments, for example 75 (Paris), 13, 69, 2A, 971. Empty = all of France.",
            "items": {
              "type": "string"
            }
          },
          "minRiskLevel": {
            "title": "Minimum risk level",
            "enum": [
              "info",
              "medium",
              "high",
              "critical"
            ],
            "type": "string",
            "description": "Every notice gets a risk level from its event: info (routine filings), medium (plans, other judgments, deregistration, dissolution), high (receivership, safeguard, closed for insufficient assets, plan terminated), critical (liquidation). Notices below this level are not returned and not charged.",
            "default": "info"
          },
          "onlyNewSinceLastRun": {
            "title": "Only new notices since the last run",
            "type": "boolean",
            "description": "Return only notices not delivered by an earlier run with the same filters (corrections and cancellations count as new notices). The first run returns everything in the window. Schedule the Actor daily with this switch on to get an alert feed. Delivered ids are kept in a named key-value store (no names, no texts). After a complete run, reading restarts a few days before the last covered day, so an older window needs a different memory name.",
            "default": false
          },
          "stateKey": {
            "title": "Memory name (optional)",
            "type": "string",
            "description": "Name of the 'already delivered' memory used by the only-new mode. Default: derived from your filters, so different watchlists never share a memory. Set the same name in several schedules to share one."
          },
          "stateStore": {
            "title": "Memory store (pick one)",
            "type": "string",
            "description": "Key-value store that keeps the 'already delivered' memory between runs. Pick or create a store here to use the only-new mode. This works with the Actor's limited permissions. Leave it empty to use the named store 'bodacc-watch-state' in your account, or to run without memory."
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many returned notices. Each returned notice is one billed event; set a low number for a test. Hard cap: the run never writes or charges more rows than this.",
            "default": 10
          },
          "maxRuntimeSeconds": {
            "title": "Maximum run time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "0 = use the platform timeout. When the limit is reached the run stops cleanly and reports a partial result.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}