{
  "openapi": "3.0.1",
  "info": {
    "title": "NSW DA leads: development applications and certificates",
    "description": "Official NSW DA leads from the Planning Portal open APIs: development applications, complying development certificates, and construction certificates. Filter by council, job size, and date. For builders, trades, and suppliers.",
    "version": "0.1",
    "x-build-id": "FNm3M6MFPUfV7CuoA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrewlonie~nsw-planning-application-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrewlonie-nsw-planning-application-leads",
        "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/andrewlonie~nsw-planning-application-leads/runs": {
      "post": {
        "operationId": "runs-sync-andrewlonie-nsw-planning-application-leads",
        "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/andrewlonie~nsw-planning-application-leads/run-sync": {
      "post": {
        "operationId": "run-sync-andrewlonie-nsw-planning-application-leads",
        "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": {
          "sources": {
            "title": "Sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Which official feeds to read. Use DA for development applications (OnlineDA), CDC for complying development certificates (OnlineCDC), and CC for construction certificates (OnlineCC).",
            "items": {
              "type": "string"
            },
            "default": [
              "DA",
              "CDC",
              "CC"
            ]
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Used only when both lodgement dates and both determination dates are empty. The run then requests applications lodged on today or the previous days in Australia/Sydney, including today.",
            "default": 7
          },
          "lodgementDateFrom": {
            "title": "Lodgement date from",
            "type": "string",
            "description": "First lodgement day, YYYY-MM-DD. Sent as LodgementDateFrom. Leave empty to use lookback days, unless a determination window is set.",
            "default": ""
          },
          "lodgementDateTo": {
            "title": "Lodgement date to",
            "type": "string",
            "description": "Last lodgement day, YYYY-MM-DD, inclusive. Sent as LodgementDateTo.",
            "default": ""
          },
          "determinationDateFrom": {
            "title": "Determination date from",
            "type": "string",
            "description": "First determination day, YYYY-MM-DD. Sent as DeterminationDateFrom. When this or the end date is set and lodgement dates are empty, lookback days are not applied.",
            "default": ""
          },
          "determinationDateTo": {
            "title": "Determination date to",
            "type": "string",
            "description": "Last determination day, YYYY-MM-DD, inclusive. Sent as DeterminationDateTo. Confirmed on OnlineDA, OnlineCDC, and OnlineCC.",
            "default": ""
          },
          "submissionDateFrom": {
            "title": "Submission date from",
            "type": "string",
            "description": "First submission day, YYYY-MM-DD, inclusive. Sent as SubmissionDateFrom on all three feeds. OnlineCC matches this against DateSubmitted. When this or the end date is set and no lodgement or determination window is set, lookback days are not applied.",
            "default": ""
          },
          "submissionDateTo": {
            "title": "Submission date to",
            "type": "string",
            "description": "Last submission day, YYYY-MM-DD, inclusive. Sent as SubmissionDateTo.",
            "default": ""
          },
          "applicationLastUpdatedFrom": {
            "title": "Changed since",
            "type": "string",
            "description": "Changed-since day, YYYY-MM-DD. Sent as ApplicationLastUpdatedFrom. On 30 November 2026 this reduced the DA feed from the full corpus to applications whose DateLastUpdated is on or after that day (16,869 since 1 November, 975 since 28 November). DateLastUpdatedFrom is ignored and is not sent. When this is set and no lodgement, submission, or determination window is set, lookback days are not applied.",
            "default": ""
          },
          "applicationLastUpdatedTo": {
            "title": "Changed until",
            "type": "string",
            "description": "Last changed day, YYYY-MM-DD, inclusive. The API treats ApplicationLastUpdatedTo as an exclusive end, and a same-day from/to returns no rows, so the Actor sends the next day and then keeps rows whose DateLastUpdated falls on or before this day. An end date without a start date is applied after download inside the lodgement window, because To alone barely narrows the feed.",
            "default": ""
          },
          "developmentCategories": {
            "title": "Development categories",
            "type": "array",
            "description": "Dictionary DevelopmentCategory values: Residential, Commercial, Industrial, Recreational, or Other. Sent as an array for OnlineDA and OnlineCDC. Residential, Commercial, Industrial, and Other reduced the DA count. Recreational returned no DA rows from June to November 2026. OnlineCC returns zero rows for every category and has no category field, so construction certificates are not filtered by category.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "planningPortalApplicationNumbers": {
            "title": "Portal application numbers",
            "type": "array",
            "description": "PlanningPortalApplicationNumber values, such as PAN-683804, CDC-380830, or CFT-1039664. Sent as an array. A two-number DA query returned exactly those two applications. This replaces the lodgement lookback.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "councilApplicationNumbers": {
            "title": "Council application numbers",
            "type": "array",
            "description": "CouncilApplicationNumber values. Sent as an array for OnlineDA, where one number returned that application. OnlineCDC and OnlineCC do not have this field, so those rows are dropped when the filter is set.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "councilNames": {
            "title": "Council names",
            "type": "array",
            "description": "Matched against the official CouncilName, case-insensitively. An exact name, or a phrase of at least 6 characters contained in the name, is kept. One value that contains the word Council is also sent as CouncilName. Use the portal's name, for example Council of the City of Sydney, not City of Sydney.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "statuses": {
            "title": "Statuses",
            "type": "array",
            "description": "ApplicationStatus values. The DA data dictionary enum is Additional Information Requested, Determined, Pending lodgement, Rejected, Pending Court Appeal, Under Assessment, Withdrawn, Deferred Commencement, and On Exhibition. OnlineCDC and OnlineCC also use Approved, Submitted, and Cancelled. One or more values are sent as an array. Matching is case-insensitive, so Pending lodgement also matches Pending Lodgement.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "applicationTypes": {
            "title": "Application types",
            "type": "array",
            "description": "Matched when the official ApplicationType contains the text, for example Development Application or Modification. A single value is also sent as ApplicationType. OnlineCC often omits ApplicationType.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "suburbs": {
            "title": "Suburbs",
            "type": "array",
            "description": "Applied after download. The API ignores a Suburb filter and returns the whole date window. Matching is case-insensitive against any site on the application.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "postcodes": {
            "title": "Postcodes",
            "type": "array",
            "description": "Applied after download. A Postcode header is ignored by the API. Digits are compared, so 2000 and NSW 2000 match the same site.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Applied after download. A record is kept when any keyword appears in the development type, address, status, council, building use, or builder legal name. Builder legal name can be a sole trader's personal name.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minCost": {
            "title": "Minimum cost of development",
            "minimum": 0,
            "type": "number",
            "description": "Keep applications whose CostOfDevelopment is at least this many Australian dollars. Also sent as CostOfDevelopmentFrom. Records with no cost are dropped when this is set. Leave empty to ignore."
          },
          "maxCost": {
            "title": "Maximum cost of development",
            "minimum": 0,
            "type": "number",
            "description": "CostOfDevelopmentTo. Keep applications whose official cost is at most this many Australian dollars. Confirmed to narrow OnlineDA, OnlineCDC, and OnlineCC. Records with no cost are dropped. Leave empty to ignore."
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many saved applications across all sources. 0 means no total cap, other than the per-source cap and the page cap.",
            "default": 30
          },
          "maxRecordsPerSource": {
            "title": "Maximum records per source",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each of DA, CDC, and CC after this many saved applications. 0 means no per-source cap.",
            "default": 10
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "PageSize header. The live API accepts at least 1 to 1000. A run whose filters are all applied by the API asks for just enough rows to fill the caps. Suburb, postcode, keyword, a partial council name, and more than one application type scan full pages.",
            "default": 100
          },
          "maxPagesPerSource": {
            "title": "Maximum pages per source",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap so a wide date range cannot walk the whole feed. The run summary says when this cap stopped a source early.",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause between API calls. The department does not publish a rate limit. The default is a conservative starting point, not a measured quota.",
            "default": 300
          },
          "incremental": {
            "title": "Incremental dedupe",
            "type": "boolean",
            "description": "Skip an application already saved with the same status and last-updated time. A later status or update is saved again. State is kept in the named key-value store, not in the run's default store.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used when incremental dedupe is on. The seen set is the SEEN record.",
            "default": "nsw-planning-leads-state"
          },
          "includeRaw": {
            "title": "Include official payload",
            "type": "boolean",
            "description": "Add the official API object as raw. Keys that look like email, phone, applicant, or contact details are removed. BuilderLegalName is kept and can be a sole trader's personal name.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}