{
  "openapi": "3.0.1",
  "info": {
    "title": "France Building Permits API: Construction Leads",
    "description": "Get new French building permits filed by companies — SIREN, project size and site, from official Sitadel data. Construction leads by department, updated monthly: developer, social landlord or retailer, dwellings, floor area by use, dates. No API key; JSON via API or MCP, $5 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "W8R849qw0aCdwUVGv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/japan-open-data~france-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-japan-open-data-france-building-permits",
        "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/japan-open-data~france-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-japan-open-data-france-building-permits",
        "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/japan-open-data~france-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-japan-open-data-france-building-permits",
        "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": [
          "department"
        ],
        "properties": {
          "department": {
            "title": "Department",
            "type": "string",
            "description": "One French department: a code such as \"69\", \"33\", \"2A\" or \"974\", or its name in French or English, e.g. \"Rhône\", \"Gironde\", \"Paris\", \"French Guiana\". Run once per department.",
            "default": "69"
          },
          "month": {
            "title": "Month",
            "type": "string",
            "description": "\"latest\" (default): the newest month SDES has published (read from the dataset metadata on every run; SDES publishes each month at the end of the following month). Or a month such as \"2026-07\" (January 2013 or later). This is the month the permit was recorded in Sitadel.",
            "default": "latest"
          },
          "months": {
            "title": "Number of months",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many months to include, ending with \"month\": 1 (default) = that month only, 3 = that month and the two before it. Rows from the newest published month have isNewThisMonth = true.",
            "default": 1
          },
          "commune": {
            "title": "Commune (town)",
            "type": "string",
            "description": "Only permits in this commune: its name (e.g. \"Villeurbanne\", \"Lyon\") or its 5-digit INSEE code or postcode (e.g. \"69266\"). Paris, Lyon and Marseille city codes (75056, 69123, 13055) include all their arrondissements. Leave empty for the whole department."
          },
          "permitCategory": {
            "title": "Permit category",
            "enum": [
              "all",
              "housing",
              "non-residential"
            ],
            "type": "string",
            "description": "\"all\" (default), \"housing\" (permits creating dwellings) or \"non-residential\" (offices, retail, warehouses, industry, hotels, farms, public facilities).",
            "default": "all"
          },
          "applicantTypes": {
            "title": "Applicant types",
            "type": "array",
            "description": "Only these applicant types, e.g. [\"property developer\", \"social landlord\"]. Values: property developer, social landlord, public body, semi-public company, construction company, property company or investor, farm or agricultural business, energy or utility, retailer, wholesaler, hotel or restaurant, health or social care, education, transport or logistics, manufacturer, non-profit, owners' association, other company. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minDwellings": {
            "title": "Minimum dwellings",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Only permits creating at least this many dwellings (0 = no minimum). For example 10 for apartment projects.",
            "default": 0
          },
          "minFloorAreaM2": {
            "title": "Minimum floor area (m²)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only permits creating at least this much floor area, housing plus non-residential, in square metres (0 = no minimum).",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of permit rows (each is charged). The largest projects (by floor area, then dwellings) come first.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}