{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Planning Appeals: Inspectorate Decisions by RawTrader",
    "description": "UK planning appeals: Planning Inspectorate decisions for England with appeal outcomes (allowed or dismissed) by council, postcode, dwellings and green belt, plus LPA allowed rates and alerts. For developers, planning consultants and property researchers. By RawTrader | UK Industry & Bills",
    "version": "0.1",
    "x-build-id": "cUn8uRJapTJFRyGQo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seaf999ield~uk-planning-appeals/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seaf999ield-uk-planning-appeals",
        "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/seaf999ield~uk-planning-appeals/runs": {
      "post": {
        "operationId": "runs-sync-seaf999ield-uk-planning-appeals",
        "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/seaf999ield~uk-planning-appeals/run-sync": {
      "post": {
        "operationId": "run-sync-seaf999ield-uk-planning-appeals",
        "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": "Output",
            "enum": [
              "decisions",
              "summary",
              "both",
              "newDecisions"
            ],
            "type": "string",
            "description": "Decision rows, an allowed rate summary, both, or only decisions not seen in earlier runs (the first monitor run saves a baseline and outputs nothing).",
            "default": "decisions"
          },
          "lpaNames": {
            "title": "Councils (local planning authorities)",
            "type": "array",
            "description": "Part of the council name, e.g. Cornwall, Tower Hamlets, Sevenoaks. Empty = all of England.",
            "items": {
              "type": "string"
            }
          },
          "postcodePrefixes": {
            "title": "Postcode prefixes",
            "type": "array",
            "description": "Match the postcode in the site address, e.g. TR, SW11, GU8 6. Only cases whose address has a postcode can match.",
            "items": {
              "type": "string"
            }
          },
          "caseworkTypes": {
            "title": "Casework types",
            "type": "array",
            "description": "Part of the type name, e.g. Planning Appeal, Householder, Enforcement Notice, Listed Building, Lawful Development Certificate, Tree Preservation Order.",
            "items": {
              "type": "string"
            }
          },
          "developmentTypes": {
            "title": "Development types",
            "type": "array",
            "description": "Part of the development type, e.g. Major dwellings, Minor Dwellings, Change of use, Householder developments.",
            "items": {
              "type": "string"
            }
          },
          "outcomes": {
            "title": "Outcomes",
            "type": "array",
            "description": "Leave empty for all outcomes.",
            "items": {
              "type": "string",
              "enum": [
                "allowed",
                "split",
                "dismissed",
                "quashed",
                "withdrawn_or_invalid",
                "other"
              ],
              "enumTitles": [
                "Allowed",
                "Split decision",
                "Dismissed / notice upheld",
                "Quashed",
                "Withdrawn or invalid",
                "Other or unknown"
              ]
            }
          },
          "decidedFrom": {
            "title": "Decided from",
            "type": "string",
            "description": "YYYY-MM-DD. Empty = the last N days."
          },
          "decidedTo": {
            "title": "Decided to",
            "type": "string",
            "description": "YYYY-MM-DD. Empty = today."
          },
          "days": {
            "title": "Days back (if no 'Decided from')",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Window when Decided from is empty. The source is updated monthly, so the newest 4 to 8 weeks are not in it yet.",
            "default": 90
          },
          "minResidences": {
            "title": "Minimum dwellings",
            "minimum": 0,
            "type": "integer",
            "description": "Only cases with at least this many proposed dwellings (where known)."
          },
          "greenBeltOnly": {
            "title": "Green belt sites only",
            "type": "boolean",
            "description": "Only sites recorded as in the green belt.",
            "default": false
          },
          "siteKeywords": {
            "title": "Site address contains",
            "type": "array",
            "description": "Keep cases whose site address contains one of these words, e.g. a street or village.",
            "items": {
              "type": "string"
            }
          },
          "lpaApplicationReferences": {
            "title": "Council application references",
            "type": "array",
            "description": "Look up the appeal for specific planning application references, e.g. 19/503795/FULL.",
            "items": {
              "type": "string"
            }
          },
          "summaryGroupBy": {
            "title": "Summary grouped by",
            "enum": [
              "lpa",
              "lpaAndDevelopmentType",
              "developmentType",
              "caseworkType"
            ],
            "type": "string",
            "description": "Grouping for the allowed rate summary.",
            "default": "lpa"
          },
          "includeOlderData": {
            "title": "Include older cases (5 to 10 years)",
            "type": "boolean",
            "description": "Also read the older casework file. Slower; only needed for date ranges before the last 5 years.",
            "default": false
          },
          "includeAgentName": {
            "title": "Include agent name",
            "type": "boolean",
            "description": "Add the planning agent named on the appeal (usually a consultancy). Off by default. Appellant names are never output.",
            "default": false
          },
          "includeInspectorName": {
            "title": "Include inspector name",
            "type": "boolean",
            "description": "Add the inspector's surname and initial. Off by default. The Planning Inspectorate warns that per inspector rates are not a fair measure.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "For New decisions mode: a name for this watchlist, so different filters keep separate memories."
          },
          "maxResults": {
            "title": "Max decision rows",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on decision rows (0 = no cap). Summary rows are always output.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}