{
  "openapi": "3.0.1",
  "info": {
    "title": "France B2B Leads, Pappers & SIRENE/BODACC Scraper (Emails)",
    "description": "Extract French B2B company leads & daily sales triggers (Pappers / Societe.com alternative) from official INSEE SIRENE & BODACC registries. Enriches SIREN/SIRET, NAF, VAT, directors (Président/Gérant), financials, verified websites, emails, phones & CMS. Bilingual EN/FR output.",
    "version": "0.0",
    "x-build-id": "Ge0Xr6AJCYLJwBpld"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grimbles~fr-b2b-trigger-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grimbles-fr-b2b-trigger-leads",
        "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/grimbles~fr-b2b-trigger-leads/runs": {
      "post": {
        "operationId": "runs-sync-grimbles-fr-b2b-trigger-leads",
        "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/grimbles~fr-b2b-trigger-leads/run-sync": {
      "post": {
        "operationId": "run-sync-grimbles-fr-b2b-trigger-leads",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Extraction Mode",
            "enum": [
              "bodacc_triggers",
              "sirene_search",
              "siren_list"
            ],
            "type": "string",
            "description": "Choose whether to pull recent legal triggers from BODACC, search active companies in INSEE SIRENE, or enrich a specific list of SIREN numbers.",
            "default": "bodacc_triggers"
          },
          "bodaccFamilies": {
            "title": "BODACC Notice Types",
            "type": "array",
            "description": "Notice families to extract in bodacc_triggers mode (e.g. creation, immatriculation, modification, vente, pcl).",
            "default": [
              "creation",
              "immatriculation"
            ],
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days Back (BODACC)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Lookback window in days from today for BODACC publications.",
            "default": 7
          },
          "departments": {
            "title": "French Department Codes",
            "type": "array",
            "description": "Optional filter by department codes (e.g. 75, 69, 33, 92). Leave empty for all of France.",
            "default": [
              "75"
            ],
            "items": {
              "type": "string"
            }
          },
          "nafCodes": {
            "title": "NAF / APE Activity Codes",
            "type": "array",
            "description": "Optional INSEE NAF/APE codes (e.g. 62.01Z, 56.10A, 70.22Z). Applied in SIRENE search or post-filtering BODACC leads.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "employeeBrackets": {
            "title": "Employee Count Brackets (INSEE codes)",
            "type": "array",
            "description": "Optional INSEE codes: NN, 00, 01 (1-2), 02 (3-5), 03 (6-9), 11 (10-19), 12 (20-49), 21 (50-99), etc.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Keyword Query",
            "type": "string",
            "description": "Optional free-text search (company name, trade keyword, city).",
            "default": ""
          },
          "sirens": {
            "title": "SIREN List",
            "type": "array",
            "description": "9-digit SIREN numbers to enrich when mode is siren_list.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "candidateDomains": {
            "title": "Known Domain Mapping (SIREN -> domain)",
            "type": "object",
            "description": "Optional JSON mapping of SIREN to website domain (e.g. {\"123456789\": \"example.fr\"}) for direct enrichment.",
            "default": {}
          },
          "onlyActive": {
            "title": "Active Companies Only",
            "type": "boolean",
            "description": "Exclude legally ceased/closed entities (etat_administratif = A).",
            "default": true
          },
          "excludeSoleProprietors": {
            "title": "Exclude Sole Proprietors (Companies Only)",
            "type": "boolean",
            "description": "Filter out Entreprises Individuelles (code 1000) to focus on SAS, SARL, EURL, SA companies.",
            "default": true
          },
          "outputLanguage": {
            "title": "Output Label Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language used for human-readable labels (legalForm, employeeCountLabel, nafSectionLabel, triggerType).",
            "default": "en"
          },
          "maxResults": {
            "title": "Max Leads to Extract",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of deduplicated leads to output.",
            "default": 50
          },
          "enrichWebsites": {
            "title": "Audit & Enrich Websites",
            "type": "boolean",
            "description": "Probe/verify company websites and crawl homepage, /mentions-legales, /contact, /robots.txt and /llms.txt for emails, phones, socials, CMS, SSL & opportunity score.",
            "default": false
          },
          "probeCandidateDomains": {
            "title": "Auto-Discover Candidate .fr/.com Domains",
            "type": "boolean",
            "description": "When enrichWebsites is true and no domain is provided, test slugified .fr/.com domains and accept ONLY if the exact SIREN or legal notice matches.",
            "default": true
          },
          "maxWebPagesPerSite": {
            "title": "Max Pages per Website",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Maximum internal pages (homepage, mentions legales, contact) to inspect per domain.",
            "default": 3
          },
          "onlyWithEmail": {
            "title": "Only Output Leads with Email",
            "type": "boolean",
            "description": "When enabled, filter out leads without an extracted public email address.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}