{
  "openapi": "3.0.1",
  "info": {
    "title": "London Planning Applications & Development Pipeline",
    "description": "Search planning applications in all 33 London boroughs from the GLA's official Planning London Datahub. Get decisions, homes, affordable homes, floorspace, storeys, cost, developer and build dates. Filter by borough, date, status, size, keyword, postcode or radius. No personal data.",
    "version": "0.1",
    "x-build-id": "gvcrBJIsZxAFlQ9ne"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sweet-orb~london-planning-applications/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sweet-orb-london-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/sweet-orb~london-planning-applications/runs": {
      "post": {
        "operationId": "runs-sync-sweet-orb-london-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/sweet-orb~london-planning-applications/run-sync": {
      "post": {
        "operationId": "run-sync-sweet-orb-london-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": {
          "boroughs": {
            "title": "Planning authorities (boroughs)",
            "type": "array",
            "description": "Only return applications handled by these local planning authorities. Leave empty for all of London. Values are exact Datahub names, e.g. \"Newham\", \"Tower Hamlets\", \"Kensington & Chelsea\". LLDC = London Legacy Development Corporation, OPDC = Old Oak and Park Royal Development Corporation, OSDC = Oxford Street Development Corporation.",
            "items": {
              "type": "string",
              "enum": [
                "Barking & Dagenham",
                "Barnet",
                "Bexley",
                "Brent",
                "Bromley",
                "Camden",
                "City of London",
                "Croydon",
                "Ealing",
                "Enfield",
                "Greenwich",
                "Hackney",
                "Hammersmith & Fulham",
                "Haringey",
                "Harrow",
                "Havering",
                "Hillingdon",
                "Hounslow",
                "Islington",
                "Kensington & Chelsea",
                "Kingston",
                "Lambeth",
                "Lewisham",
                "Merton",
                "Newham",
                "Redbridge",
                "Richmond",
                "Southwark",
                "Sutton",
                "Tower Hamlets",
                "Waltham Forest",
                "Wandsworth",
                "Westminster",
                "LLDC",
                "OPDC",
                "OSDC"
              ]
            }
          },
          "keywords": {
            "title": "Keywords (any of)",
            "type": "array",
            "description": "Return applications whose description, site name or scheme name contains ANY of these phrases (case-insensitive, whole-phrase match). Examples: \"student accommodation\", \"data centre\", \"demolition\", \"solar\", \"hotel\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop applications whose description, site name or scheme name contains any of these phrases. Example: \"tree works\", \"advertisement\", \"discharge of condition\".",
            "items": {
              "type": "string"
            }
          },
          "dateFilterOn": {
            "title": "Date to filter on",
            "enum": [
              "validated",
              "decided",
              "updated"
            ],
            "type": "string",
            "description": "Which date \"dateFrom\" and \"dateTo\" apply to. \"validated\" = date the council validated (registered) the application, best for new-application alerts. \"decided\" = decision date, best for recent approvals or refusals. \"updated\" = last time the record changed in the Datahub, best for incremental syncs.",
            "default": "validated"
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+\\s*(day|days|week|weeks|month|months|year|years)(\\s+ago)?)$",
            "type": "string",
            "description": "Earliest date, inclusive. Use YYYY-MM-DD (e.g. \"2026-01-01\") or a relative period meaning 'ago' (e.g. \"7 days\", \"6 months\", \"2 years\"). Default: \"30 days\". Records go back to 2004."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+\\s*(day|days|week|weeks|month|months|year|years)(\\s+ago)?)$",
            "type": "string",
            "description": "Latest date, inclusive, as YYYY-MM-DD or a relative period meaning 'ago'. Default: today."
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Only return applications in these normalised status groups. pending = received or under consideration; approved = approved, or allowed on appeal; refused = refused, or appeal dismissed; appeal = appeal in progress; commenced / completed = construction started or finished; lapsed = permission expired. Leave empty for any status.",
            "items": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "refused",
                "withdrawn",
                "appeal",
                "commenced",
                "completed",
                "lapsed"
              ]
            }
          },
          "applicationTypes": {
            "title": "Application types",
            "type": "array",
            "description": "full = all full, outline, reserved-matters, listed-building, change-of-use and other non-householder applications; priorApproval = permitted-development prior approvals (e.g. office-to-residential); householder = extensions and alterations to single homes. Default: full + priorApproval (householder applications are excluded unless you add them).",
            "items": {
              "type": "string",
              "enum": [
                "full",
                "priorApproval",
                "householder"
              ],
              "enumTitles": [
                "Full / other (non-householder)",
                "Prior approval",
                "Householder"
              ]
            },
            "default": [
              "full",
              "priorApproval"
            ]
          },
          "minProposedHomes": {
            "title": "Minimum proposed homes",
            "minimum": 0,
            "type": "integer",
            "description": "Only return schemes proposing at least this many residential units (C3 homes). Example: 10 for 'major' housing schemes, 150 for referable schemes. Only applications made through the national Planning Portal carry this figure."
          },
          "minFloorspaceGainedSqm": {
            "title": "Minimum floorspace gained (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return applications that add at least this much gross internal floorspace in square metres, across all uses. Example: 1000 for 'major' commercial schemes."
          },
          "costBands": {
            "title": "Projected cost of works",
            "type": "array",
            "description": "Only return applications in these construction-cost bands, as declared on the application form.",
            "items": {
              "type": "string",
              "enum": [
                "Up to £2m",
                "Between £2m and £100m",
                "Over £100m"
              ]
            }
          },
          "onlyWithDevelopmentDetails": {
            "title": "Only applications with development details",
            "type": "boolean",
            "description": "If true, skip applications that have no structured development data (homes, floorspace, storeys, cost band, phasing). Useful for construction-lead and pipeline analysis.",
            "default": false
          },
          "postcodes": {
            "title": "Postcodes or postcode districts",
            "type": "array",
            "description": "Only return applications at these full postcodes (e.g. \"E15 2GW\") or in these postcode districts (outward codes, e.g. \"E15\", \"SE1\"). Matches any.",
            "items": {
              "type": "string"
            }
          },
          "nearLatitude": {
            "title": "Near latitude",
            "type": "number",
            "description": "Latitude (WGS84) of a London point. Use together with nearLongitude and radiusMeters to get applications around a site, e.g. 51.5416."
          },
          "nearLongitude": {
            "title": "Near longitude",
            "type": "number",
            "description": "Longitude (WGS84) of a London point, e.g. -0.0098."
          },
          "radiusMeters": {
            "title": "Radius (metres)",
            "minimum": 10,
            "maximum": 50000,
            "type": "integer",
            "description": "Search radius around nearLatitude/nearLongitude, 10–50,000 metres. Default 500.",
            "default": 500
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "mostHomes",
              "largestFloorspace"
            ],
            "type": "string",
            "description": "newest / oldest = by the date chosen in \"dateFilterOn\"; mostHomes = largest housing schemes first; largestFloorspace = most floorspace gained first.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many applications. You are charged per application returned, so keep this low for exploratory or agent queries. 1–50,000.",
            "default": 100
          },
          "includeGeometry": {
            "title": "Include site boundary polygon",
            "type": "boolean",
            "description": "Add the site boundary as a GeoJSON polygon (WGS84) in the \"geometry\" field. Makes records larger.",
            "default": false
          },
          "includeFullDetails": {
            "title": "Include full development details",
            "type": "boolean",
            "description": "Add the complete raw Datahub \"application_details\" object (unit mix, tenures, parking, energy, open space, phasing and more) in \"developmentDetails\". Makes records much larger.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}