{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Planning Applications & Site Constraints (Planning Data)",
    "description": "Read the UK Planning Data register: planning applications with reference, site address, coordinates, proposal, decision and decision date, plus the designations covering a site — conservation area, article 4, listed building outline, flood risk zone. Filter by council, radius, text or date.",
    "version": "0.1",
    "x-build-id": "44hE1pBHL1vmjrU6d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~uk-planning-applications/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-uk-planning-applications",
        "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/yadroo~uk-planning-applications/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-uk-planning-applications",
        "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/yadroo~uk-planning-applications/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-uk-planning-applications",
        "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": {
          "mode": {
            "title": "What to fetch",
            "enum": [
              "applications",
              "constraints"
            ],
            "type": "string",
            "description": "`applications` reads the planning-application dataset (reference, proposal, address, decision). `constraints` asks which designations cover a coordinate — conservation areas, article 4 directions, listed building outlines, flood risk zones and the other datasets picked below.",
            "default": "applications"
          },
          "council": {
            "title": "Council",
            "type": "string",
            "description": "Local authority whose applications you want, by name or by its short code (\"Camden\", \"London Borough of Camden\", \"CMD\"). The name is matched against the platform's local-authority register; an unknown or ambiguous name ends the run with the candidates listed. Empty = every council the register holds. Ignored in `constraints` mode."
          },
          "latitude": {
            "title": "Latitude",
            "minimum": 49.5,
            "maximum": 61,
            "type": "number",
            "description": "WGS84 latitude of the site. With `longitude` it filters applications to the circle set by `radiusMeters`; in `constraints` mode it is the point that is tested. Required for `constraints`."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -9,
            "maximum": 2.5,
            "type": "number",
            "description": "WGS84 longitude of the site, negative west of Greenwich. Required together with `latitude`."
          },
          "radiusMeters": {
            "title": "Radius around the point (m)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Size of the circle drawn around the coordinate. 0 in `constraints` mode tests the exact point (\"is this spot inside a conservation area?\"); above 0 it returns every designation the circle touches. In `applications` mode 0 is treated as 1000.",
            "default": 1000
          },
          "datasets": {
            "title": "Designation datasets",
            "type": "array",
            "description": "Which designation datasets `constraints` asks about. Empty = the six everyday planning ones: conservation area, article 4 direction, listed building outline, tree preservation zone, flood risk zone, green belt. Not every council has published every layer — a dataset with no row at your point simply returns nothing.",
            "items": {
              "type": "string",
              "enum": [
                "conservation-area",
                "article-4-direction-area",
                "listed-building-outline",
                "tree-preservation-zone",
                "scheduled-monument",
                "world-heritage-site",
                "site-of-special-scientific-interest",
                "flood-risk-zone",
                "green-belt",
                "ancient-woodland",
                "brownfield-land",
                "national-park",
                "area-of-outstanding-natural-beauty",
                "local-authority-district"
              ],
              "enumTitles": [
                "Conservation area",
                "Article 4 direction area",
                "Listed building outline",
                "Tree preservation zone",
                "Scheduled monument",
                "World heritage site",
                "Site of special scientific interest",
                "Flood risk zone",
                "Green belt",
                "Ancient woodland",
                "Brownfield land",
                "National park",
                "National landscape (AONB)",
                "Local authority district"
              ]
            }
          },
          "textContains": {
            "title": "Proposal or address contains",
            "type": "string",
            "description": "Keep applications whose proposal text or site address contains this text, case-insensitive: \"solar\", \"loft conversion\", \"change of use\", a street name or a postcode such as \"BN43\". The register has no text search of its own, so the filter is applied to the rows this run reads — raise `maxScanRows` to look deeper, and see README → Limits."
          },
          "decisionContains": {
            "title": "Decision contains",
            "type": "string",
            "description": "Keep applications whose decision wording contains this text, case-insensitive: \"granted\", \"refused\", \"approve\", \"withdrawn\", \"delegated\". Councils word decisions differently — Camden writes \"Granted\"/\"Refused\", Adur and Worthing write \"Approve\" plus a route such as \"Delegated\". Both fields are searched."
          },
          "decisionDateFrom": {
            "title": "Decided from (inclusive)",
            "type": "string",
            "description": "Earliest decision date, YYYY-MM-DD. Applied to the rows the run reads (`maxScanRows`), because the API cannot filter on decision date."
          },
          "decisionDateTo": {
            "title": "Decided to (inclusive)",
            "type": "string",
            "description": "Latest decision date, YYYY-MM-DD."
          },
          "reference": {
            "title": "Application reference",
            "type": "string",
            "description": "Exact council reference of one application, e.g. \"2011/0724/C\" (Camden) or \"AWDM/1227/21\" (Adur). Matched by the API, so it is the cheapest way to resolve a single application; other filters still apply."
          },
          "entryDateSince": {
            "title": "Added to the platform since",
            "type": "string",
            "description": "Keep rows the platform loaded on or after this date, YYYY-MM-DD. This is the load date of the record, not the date the application was submitted or decided — the register is republished in batches."
          },
          "onlyNew": {
            "title": "Only rows not seen before",
            "type": "boolean",
            "description": "Remember the entity ids of this actor's previous runs in its key-value store and output only ids that were not there before. Useful for a scheduled task that keeps a copy of a council in sync. The first run outputs everything it finds.",
            "default": false
          },
          "maxScanRows": {
            "title": "Max rows to read from the register",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on the rows the run pulls from the API before the text, decision and date filters are applied (500 per request). Raise it for a keyword search over a large council, lower it to keep a run short. The run status and the SUMMARY record say how many rows were read and whether the cap stopped the scan.",
            "default": 5000
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "sourceOrder",
              "decisionDateDesc",
              "decisionDateAsc"
            ],
            "type": "string",
            "description": "The API has no sort parameter, so sorting is applied to the rows this run collected — with a scan cap, \"newest decision first\" means newest among the rows read, not newest in the whole register.",
            "default": "sourceOrder"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many output rows.",
            "default": 25
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Keep only these output fields, in this order, e.g. [\"reference\", \"address\", \"decision\", \"decisionDate\"]. Empty = every field of the mode.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}