{
  "openapi": "3.0.1",
  "info": {
    "title": "French Energy Ratings (DPE) – Address Lookup, Leads & Stats",
    "description": "Official French energy performance certificates (DPE, 17M+ homes, updated daily): energy rating of any address, F/G 'energy sieves' in an area for renovation leads, label statistics, annual energy costs and rental-ban dates.",
    "version": "0.1",
    "x-build-id": "rALRc5FuLzYlCXq28"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yck69~french-energy-ratings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yck69-french-energy-ratings",
        "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/yck69~french-energy-ratings/runs": {
      "post": {
        "operationId": "runs-sync-yck69-french-energy-ratings",
        "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/yck69~french-energy-ratings/run-sync": {
      "post": {
        "operationId": "run-sync-yck69-french-energy-ratings",
        "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": "What do you want?",
            "enum": [
              "search",
              "address",
              "stats"
            ],
            "type": "string",
            "description": "<b>Search an area</b>: certificates around an address or in communes, postal codes or departments, e.g. every F/G house for renovation prospecting.<br><b>Look up addresses</b>: the certificates of each address in a list.<br><b>Statistics</b>: label distribution, share of F/G 'energy sieves', average consumption and energy cost by commune, postal code, building type, construction period or heating energy.",
            "default": "search"
          },
          "addresses": {
            "title": "Addresses",
            "type": "array",
            "description": "One address per line, e.g. <code>8 cours Bayard, Lyon</code>. Returns every certificate at that address (all apartments of a building).",
            "items": {
              "type": "string"
            }
          },
          "address": {
            "title": "Address",
            "type": "string",
            "description": "Centre of the search, e.g. <code>Place Bellecour, Lyon</code>."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.01,
            "maximum": 20,
            "type": "number",
            "description": "Up to 20 km.",
            "default": 0.5
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Instead of an address."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Instead of an address."
          },
          "communes": {
            "title": "Communes",
            "type": "array",
            "description": "Names or INSEE codes, e.g. <code>Nantes</code>, <code>Paris</code> (all arrondissements).",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "e.g. <code>44000</code>.",
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "e.g. <code>44</code>, <code>2A</code>.",
            "items": {
              "type": "string"
            }
          },
          "labels": {
            "title": "Energy labels",
            "type": "array",
            "description": "Tip: <b>F</b> and <b>G</b> are the 'energy sieves' (passoires thermiques) that landlords must renovate.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G"
              ]
            }
          },
          "ghgLabels": {
            "title": "Greenhouse gas labels",
            "type": "array",
            "description": "GES label, A to G.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G"
              ]
            }
          },
          "buildingTypes": {
            "title": "Building types",
            "type": "array",
            "description": "Certificates are for an apartment, a house or a whole building.",
            "items": {
              "type": "string",
              "enum": [
                "appartement",
                "maison",
                "immeuble"
              ],
              "enumTitles": [
                "Apartment",
                "House",
                "Whole building"
              ]
            }
          },
          "constructionPeriods": {
            "title": "Construction periods",
            "type": "array",
            "description": "As declared in the certificate.",
            "items": {
              "type": "string",
              "enum": [
                "avant 1948",
                "1948-1974",
                "1975-1977",
                "1978-1982",
                "1983-1988",
                "1989-2000",
                "2001-2005",
                "2006-2012",
                "2013-2021",
                "après 2021"
              ],
              "enumTitles": [
                "Before 1948",
                "1948–1974",
                "1975–1977",
                "1978–1982",
                "1983–1988",
                "1989–2000",
                "2001–2005",
                "2006–2012",
                "2013–2021",
                "After 2021"
              ]
            }
          },
          "minConstructionYear": {
            "title": "Built from (year)",
            "type": "integer",
            "description": "Construction year, when known."
          },
          "maxConstructionYear": {
            "title": "Built until (year)",
            "type": "integer",
            "description": "Construction year, when known."
          },
          "heatingEnergies": {
            "title": "Main heating energy",
            "type": "array",
            "description": "e.g. oil-heated homes for heat-pump installers.",
            "items": {
              "type": "string",
              "enum": [
                "Électricité",
                "Gaz naturel",
                "Réseau de Chauffage urbain",
                "Fioul domestique",
                "Bois – Bûches",
                "Bois – Granulés (pellets) ou briquettes",
                "GPL",
                "Propane",
                "Charbon"
              ],
              "enumTitles": [
                "Electricity",
                "Natural gas",
                "District heating",
                "Heating oil",
                "Wood logs",
                "Wood pellets",
                "LPG",
                "Propane",
                "Coal"
              ]
            }
          },
          "minLivingArea": {
            "title": "Minimum living area (m²)",
            "type": "number",
            "description": "Of the dwelling."
          },
          "maxLivingArea": {
            "title": "Maximum living area (m²)",
            "type": "number",
            "description": "Of the dwelling."
          },
          "dateFrom": {
            "title": "Issued after",
            "type": "string",
            "description": "A date or a duration like <code>6 months</code>. Useful for monitoring new certificates."
          },
          "dateTo": {
            "title": "Issued before",
            "type": "string",
            "description": "A date or a duration."
          },
          "validOnly": {
            "title": "Valid certificates only",
            "type": "boolean",
            "description": "Excludes expired certificates.",
            "default": true
          },
          "datasets": {
            "title": "Certificates",
            "type": "array",
            "description": "Existing homes (default) and/or new homes.",
            "items": {
              "type": "string",
              "enum": [
                "existing",
                "new"
              ],
              "enumTitles": [
                "Existing homes (15.8M)",
                "New homes (1.5M)"
              ]
            },
            "default": [
              "existing"
            ]
          },
          "groupBy": {
            "title": "Statistics by",
            "enum": [
              "commune",
              "postalCode",
              "department",
              "buildingType",
              "constructionPeriod",
              "heatingEnergy"
            ],
            "type": "string",
            "description": "One row per group with label counts and shares, F/G share, average consumption and energy cost.",
            "default": "commune"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "worst",
              "best",
              "largest",
              "distance"
            ],
            "type": "string",
            "description": "For searches.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Certificates or statistics rows.",
            "default": 100
          },
          "countOnly": {
            "title": "Count only (free preview)",
            "type": "boolean",
            "description": "Count matching certificates. Nothing is charged.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. ADEME briefly blocks IPs that send too many requests; the Actor slows down automatically.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}