{
  "openapi": "3.0.1",
  "info": {
    "title": "French Company Scraper - SIRENE Data, Executives & B2B Leads",
    "description": "Scrape French companies from the official SIRENE registry — SIREN/SIRET, NAF activity, legal form, size, executives, revenue & establishments — plus BODACC new registrations, insolvencies & sales. Filters, lead scoring & only-new monitoring. Keyless, no browser.",
    "version": "0.1",
    "x-build-id": "HDhmlb4OycusBCXqv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~french-company-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-french-company-scraper",
        "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/scrapesage~french-company-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-french-company-scraper",
        "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/scrapesage~french-company-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-french-company-scraper",
        "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": "Mode",
            "enum": [
              "companies",
              "legalAnnouncements"
            ],
            "type": "string",
            "description": "Choose the data source. 'Companies' searches the official SIRENE / recherche-entreprises registry (firmographics, executives, finances). 'Legal announcements' pulls BODACC notices — new registrations (fresh leads), insolvencies and business sales — newest first.",
            "default": "companies"
          },
          "query": {
            "title": "Search query / keyword",
            "type": "string",
            "description": "Free-text search. In Companies mode: company name, brand, manager name, SIREN or SIRET. In Legal announcements mode: full-text on BODACC notices. Leave empty to rely on filters only."
          },
          "sirens": {
            "title": "SIREN / SIRET list (Companies mode)",
            "type": "array",
            "description": "Look up specific companies directly by 9-digit SIREN or 14-digit SIRET. Overrides the search query when provided.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activityCodes": {
            "title": "Activity codes (NAF/APE or section letter)",
            "type": "array",
            "description": "Filter companies by activity. Use a full NAF/APE code like 62.01Z (computer programming) or 10.71C (bakery), or a single section letter A–U (e.g. J = Information & communication, F = Construction).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Departments / postal codes",
            "type": "array",
            "description": "Filter by French department code (75, 13, 2A, 971…) or a full 5-digit postal code (75001). Also used in Legal announcements mode (department only).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Region codes",
            "type": "array",
            "description": "Filter by INSEE region code (e.g. 11 = Île-de-France, 84 = Auvergne-Rhône-Alpes, 93 = PACA).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companySize": {
            "title": "Company size (employees)",
            "type": "array",
            "description": "Keep only companies in these employee bands.",
            "items": {
              "type": "string",
              "enum": [
                "No employees",
                "1-9 employees",
                "10-49 employees",
                "50-249 employees",
                "250-999 employees",
                "1000+ employees"
              ]
            },
            "default": []
          },
          "companyCategory": {
            "title": "Company category",
            "type": "array",
            "description": "INSEE company category: PME (small/medium incl. micro), ETI (mid-cap), GE (large enterprise).",
            "items": {
              "type": "string",
              "enum": [
                "PME",
                "ETI",
                "GE"
              ]
            },
            "default": []
          },
          "legalForms": {
            "title": "Legal form",
            "type": "array",
            "description": "Keep only these legal forms (mapped to SIRENE nature-juridique codes).",
            "items": {
              "type": "string",
              "enum": [
                "SAS / SASU",
                "SARL / EURL",
                "SA",
                "Entrepreneur individuel",
                "Société civile (SCI/SCP/SCM)",
                "Association"
              ]
            },
            "default": []
          },
          "legalFormCodes": {
            "title": "Legal form codes (advanced)",
            "type": "array",
            "description": "Power-user passthrough: exact INSEE nature-juridique codes (e.g. 5710 = SAS, 5499 = SARL, 1000 = entrepreneur individuel).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "labels": {
            "title": "Labels & certifications",
            "type": "array",
            "description": "Keep only companies carrying these official labels / certifications.",
            "items": {
              "type": "string",
              "enum": [
                "RGE (eco-renovation certified)",
                "Qualiopi (training certified)",
                "ESS (social & solidarity economy)",
                "Organic (Bio certified)",
                "Mission-driven company",
                "Training organisation",
                "Live-performance entrepreneur",
                "Lawyer",
                "Public service"
              ]
            },
            "default": []
          },
          "activeOnly": {
            "title": "Active companies only",
            "type": "boolean",
            "description": "Drop companies whose administrative status is closed/ceased.",
            "default": false
          },
          "isEmployer": {
            "title": "Employers only",
            "type": "boolean",
            "description": "Keep only companies flagged as employers (have payroll).",
            "default": false
          },
          "announcementTypes": {
            "title": "Announcement types (BODACC)",
            "type": "array",
            "description": "Which BODACC notice families to return in Legal announcements mode. 'creation' = brand-new company registrations (the best fresh leads); 'collective' = insolvency / collective proceedings (distressed leads); 'vente' = business sales/transfers.",
            "items": {
              "type": "string",
              "enum": [
                "creation",
                "modification",
                "radiation",
                "collective",
                "depot",
                "vente"
              ]
            },
            "default": [
              "creation"
            ]
          },
          "publishedAfter": {
            "title": "Published after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only BODACC notices published on/after this date — the key to fresh, high-intent leads. Example: 2026-06-01."
          },
          "publishedBefore": {
            "title": "Published before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only BODACC notices published on/before this date."
          },
          "enrichWithFirmographics": {
            "title": "Enrich announcements with firmographics",
            "type": "boolean",
            "description": "For each BODACC notice, look up the company in the SIRENE registry and attach its NAF activity, size, executives, revenue and labels. Adds one API call per unique company.",
            "default": false
          },
          "includeExecutives": {
            "title": "Include executives / directors",
            "type": "boolean",
            "description": "Attach the company's directors and officers (name, role, birth year).",
            "default": true
          },
          "includeEstablishments": {
            "title": "Include establishments",
            "type": "boolean",
            "description": "Attach the company's matching establishments (SIRET, address, activity).",
            "default": true
          },
          "includeFinances": {
            "title": "Include finances",
            "type": "boolean",
            "description": "Attach published yearly finances (revenue / net result) when available.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of records to emit in this run. Each search query / announcement filter returns up to 10,000 rows — split by activity, department or date to go deeper.",
            "default": 200
          },
          "deduplicateResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Emit each company (by SIREN) / announcement (by id) only once per run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember records returned in previous runs and emit ONLY new ones. Pairs with Apify Schedules to capture fresh registrations, insolvencies or filings daily.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store holding the 'already seen' ids for monitoring mode. Use a different name per tracked scope.",
            "default": "french-company-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel API requests (SIREN lookups / enrichment).",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The French government open-data APIs are clean, so the default Apify proxy is plenty.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}