{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Land Data API - Parcels, Planning, Titles, Owners",
    "description": "UK land and planning data: search land parcels in any local authority by size and tenure, read the HM Land Registry titles and registered owners behind them, the planning applications on them, the properties inside them, and the flood, green belt, heritage and allocation layers that cover them.",
    "version": "0.1",
    "x-build-id": "TIe3umv4bpHtEgndg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~uk-land-planning-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-uk-land-planning-data-api",
        "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/nabeelbaghoor~uk-land-planning-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-uk-land-planning-data-api",
        "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/nabeelbaghoor~uk-land-planning-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-uk-land-planning-data-api",
        "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 do",
            "enum": [
              "parcelSearch",
              "parcelAdvancedSearch",
              "parcelDetails",
              "planningSearch",
              "planningDetails",
              "titleDetails",
              "propertyDetails",
              "siteFeatures",
              "listRegions",
              "accountStatus"
            ],
            "type": "string",
            "description": "Parcel search finds land parcels in one local authority by size and tenure. Advanced parcel search runs the provider's own filter language. Parcel details reads everything known about a parcel ID. Planning search finds applications around a point or inside a polygon, and planning details reads one application. Title details reads a registered title and its owners. Property details reads one UPRN. Site features reads constraints, allocations, land availability assessments and the other designation layers.",
            "default": "parcelSearch"
          },
          "regions": {
            "title": "Local authority GSS codes",
            "type": "array",
            "description": "One local authority GSS code per line, for parcel search. A GSS code looks like E06000023 and is the Office for National Statistics identifier for the authority. Run the list regions mode if you need the codes.",
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "title": "Identifiers",
            "type": "array",
            "description": "One identifier per line, for the detail modes: a parcel ID, a planning application ID such as E07000112+Y18/1381/FH, an HM Land Registry title number such as SGL235730, a UPRN such as 100023523019, or a site feature ID depending on the mode.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "One location per line for planning search, either a \"latitude,longitude\" pair or a GeoJSON polygon. Latitude comes first in the pair, and the actor converts it to the longitude-first order this API expects, so a swapped pair cannot quietly return a real place somewhere else.",
            "items": {
              "type": "string"
            }
          },
          "minParcelSizeSqm": {
            "title": "Minimum parcel size (square metres)",
            "type": "integer",
            "description": "Only return parcels at least this large, in square metres. One hectare is 10000 square metres. Leave empty for no lower bound."
          },
          "maxParcelSizeSqm": {
            "title": "Maximum parcel size (square metres)",
            "type": "integer",
            "description": "Only return parcels no larger than this, in square metres. Leave empty for no upper bound."
          },
          "tenure": {
            "title": "Tenure",
            "type": "array",
            "description": "Which tenures to include in parcel search. The provider defaults to freehold only when this is left empty, so pick leasehold explicitly if you want leasehold interests.",
            "items": {
              "type": "string",
              "enum": [
                "freehold",
                "leasehold"
              ],
              "enumTitles": [
                "Freehold",
                "Leasehold"
              ]
            }
          },
          "advancedSearchFilter": {
            "title": "Advanced search filter (JSON)",
            "type": "string",
            "description": "The provider's own search_filter object, as JSON, for advanced parcel search. For example {\"ALL\":[{\"parcel_size\":{\"min\":10000}},{\"ownership_type\":{\"values\":[\"company\"]}}]}. The provider marks this endpoint beta and changes its filters, so it is passed through as written rather than rebuilt from form fields."
          },
          "featureCollection": {
            "title": "Site feature collection",
            "enum": [
              "developmentConstraints",
              "developmentOpportunities",
              "shlaa",
              "additionalOpportunities",
              "localPlanPolicy",
              "power",
              "strategicIndustrialLocation",
              "renewableEnergyPlanningDb"
            ],
            "type": "string",
            "description": "Which designation layer the site features mode reads. Development constraints covers flood zones, green belt, conservation areas, listed buildings, safeguarding and rights of way. Land availability assessments are the local authority's own SHLAA sites.",
            "default": "developmentConstraints"
          },
          "hydrateSearchResults": {
            "title": "Fetch full records for search results",
            "type": "boolean",
            "description": "Searches on this API return identifiers rather than records. Leave this on to read the full record behind each identifier, which is what most runs want. Turn it off to collect identifiers only, which is far cheaper when you plan to filter the list before looking anything up.",
            "default": true
          },
          "includeGeometry": {
            "title": "Include full geometry",
            "type": "boolean",
            "description": "Adds the full GeoJSON boundary to each row. Off by default because a multipolygon makes a spreadsheet cell enormous without making it useful, and every row already carries a centre point. For site features this also switches to the provider's full endpoint rather than its geometry-free one.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows",
            "type": "integer",
            "description": "Stop after this many rows. Counts every row: parcels, planning applications, titles, properties, site features and regions alike. When search results are hydrated, the cap is applied before the lookups so a search returning thousands of identifiers does not spend thousands of calls to fill a small run.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "type": "integer",
            "description": "How fast to call the provider. The default of 120 is two a second, which is polite for a metered API. Raise it if your contract allows more.",
            "default": 120
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own account key, issued by the provider. Sent in an X-API-Key header. Paste the key on its own rather than a whole header line or a bearer token. Stored encrypted and never written into the dataset. Can also be supplied as the DATA_API_KEY environment secret."
          },
          "baseUrl": {
            "title": "API host",
            "type": "string",
            "description": "Overrides the host the API is called on. Leave empty unless the provider has given you a different one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}