{
  "openapi": "3.0.1",
  "info": {
    "title": "France DVF Real Estate Sales & BDNB Building API",
    "description": "Extract French real estate sales (2024-2026 DVF Tabular API — active replacement for broken cquest.org) & CSTB BDNB building intel (DPE class, corporate/syndic owners, solar potential, construction year) with EUR/m². Zero proxy · Official Gov Open Data · MCP & n8n ready.",
    "version": "1.0",
    "x-build-id": "3NcsaKkE1eomotJIT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/govdata-api~fr-dvf-bdnb-property-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-govdata-api-fr-dvf-bdnb-property-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/govdata-api~fr-dvf-bdnb-property-intel/runs": {
      "post": {
        "operationId": "runs-sync-govdata-api-fr-dvf-bdnb-property-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/govdata-api~fr-dvf-bdnb-property-intel/run-sync": {
      "post": {
        "operationId": "run-sync-govdata-api-fr-dvf-bdnb-property-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": "Data Source Mode",
            "enum": [
              "dvf",
              "bdnb",
              "both"
            ],
            "type": "string",
            "description": "Choose 'dvf' for official 2024–2026 S1 geolocated real estate transactions (with computed EUR/m²), 'bdnb' for CSTB national building intelligence (DPE class, corporate/syndic owners, solar roof potential, construction year), or 'both' to retrieve both sources in a single run.",
            "default": "dvf"
          },
          "departmentCode": {
            "title": "French Department Code",
            "type": "string",
            "description": "2- or 3-character INSEE department code (e.g. '75' for Paris, '69' for Rhône, '33' for Gironde, '13' for Bouches-du-Rhône, '2A' for Corse-du-Sud, '974' for La Réunion). Defaults to '75' when no postalCodes are given.",
            "default": "75"
          },
          "postalCodes": {
            "title": "Postal Codes Filter (optional)",
            "type": "array",
            "description": "Restrict results to specific 5-digit French postal codes (e.g. ['75011', '75015'] or ['33000', '33100']). In BDNB mode, postal codes are automatically resolved to indexed INSEE commune/arrondissement codes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "propertyTypes": {
            "title": "Property Types Filter (optional)",
            "type": "array",
            "description": "Filter by DVF local type (e.g. ['Appartement', 'Maison', 'Local industriel. commercial ou assimilé', 'Dépendance']) or BDNB usage ('Résidentiel collectif', 'Résidentiel individuel', 'Tertiaire & Autres'). DVF labels are automatically mapped in BDNB mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPriceEur": {
            "title": "Minimum Sale Price in EUR (DVF mode, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter DVF transactions with valeur_fonciere >= this amount in euros (0 = disabled).",
            "default": 0
          },
          "maxPriceEur": {
            "title": "Maximum Sale Price in EUR (DVF mode, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter DVF transactions with valeur_fonciere <= this amount in euros (0 = disabled).",
            "default": 0
          },
          "minSurfaceM2": {
            "title": "Minimum Surface Area in m² (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum built floor area in m² (DVF surface_reelle_bati / BDNB surface_emprise_sol). Set 0 for no minimum.",
            "default": 0
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Maximum number of property or building records to return (1 to 3000).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}