{
  "openapi": "3.0.1",
  "info": {
    "title": "French Company Intelligence",
    "description": "Extract French company data from official government APIs (INSEE, INPI, BODACC). Search by name, SIREN lookup, or batch enrich. Identity, financials, directors, establishments, legal announcements. All free sources.",
    "version": "1.0",
    "x-build-id": "C8qRJgMTIshmkMXUn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/innocent_goodness~french-company-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-innocent_goodness-french-company-intel",
        "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/innocent_goodness~french-company-intel/runs": {
      "post": {
        "operationId": "runs-sync-innocent_goodness-french-company-intel",
        "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/innocent_goodness~french-company-intel/run-sync": {
      "post": {
        "operationId": "run-sync-innocent_goodness-french-company-intel",
        "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": "Search Mode",
            "enum": [
              "search",
              "siren_lookup",
              "batch_siren"
            ],
            "type": "string",
            "description": "How to search for companies",
            "default": "search"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Company name, keywords, or partial name to search for (mode: search)"
          },
          "siren": {
            "title": "SIREN Number",
            "pattern": "^[0-9]{9}$",
            "type": "string",
            "description": "9-digit SIREN number for direct lookup (mode: siren_lookup)"
          },
          "sirenList": {
            "title": "SIREN List",
            "type": "string",
            "description": "List of SIREN numbers for batch lookup (mode: batch_siren). One per line or comma-separated."
          },
          "filters": {
            "title": "Search Filters",
            "type": "object",
            "description": "Optional filters for search mode",
            "properties": {
              "code_postal": {
                "title": "Postal Code",
                "description": "Filter by postal code (e.g. 75008 for Paris 8th)",
                "type": "string"
              },
              "departement": {
                "title": "Department Code",
                "description": "Filter by department number (e.g. 75 for Paris, 13 for Marseille)",
                "type": "string"
              },
              "activite_principale": {
                "title": "NAF/APE Code",
                "description": "Filter by NAF/APE activity code (e.g. 62.02A for IT consulting)",
                "type": "string"
              },
              "section_activite_principale": {
                "title": "Activity Section",
                "description": "Filter by activity section letter (e.g. M for professional services)",
                "type": "string"
              },
              "tranche_effectif_salarie": {
                "title": "Employee Range Code",
                "description": "Filter by INSEE employee range code (e.g. 11 for 10-19 employees)",
                "type": "string"
              },
              "nature_juridique": {
                "title": "Legal Form Code",
                "description": "Filter by legal form code (e.g. 5710 for SAS, 5599 for SARL)",
                "type": "string"
              },
              "etat_administratif": {
                "title": "Administrative Status",
                "description": "Filter by company status: A (active) or C (closed/ceased)",
                "type": "string",
                "enum": [
                  "A",
                  "C"
                ],
                "enumTitles": [
                  "Active",
                  "Closed"
                ]
              }
            }
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of companies to return (search mode)",
            "default": 25
          },
          "includeBodacc": {
            "title": "Include BODACC",
            "type": "boolean",
            "description": "Fetch legal announcements (BODACC) for each company. Adds creation, modification, sale, and collective procedure announcements.",
            "default": false
          },
          "includeFinancials": {
            "title": "Include Financials",
            "type": "boolean",
            "description": "Include revenue (CA), net result, and financial history when available.",
            "default": true
          },
          "includeDirectors": {
            "title": "Include Directors",
            "type": "boolean",
            "description": "Include company directors/executives (dirigeants) with roles.",
            "default": true
          },
          "includeEstablishments": {
            "title": "Include Establishments",
            "type": "boolean",
            "description": "Include all establishment addresses (sieges + secondary locations).",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}