{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Planning Scraper [$5/1k💰] | Council Applications & Leads",
    "description": "Scrape UK planning applications from all 417 councils via PlanIt or single Idox PublicAccess portals: reference, address, proposal, status, applicant and agent data for pre-market development leads. From $0.005 per application.",
    "version": "0.0",
    "x-build-id": "R8gHsllJEdIF7ZQLo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~uk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-uk-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/ahmed_jasarevic~uk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-uk-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/ahmed_jasarevic~uk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-uk-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": {
          "source": {
            "title": "Data source",
            "enum": [
              "idox",
              "planit"
            ],
            "type": "string",
            "description": "idox: scrape a single council Idox PublicAccess portal directly (deepest data, documents). planit: nationwide sweep of all ~417 UK planning authorities via the PlanIt aggregator — ideal for 'all councils' runs.",
            "default": "idox"
          },
          "portalUrl": {
            "title": "Council planning portal URL",
            "type": "string",
            "description": "Required for 'Council portal (Idox)' source. Base URL of the council's planning portal (Idox PublicAccess). Example: https://publicaccess.leeds.gov.uk/online-applications. To find yours, search '<council name> planning applications public access'."
          },
          "councilName": {
            "title": "Council name",
            "type": "string",
            "description": "Optional label for the Idox source, included in every output row. In PlanIt mode the council is taken automatically from the data."
          },
          "authorities": {
            "title": "Councils / planning authorities (PlanIt)",
            "type": "array",
            "description": "Restrict the nationwide (PlanIt) sweep to these councils by name (e.g. Leeds, Cornwall, Wiltshire, Birmingham). Leave empty for ALL ~417 UK councils.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords (PlanIt)",
            "type": "array",
            "description": "Free-text terms matched against the application description and type (e.g. 'solar', 'extension', 'wind turbine'). Each keyword runs its own search. Leave empty to return everything.",
            "items": {
              "type": "string"
            }
          },
          "appType": {
            "title": "Application type (PlanIt)",
            "enum": [
              "",
              "Full",
              "Outline",
              "Amendment",
              "Conditions",
              "Trees",
              "Advertising",
              "Heritage",
              "Listed",
              "Telecoms",
              "Certificate",
              "Other"
            ],
            "type": "string",
            "description": "One application type (PlanIt classification). Allowed: Full, Outline, Amendment, Conditions, Trees, Advertising, Heritage, Listed, Telecoms, Certificate, Other. Leave empty for all."
          },
          "appState": {
            "title": "Application state (PlanIt)",
            "enum": [
              "",
              "Undecided",
              "Permitted",
              "Rejected",
              "Withdrawn",
              "Conditions",
              "Referred",
              "Unresolved",
              "Other"
            ],
            "type": "string",
            "description": "One decision state (PlanIt classification). Allowed: Undecided, Permitted, Rejected, Withdrawn, Conditions, Referred, Unresolved, Other. Leave empty for all."
          },
          "appSize": {
            "title": "Application size (PlanIt)",
            "enum": [
              "",
              "Small",
              "Medium",
              "Large"
            ],
            "type": "string",
            "description": "One size band (PlanIt classification): Small, Medium, Large. Leave empty for all."
          },
          "recentDays": {
            "title": "Only applications from the last N days (PlanIt)",
            "minimum": 0,
            "type": "integer",
            "description": "Fast path for daily monitoring — only applications validated ('start_date') in the last N days. Leave empty to use a date range or return everything."
          },
          "startDate": {
            "title": "Date from YYYY-MM-DD (PlanIt)",
            "type": "string",
            "description": "Only applications validated on/after this date. Format YYYY-MM-DD. Ignored when 'last N days' is set."
          },
          "endDate": {
            "title": "Date to YYYY-MM-DD (PlanIt)",
            "type": "string",
            "description": "Only applications validated on/before this date. Format YYYY-MM-DD. Ignored when 'last N days' is set."
          },
          "caseType": {
            "title": "Development type (Idox case type code)",
            "type": "string",
            "description": "Idox only. Filter by application type code. Common codes: FU (Full Planning Application), OT (Outline), RM (Reserved Matters), LI (Listed Building), DHH (Householder), COND (Discharge of Conditions), ADV (Adverts), TR (Tree Works), MOD (Non-material amendment). Leave empty for all types."
          },
          "caseStatus": {
            "title": "Status (Idox)",
            "enum": [
              "",
              "Current",
              "Decided",
              "Unknown"
            ],
            "type": "string",
            "description": "Idox only. Filter by application status."
          },
          "caseDecision": {
            "title": "Decision (Idox)",
            "type": "string",
            "description": "Idox only. Filter by decision code. Common codes: A (Approved), R (Refused), GRA (Granted), REF (Refused). Leave empty for all decisions."
          },
          "validatedFrom": {
            "title": "Validated from DD/MM/YYYY (Idox)",
            "type": "string",
            "description": "Idox only. Earliest application validated date, format DD/MM/YYYY."
          },
          "validatedTo": {
            "title": "Validated to DD/MM/YYYY (Idox)",
            "type": "string",
            "description": "Idox only. Latest application validated date, format DD/MM/YYYY."
          },
          "decisionFrom": {
            "title": "Decision date from DD/MM/YYYY (Idox)",
            "type": "string",
            "description": "Idox only. Earliest decision date, format DD/MM/YYYY."
          },
          "decisionTo": {
            "title": "Decision date to DD/MM/YYYY (Idox)",
            "type": "string",
            "description": "Idox only. Latest decision date, format DD/MM/YYYY."
          },
          "address": {
            "title": "Address keyword (Idox)",
            "type": "string",
            "description": "Idox only. Search by address keyword."
          },
          "description": {
            "title": "Proposal keyword (Idox)",
            "type": "string",
            "description": "Idox only. Search by proposal/description keyword."
          },
          "applicantName": {
            "title": "Applicant name (Idox)",
            "type": "string",
            "description": "Idox only. Search by applicant name."
          },
          "agent": {
            "title": "Agent name (Idox)",
            "type": "string",
            "description": "Idox only. Search by agent name."
          },
          "reference": {
            "title": "Application reference (Idox)",
            "type": "string",
            "description": "Idox only. Search by exact application reference."
          },
          "ward": {
            "title": "Ward (Idox)",
            "type": "string",
            "description": "Idox only. Search by ward."
          },
          "parish": {
            "title": "Parish (Idox)",
            "type": "string",
            "description": "Idox only. Search by parish."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of applications to scrape. Free accounts are capped at 10 per run.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of applications/detail pages processed in parallel.",
            "default": 10
          },
          "includeDocuments": {
            "title": "Include documents",
            "type": "boolean",
            "description": "Also fetch the documents list for each application. Each document is written as its own row in a separate 'documents' dataset, and billed via the 'documents-fetched' pay-per-event (shown as 'Document' in the store). Only Idox-backed councils publish a documents list (the majority of PlanIt councils).",
            "default": false
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to be used by your crawler. Helpful for large nationwide runs (PlanIt rate-limits aggressive clients)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}