{
  "openapi": "3.0.1",
  "info": {
    "title": "DVF Historique France - Transactions Immobilières par Commune",
    "description": "Consultez l'historique complet des ventes immobilières depuis 2014 avec 11 filtres avancés (dates, prix, surface, type, pièces). Données officielles DVF (Demandes de Valeurs Foncières). Jusqu'à 10 000 transactions. Idéal pour analyses de marché, expertises immobilières et études de tendances.",
    "version": "1.0",
    "x-build-id": "4QaDcvoOKNxs8SnzM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devnaz~dvf-historique/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devnaz-dvf-historique",
        "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/devnaz~dvf-historique/runs": {
      "post": {
        "operationId": "runs-sync-devnaz-dvf-historique",
        "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/devnaz~dvf-historique/run-sync": {
      "post": {
        "operationId": "run-sync-devnaz-dvf-historique",
        "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": [
          "code_insee"
        ],
        "properties": {
          "code_insee": {
            "title": "🏘️ Code INSEE",
            "pattern": "^[0-9]{5}$",
            "type": "string",
            "description": "Code INSEE de la commune (5 chiffres). Exemple: 92014 pour Boulogne-Billancourt."
          },
          "date_debut": {
            "title": "📅 Date de début (optionnel)",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Date de début de la période (format: YYYY-MM-DD). Exemple: 2020-01-01"
          },
          "date_fin": {
            "title": "📅 Date de fin (optionnel)",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Date de fin de la période (format: YYYY-MM-DD). Exemple: 2024-12-31"
          },
          "type_local": {
            "title": "🏠 Type de bien (optionnel)",
            "enum": [
              "Appartement",
              "Maison",
              "Dépendance",
              "Local industriel. commercial ou assimilé"
            ],
            "type": "string",
            "description": "Filtrer par type de bien immobilier"
          },
          "nature_mutation": {
            "title": "📋 Nature de mutation (optionnel)",
            "enum": [
              "Vente",
              "Vente en l'état futur d'achèvement",
              "Vente terrain à bâtir",
              "Adjudication",
              "Expropriation"
            ],
            "type": "string",
            "description": "Filtrer par type de transaction"
          },
          "prix_min": {
            "title": "💰 Prix minimum (optionnel)",
            "minimum": 0,
            "type": "number",
            "description": "Prix minimum en euros"
          },
          "prix_max": {
            "title": "💰 Prix maximum (optionnel)",
            "minimum": 0,
            "type": "number",
            "description": "Prix maximum en euros"
          },
          "surface_min": {
            "title": "📐 Surface min en m² (optionnel)",
            "minimum": 0,
            "type": "number",
            "description": "Surface minimum en m²"
          },
          "surface_max": {
            "title": "📐 Surface max en m² (optionnel)",
            "minimum": 0,
            "type": "number",
            "description": "Surface maximum en m²"
          },
          "pieces_min": {
            "title": "🚪 Pièces min (optionnel)",
            "minimum": 1,
            "type": "integer",
            "description": "Nombre minimum de pièces principales"
          },
          "pieces_max": {
            "title": "🚪 Pièces max (optionnel)",
            "minimum": 1,
            "type": "integer",
            "description": "Nombre maximum de pièces principales"
          },
          "order_by": {
            "title": "🔄 Tri des résultats",
            "enum": [
              "date_desc",
              "date_asc",
              "prix_desc",
              "prix_asc",
              "surface_desc",
              "surface_asc"
            ],
            "type": "string",
            "description": "Ordre de tri des résultats",
            "default": "date_desc"
          },
          "limit": {
            "title": "📊 Nombre maximum de résultats",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limite le nombre de ventes retournées (par défaut: 10, max: 10000)",
            "default": 10
          },
          "proxyConfig": {
            "title": "🔒 Configuration Proxy",
            "type": "object",
            "description": "Proxy Apify (optionnel, généralement non nécessaire pour APIs gouvernementales)",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}