{
  "openapi": "3.0.1",
  "info": {
    "title": "French DPE Leads Properties and Details Scraper",
    "description": "French DPE Leads Properties and Details Scraper — ADEME/DGFiP/SIRENE property lead collector; source requests currently remain policy-gated while Chrome cannot inspect the configured endpoint and current terms.",
    "version": "1.1",
    "x-build-id": "zgdcnsutycCgKo5XY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/realestateapi~french-dpe-leads-properties-and-details-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-realestateapi-french-dpe-leads-properties-and-details-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/realestateapi~french-dpe-leads-properties-and-details-scraper/runs": {
      "post": {
        "operationId": "runs-sync-realestateapi-french-dpe-leads-properties-and-details-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/realestateapi~french-dpe-leads-properties-and-details-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-realestateapi-french-dpe-leads-properties-and-details-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": {
          "limit": {
            "title": "Maximum DPE records",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum distinct ADEME DPE records to inspect and emit.",
            "default": 25
          },
          "city": {
            "title": "French commune",
            "type": "string",
            "description": "Exact local city filter after ADEME retrieval.",
            "default": "Paris"
          },
          "postalCode": {
            "title": "Postal code",
            "type": "string",
            "description": "Optional exact five-digit postal-code filter; it also narrows the ADEME request."
          },
          "department": {
            "title": "Department",
            "type": "string",
            "description": "Optional French department code such as 75, 2A, or 2B."
          },
          "query": {
            "title": "ADEME search query",
            "type": "string",
            "description": "Optional ADEME full-text query; city is used when omitted."
          },
          "dpeClasses": {
            "title": "DPE classes",
            "minItems": 1,
            "maxItems": 7,
            "type": "array",
            "description": "Energy classes requested from ADEME; the intended lead mode is F and G.",
            "items": {
              "type": "string",
              "maxLength": 1
            },
            "default": [
              "F",
              "G"
            ]
          },
          "sourcePageSize": {
            "title": "ADEME page size",
            "minimum": 25,
            "maximum": 100,
            "type": "integer",
            "description": "Rows requested per ADEME page.",
            "default": 100
          },
          "maxSourcePages": {
            "title": "Maximum ADEME pages per class",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Bound the local city filtering work when ADEME search relevance returns nearby names.",
            "default": 10
          },
          "includeOwnerLookup": {
            "title": "Join DGFiP legal-person owners",
            "type": "boolean",
            "description": "Download and scan the official year-specific DGFiP legal-person property archive for address matches.",
            "default": true
          },
          "ownerLegalForms": {
            "title": "Owner legal forms",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "DGFiP abbreviated legal-form values to retain, for example SCI or SARL.",
            "items": {
              "type": "string"
            },
            "default": [
              "SCI",
              "SARL"
            ]
          },
          "ownerDataYear": {
            "title": "DGFiP archive year",
            "minimum": 2021,
            "maximum": 2025,
            "type": "integer",
            "description": "Official DGFiP legal-person property archive year. The current default is 2025.",
            "default": 2025
          },
          "maxOwnerRowsScanned": {
            "title": "Maximum DGFiP rows",
            "minimum": 10000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Safety bound on decoded DGFiP rows across department files.",
            "default": 2500000
          },
          "maxOwnersPerDpe": {
            "title": "Owners per DPE",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum legal-person owner rows emitted for each DPE address.",
            "default": 3
          },
          "stopAfterFirstOwner": {
            "title": "Stop after one owner per DPE",
            "type": "boolean",
            "description": "Stop streaming a department file once every requested DPE has at least one legal-person owner match. Disable to collect up to maxOwnersPerDpe rows per DPE.",
            "default": true
          },
          "includeSirene": {
            "title": "Enrich SIRENs with SIRENE",
            "type": "boolean",
            "description": "Look up matched nine-digit SIRENs in the public Recherche d'entreprises API.",
            "default": true
          },
          "maxSireneOwners": {
            "title": "Maximum SIRENE lookups",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Bounded number of distinct matched SIRENs to enrich.",
            "default": 25
          },
          "includeRaw": {
            "title": "Include ADEME raw rows",
            "type": "boolean",
            "description": "Retain the complete ADEME source row under dpe.raw.",
            "default": false
          },
          "monitor": {
            "title": "Enable change monitoring",
            "type": "boolean",
            "description": "Compare the current lead snapshot with LAST_SNAPSHOT and classify new, updated, unchanged, and removed records.",
            "default": false
          },
          "slackWebhookUrl": {
            "title": "Optional Slack webhook",
            "type": "string",
            "description": "Optional user-supplied Slack webhook used only when monitor is true; no webhook is called by default."
          },
          "requestTimeoutSecs": {
            "title": "JSON request timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Timeout for ADEME and SIRENE requests.",
            "default": 45
          },
          "archiveTimeoutSecs": {
            "title": "DGFiP archive timeout",
            "minimum": 30,
            "maximum": 1800,
            "type": "integer",
            "description": "Timeout for downloading and scanning the official DGFiP archive.",
            "default": 900
          },
          "maxDownloadBytes": {
            "title": "Maximum archive bytes",
            "minimum": 50000000,
            "maximum": 500000000,
            "type": "integer",
            "description": "Reject an unexpectedly large archive before or during download.",
            "default": 260000000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}