{
  "openapi": "3.0.1",
  "info": {
    "title": "Building Permits API — France, NSW Australia & Far North NZ",
    "description": "Get building permits and planning applications for property research and local project tracking. Covers France (SDES), NSW Australia and Far North New Zealand. Filter by area and dates; export CSV or JSON with source attribution.",
    "version": "0.0",
    "x-build-id": "eBg8AdYPvOvmGlwP1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gaelasao~planning-data-au-nz-fr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gaelasao-planning-data-au-nz-fr",
        "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/gaelasao~planning-data-au-nz-fr/runs": {
      "post": {
        "operationId": "runs-sync-gaelasao-planning-data-au-nz-fr",
        "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/gaelasao~planning-data-au-nz-fr/run-sync": {
      "post": {
        "operationId": "run-sync-gaelasao-planning-data-au-nz-fr",
        "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": {
          "country": {
            "title": "Country",
            "enum": [
              "AU",
              "NZ",
              "FR"
            ],
            "type": "string",
            "description": "Select the source country. Initial coverage is NSW for Australia, Far North for New Zealand and the selected SDES datasets for France.",
            "default": "FR"
          },
          "maxResults": {
            "title": "Maximum output records",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Start with 10 records (about $0.05 plus the start event at 512 MB). For a larger export, raise this and your maximum cost per run: about $0.005 per record. This cap is shared across selected sources.",
            "default": 10
          },
          "dateFrom": {
            "title": "Date from (inclusive)",
            "type": "string",
            "description": "Optional YYYY-MM-DD start date, inclusive. Leave blank for the 90 days before the end date. France uses the authorisation date by default; NSW and Far North use the application date."
          },
          "dateTo": {
            "title": "Date to (inclusive)",
            "type": "string",
            "description": "Optional YYYY-MM-DD end date, inclusive. Leave blank for today in UTC (NSW, Far North) or, for France, the coverage end of the latest monthly SDES file. France rows dated after that file's publication are not queried."
          },
          "departmentCodes": {
            "title": "France: department codes",
            "type": "array",
            "description": "For example 69, 2A or 971. Max 20. AND with communeCodes if both are supplied.",
            "items": {
              "type": "string"
            }
          },
          "communeCodes": {
            "title": "France: INSEE commune codes",
            "type": "array",
            "description": "Exact codes, for example 69123 (Lyon). Max 20. Only for France.",
            "items": {
              "type": "string"
            }
          },
          "councils": {
            "title": "NSW: exact council names",
            "type": "array",
            "description": "For example Council of the City of Sydney or The Hills Shire Council. Max 5, OR between councils. Names are validated against the source's lookup.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "AU/NZ: project keywords",
            "type": "array",
            "description": "Case-insensitive substrings in project/type fields; OR between keywords. Applied locally within date/area filters. Rare keywords can reach the request cap. Unsupported for France.",
            "items": {
              "type": "string"
            }
          },
          "sourceIds": {
            "title": "Sources (optional)",
            "type": "array",
            "description": "Leave blank to use the country's default. France: fr-sdes-housing, fr-sdes-nonresidential, fr-sdes-development, fr-sdes-demolition. Australia: au-nsw-tracker. NZ: nz-fndc-building. Max 4, processed in order.",
            "items": {
              "type": "string"
            }
          },
          "dateField": {
            "title": "Date meaning",
            "enum": [
              "source_default",
              "submitted",
              "decided",
              "issued"
            ],
            "type": "string",
            "description": "Choose the event date used by the period filter. A submission, a decision and an issued authorisation are different events. Unsupported source/date combinations are rejected.",
            "default": "source_default"
          },
          "maxRequests": {
            "title": "Maximum source HTTP requests (optional)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Leave empty: the Actor sizes requests from maxResults, including metadata and retries. A value here is a hard cap; reaching it ends the run successfully with a status message. Not a monetary spending cap."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}