{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Planning Applications Scraper",
    "description": "UK planning applications with the applicant and the agent / architect: London boroughs and every UK council. Filter by council, keyword, postcode, dates, status, size. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "nfO8ORaiXK3jU83TV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~uk-planning-applications-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-uk-planning-applications-scraper",
        "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/nice_dev~uk-planning-applications-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-uk-planning-applications-scraper",
        "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/nice_dev~uk-planning-applications-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-uk-planning-applications-scraper",
        "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": {
          "councils": {
            "title": "Councils",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Local planning authorities to search, by name: a London borough (`Lambeth`, `Greenwich`, `Ealing`, `City of London`…) or any other UK council (`Manchester`, `Leeds`, `Cornwall`…), in any usual spelling (`leeds`, `Leeds City Council`, `Stoke-on-Trent`). Empty = the 35 London planning authorities (32 boroughs, the City of London, OPDC and LLDC), so each keyword makes 35 searches (with **Data source** PlanIt only: the whole UK in one search). One search per council (times each keyword below, max 500).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Application URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Single applications to read directly: a council planning-portal page (`https://planning.lambeth.gov.uk/online-applications/applicationDetails.do?keyVal=TL68KZBOMUC00`, Idox Public Access) or a PlanIt application page (`https://www.planit.org.uk/planapplic/Lambeth/26/02618/FUL/`). A portal page gives the fields of its summary tab; tick **Read applicant and agent on the council portal** to also get the applicant, agent and case officer (charged on top). When this list is not empty, the search fields are ignored. Max 1 000 URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "query": {
            "title": "Keyword",
            "maxLength": 200,
            "type": "string",
            "description": "Words searched in the proposal text (e.g. `solar panels`, `basement`, `loft conversion`). Empty = every application."
          },
          "searchQueries": {
            "title": "More keywords",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several keywords in one run: one search per keyword (times each council). Added to **Keyword**; an application found by several searches is saved once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "source": {
            "title": "Data source",
            "enum": [
              "auto",
              "datahub",
              "planit"
            ],
            "type": "string",
            "description": "Where the list of applications comes from. `auto` = the Greater London Authority planning datahub for London boroughs (freshest, with UPRN, land-registry title, floor area and projected cost of works) and PlanIt for every other council.",
            "default": "auto"
          },
          "maxItems": {
            "title": "Max applications",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of applications to save for the whole run (after deduplication and filters). 0 = no limit.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max applications per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for EACH search (council × keyword), so that the first council cannot use up the whole **Max applications** budget. 0 = no per-search cap.",
            "default": 0
          },
          "extractDetails": {
            "title": "Read applicant and agent on the council portal",
            "type": "boolean",
            "description": "Open each application on the council's own planning portal (1 extra request, 2 when the portal has to be searched) for the applicant name and address, the agent / architect name, company and address, and the case officer. Charged on top of the application only when its council page was read (see Pricing). Off by default = list fields only (faster, cheaper): tick it to get the applicant, agent and case officer. Left off, an application pasted as a portal page gives its summary tab only: its applicant, agent and case officer stay empty (`detailsStatus` `off`).",
            "default": false
          },
          "extractAgentEmail": {
            "title": "Read the agent's e-mail on the council portal",
            "type": "boolean",
            "description": "Also open the application's Contacts tab on the council's portal (1 extra request per application) for the agent / architect's e-mail, and phone, where the council publishes them: Ealing, Greenwich, Lewisham, Cambridge and most councils outside London do; Lambeth, Brent, Tower Hamlets and Croydon do not. It is billed as its own event `agent-email`, at the price shown in Pricing, only for an application saved with an e-mail. Needs **Read applicant and agent on the council portal**. Off by default: each portal is read one page every 15 seconds, so it doubles the time a run takes.",
            "default": false
          },
          "extractDocuments": {
            "title": "Read the list of documents on the council portal",
            "type": "boolean",
            "description": "Also read the list of documents (plans, reports, decision notice) on the council portal: 1 extra page per application. Each document comes with its date, type, description and a link to the file. It is billed as its own event `document-list`, at the price shown in Pricing, only for an application saved with at least one document. Needs **Read applicant and agent on the council portal**. Off by default: each portal is read one page every 15 seconds, so each extra page adds to the time a run takes.",
            "default": false
          },
          "nearPostcode": {
            "title": "Postcode at the centre",
            "maxLength": 20,
            "type": "string",
            "description": "UK postcode at the centre of the circle, e.g. `SW1A 1AA` (capital letters and the space are optional). Use this OR **Latitude** and **Longitude**. An unknown postcode stops the run before any search."
          },
          "latitude": {
            "title": "Latitude",
            "minimum": 49,
            "maximum": 61,
            "type": "number",
            "description": "Latitude of the centre of the circle, between 49 and 61 (e.g. `51.5014`). Give it with **Longitude**, instead of a postcode."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -9,
            "maximum": 2,
            "type": "number",
            "description": "Longitude of the centre of the circle, between -9 and 2 (e.g. `-0.1416`). Give it with **Latitude**, instead of a postcode."
          },
          "radiusMeters": {
            "title": "Radius",
            "minimum": 50,
            "maximum": 20000,
            "type": "integer",
            "description": "Radius of the circle around the postcode or the coordinates, in metres (50 to 20 000). Used only when a centre is given.",
            "default": 1000
          },
          "references": {
            "title": "Application references",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Look up applications by the reference the council gave them, typed as the council writes it (e.g. `26/06078/ADFULL`). One search per reference (times each council in **Councils**; with no council, both the London datahub and PlanIt are asked). The validation dates below do not apply to them; the other filters do.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "uprns": {
            "title": "Property numbers (UPRN)",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Unique Property Reference Numbers (digits only, e.g. `100023336956`): every application on that property. London only (the London datahub); not available with **Data source** set to PlanIt only. The validation dates below do not apply to them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postedAfter": {
            "title": "Validated after",
            "type": "string",
            "description": "Only applications validated (registered) by the council on or after this date: `2026-09-01`, or a period before now such as `7 days`, `2 weeks`, `1 month`. Applications without a validation date are dropped."
          },
          "postedBefore": {
            "title": "Validated before",
            "type": "string",
            "description": "Only applications validated on or before this date (the whole day is included), or older than a period such as `30 days`."
          },
          "decidedAfter": {
            "title": "Decided after",
            "type": "string",
            "description": "Only applications decided on or after this date (or within a period such as `30 days`). Undecided applications are dropped. The date judged is the decision date of the list, else the portal's Decision Issued Date (an application pasted as a portal page has that one only)."
          },
          "decidedBefore": {
            "title": "Decided before",
            "type": "string",
            "description": "Only applications decided on or before this date (the whole day is included). Same date as **Decided after**: the decision date of the list, else the portal's Decision Issued Date."
          },
          "appState": {
            "title": "Status",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these outcomes. `Permitted` = approved (with or without conditions), `Rejected` = refused, `Undecided` = pending, `Withdrawn`, `Appeal` = under or after appeal, `Other` = not required, prior approval not needed, observations only, etc. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "Permitted",
                "Rejected",
                "Undecided",
                "Withdrawn",
                "Appeal",
                "Other"
              ],
              "enumTitles": [
                "Permitted",
                "Rejected",
                "Undecided (pending)",
                "Withdrawn",
                "Appeal",
                "Other"
              ]
            },
            "default": []
          },
          "appSize": {
            "title": "Development size",
            "uniqueItems": true,
            "type": "array",
            "description": "`Large` = major development (10 or more dwellings, or 1 000 m² or more of new floor space), `Small` = householder application, `Medium` = everything else (London). Outside London the size is the one PlanIt gives, and PlanIt calls most applications `Small`. Empty = all sizes.",
            "items": {
              "type": "string",
              "enum": [
                "Large",
                "Medium",
                "Small"
              ],
              "enumTitles": [
                "Large (major)",
                "Medium (minor)",
                "Small (householder)"
              ]
            },
            "default": []
          },
          "appTypes": {
            "title": "Application types",
            "maxItems": 30,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only applications whose type contains one of these words (e.g. `Full`, `Outline`, `Listed`, `Prior Approval`, `Householder`, `Advertisement`, `Trees`). Case ignored. Empty = all types.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "Postcodes",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only sites inside one of these postcode areas: area (`E`, `SW`), district (`SW1`, `E14`), sector (`SW1A 1`) or full postcode (`SW1A 1AA`). A district also covers its sub-districts (`SW1` includes `SW1A` to `SW1Y`) but never another district (`E1` does not include `E14`), and an area never another area (`E` does not include `EC1A`). Empty = anywhere in the councils searched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minDwellings": {
            "title": "Min new dwellings",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Keep only applications that propose at least this many new homes (when the source gives the number). 0 = no minimum.",
            "default": 0
          },
          "onlyWithAgentContact": {
            "title": "Only with an agent / applicant",
            "type": "boolean",
            "description": "Keep only applications for which an agent company, agent name or applicant name was found. Needs **Read applicant and agent on the council portal** (`extractDetails`): without it this filter is ignored and every application is delivered.",
            "default": false
          },
          "applicantOrAgent": {
            "title": "Applicant or agent contains",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep applications whose applicant or agent (name or company) contains one of these words (case and accents ignored), e.g. `Savills`, `Barratt`. Needs **Read applicant and agent on the council portal** (`extractDetails`): refused without it. In London the applicant and the agent are on the council page only, so the council page of every application of the search is read to check them. An application whose council page could not be read (portal not supported or not reachable) has no applicant or agent and is not delivered. Outside London the PlanIt search already asks for these names.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Drop the applications whose proposal text contains one of these words (case and accents ignored), e.g. `tree`, `advertisement`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new applications",
            "type": "boolean",
            "description": "Skip the applications that a previous run (same **Memory key**) already delivered: they are not saved and not charged, and their portal page is not even opened. First run = everything is new.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new applications**. Give each schedule / task its own key (e.g. `westminster-weekly`) so that they do not share their memory. Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every application again. Untick it afterwards.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxies. Keep the default: it is included in the price, and the 15 London Idox portals and Leeds are read with it. The Northgate portal of Hounslow did not answer at the last check: its applications are saved without applicant and agent (`detailsStatus: \"portal_unreachable\"`). Your own proxies (`proxyUrls`) carry every page of the run: take them in the UK or in Europe, since 7 London council portals (Westminster, Barnet, Bexley, Kingston, Newham, Southwark, Sutton) refuse addresses from other countries. The residential Apify proxy is not available in this Actor.",
            "default": {
              "useApifyProxy": true
            }
          },
          "portalMinIntervalSecs": {
            "title": "Min delay per council portal",
            "minimum": 3,
            "maximum": 120,
            "type": "integer",
            "description": "Smallest gap between two requests to the SAME council portal, in seconds (portals are read one request at a time; different councils are read in parallel). Council portals block an address for an hour when it reads too fast: measured on 26/09/2026, Westminster after 26 pages in 2.5 minutes, Barnet after 28 pages in 4 minutes.",
            "default": 15
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of requests processed in parallel (all sources together).",
            "default": 8
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Most requests in any 60 seconds, all sources counted. A budget, not an even pace: spread them with the delays.",
            "default": 120
          },
          "minRequestIntervalMs": {
            "title": "Min delay between requests",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Smallest gap between two requests of any source, in milliseconds. 0 = no gap (council portals keep their own delay above).",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries per request before it is marked as failed. Behind a proxy, a request a portal turns away is also retried on a new proxy session up to 10 times without using up these retries. Without a proxy, a council portal that answers « Temporary Block » is not asked again: its remaining applications are saved without portal details.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Include debug messages in the run log.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}