{
  "openapi": "3.0.1",
  "info": {
    "title": "Building Permits API: US Construction Leads, France, NSW, NZ",
    "description": "Construction leads from building permits and planning applications: 18 US cities (NYC, Los Angeles, Chicago, Philadelphia, Boston, Dallas, Seattle, Austin, Pittsburgh, Orlando…) with value, contractor; Canada (Calgary, Edmonton); Ireland; France permis de construire; NSW development applications.",
    "version": "0.0",
    "x-build-id": "fxhBagZ4n5Ya8oKCf"
  },
  "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": [
              "US",
              "FR",
              "AU",
              "NZ"
            ],
            "type": "string",
            "description": "Select the source country. United States covers 12 city and county portals; Australia covers NSW; New Zealand covers Far North; France covers the selected SDES datasets.",
            "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 and the US use the authorisation or issue 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 (US, 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."
          },
          "zipCodes": {
            "title": "US: ZIP codes",
            "type": "array",
            "description": "Five-digit ZIP codes, for example 10001 or 78701. Max 20, OR between codes. Filtered by the city portal. Not available for Chicago, Orlando, New Orleans and Mesa, whose datasets have no ZIP code.",
            "items": {
              "type": "string"
            }
          },
          "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": "US/AU/NZ: project keywords",
            "type": "array",
            "description": "Case-insensitive words in the project description; OR between keywords. US portals filter them at the source (for example solar, roof, ADU, pool). In AU/NZ they are applied locally within date/area filters, so 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. US: us-nyc-dob, us-la-building, us-chicago-building, us-dallas-building, us-seattle-building, us-austin-building, us-orlando-building, us-new-orleans-building, us-cincinnati-building, us-mesa-building, us-baton-rouge-building, us-montgomery-md-residential, us-montgomery-md-commercial. France: fr-sdes-housing, fr-sdes-nonresidential, fr-sdes-development, fr-sdes-demolition. Australia: au-nsw-tracker. NZ: nz-fndc-building. Max 5, processed in order; maxResults is shared across them.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}