{"openapi":"3.0.2","info":{"title":"planning.data.gov.uk API","description":"\n## About this API\n","contact":{"name":"planning.data.gov.uk team","url":"https://www.planning.data.gov.uk","email":"digitalland@communities.gov.uk"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"version":"0.1.0"},"servers":[{"url":"https://www.planning.data.gov.uk"}],"paths":{"/entity/dataset-name-search.json":{"get":{"tags":["Entity"],"summary":"Dataset Name Search","description":"Return a compact list of entity names for a given dataset.\n\nThis will aid the type-search functionality so that we\ncan display potential matches for the query being typed.","operationId":"dataset_name_search_entity_dataset_name_search_json_get","parameters":[{"required":false,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"},{"required":false,"schema":{"title":"Dataset","type":"string"},"name":"dataset","in":"query"},{"required":false,"schema":{"title":"Limit","type":"integer","default":10},"name":"limit","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entity.{extension}":{"get":{"tags":["Search entity"],"summary":"This endpoint searches for a subset of entities from all entities filtered by specified parameters returning the entity set in the format specified.","operationId":"search_entities_entity__extension__get","parameters":[{"required":true,"schema":{"$ref":"#/components/schemas/SuffixEntity"},"name":"extension","in":"path"},{"description":"\n        Search by a postcode, or a Unique Property Reference Number (UPRN).\n        ","required":false,"schema":{"title":"Q","type":"string","description":"\n        Search by a postcode, or a Unique Property Reference Number (UPRN).\n        "},"name":"q","in":"query"},{"description":"Search for entities by typology","required":false,"schema":{"title":"Typology","type":"array","items":{"type":"string"},"description":"Search for entities by typology"},"name":"typology","in":"query"},{"description":"Search for entities by dataset","required":false,"schema":{"title":"Dataset","type":"array","items":{"type":"string"},"description":"Search for entities by dataset"},"name":"dataset","in":"query"},{"description":"Search for entities managed by organisation","required":false,"schema":{"title":"Organisation Entity","minimum":1.0,"type":"array","items":{"minimum":1.0,"type":"integer"},"description":"Search for entities managed by organisation"},"name":"organisation_entity","in":"query"},{"description":"Search for entities by entity number","required":false,"schema":{"title":"Entity","minimum":1.0,"type":"array","items":{"minimum":1.0,"type":"integer"},"description":"Search for entities by entity number"},"name":"entity","in":"query"},{"description":"Search for entities by CURIE","required":false,"schema":{"title":"Curie","type":"array","items":{"type":"string"},"description":"Search for entities by CURIE"},"name":"curie","in":"query"},{"description":"Search for entities by prefix","required":false,"schema":{"title":"Prefix","type":"array","items":{"type":"string"},"description":"Search for entities by prefix"},"name":"prefix","in":"query"},{"description":"Search for entities by reference","required":false,"schema":{"title":"Reference","type":"array","items":{"type":"string"},"description":"Search for entities by reference"},"name":"reference","in":"query"},{"description":"Results to include current, or all entries","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodOption"},"description":"Results to include current, or all entries"},"name":"period","in":"query"},{"description":"\n        Search for entities by start date year before or after the given year. Depends on start_date_match\n        ","required":false,"schema":{"title":"Start Date Year","type":"integer","description":"\n        Search for entities by start date year before or after the given year. Depends on start_date_match\n        "},"name":"start_date_year","in":"query"},{"description":"\n        Search for entities by start date month before or after the given year. Depends on start_date_match\n        ","required":false,"schema":{"title":"Start Date Month","type":"integer","description":"\n        Search for entities by start date month before or after the given year. Depends on start_date_match\n        "},"name":"start_date_month","in":"query"},{"description":"\n        Search for entities by start date day before or after the given day. Depends on start_date_match\n        ","required":false,"schema":{"title":"Start Date Day","type":"integer","description":"\n        Search for entities by start date day before or after the given day. Depends on start_date_match\n        "},"name":"start_date_day","in":"query"},{"description":"Specify how to filter against the start_date_* values provided, either before, after or match","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/DateOption"}],"description":"Specify how to filter against the start_date_* values provided, either before, after or match"},"name":"start_date_match","in":"query"},{"description":"Search by end date year before or after the given year. Depends on end_date_match","required":false,"schema":{"title":"End Date Year","type":"integer","description":"Search by end date year before or after the given year. Depends on end_date_match"},"name":"end_date_year","in":"query"},{"description":"\n        Search for entities by end date month before or after the given month.Depends on end_date_match\n        ","required":false,"schema":{"title":"End Date Month","type":"integer","description":"\n        Search for entities by end date month before or after the given month.Depends on end_date_match\n        "},"name":"end_date_month","in":"query"},{"description":"\n        Search for entities by end date day before or after the given day. Depends on end_date_match\n        ","required":false,"schema":{"title":"End Date Day","type":"integer","description":"\n        Search for entities by end date day before or after the given day. Depends on end_date_match\n        "},"name":"end_date_day","in":"query"},{"description":"Specify how to filter against the end_date_* values provided, either before, after or match","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/DateOption"}],"description":"Specify how to filter against the end_date_* values provided, either before, after or match"},"name":"end_date_match","in":"query"},{"description":"\n        Search for entities by entry date year before or after the given year. Depends on entry_date_match\n        ","required":false,"schema":{"title":"Entry Date Year","type":"integer","description":"\n        Search for entities by entry date year before or after the given year. Depends on entry_date_match\n        "},"name":"entry_date_year","in":"query"},{"description":"\n        Search for entities for entities by entry date month before or after the given month.Depends on entry_date_match\n        ","required":false,"schema":{"title":"Entry Date Month","type":"integer","description":"\n        Search for entities for entities by entry date month before or after the given month.Depends on entry_date_match\n        "},"name":"entry_date_month","in":"query"},{"description":"\n        Search for entities by entry date day before or after the given day. Depends on entry_date_match\n        ","required":false,"schema":{"title":"Entry Date Day","type":"integer","description":"\n        Search for entities by entry date day before or after the given day. Depends on entry_date_match\n        "},"name":"entry_date_day","in":"query"},{"description":"\n        Specify for entities how to filter against the entry_date_* values provided, either before, after or match\n        ","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/DateOption"}],"description":"\n        Specify for entities how to filter against the entry_date_* values provided, either before, after or match\n        "},"name":"entry_date_match","in":"query"},{"description":"\n        Search for entity with geometries intersected by a point constructed with this longitude.\n        Requires latitude to be provided.\n        ","required":false,"schema":{"title":"Longitude","type":"number","description":"\n        Search for entity with geometries intersected by a point constructed with this longitude.\n        Requires latitude to be provided.\n        "},"name":"longitude","in":"query"},{"description":"\n        Search for entities with geometries intersected by a point constructed with this latitude.\n        Requires longitude to be provided.\n        ","required":false,"schema":{"title":"Latitude","type":"number","description":"\n        Search for entities with geometries intersected by a point constructed with this latitude.\n        Requires longitude to be provided.\n        "},"name":"latitude","in":"query"},{"description":"\n        Search for entities with geometries interacting with one or more geometries provided in WKT format.\n        The type of geometric relation can be set using the geometry relation parameter.","required":false,"schema":{"title":"Geometry","type":"array","items":{"type":"string"},"description":"\n        Search for entities with geometries interacting with one or more geometries provided in WKT format.\n        The type of geometric relation can be set using the geometry relation parameter."},"name":"geometry","in":"query"},{"description":"Search for entities with geometries interacting with one or more geometries\n        taken from each of the provided entities. The type of geometric relation can be set using the\n        geometry relation parameter.","required":false,"schema":{"title":"Geometry Entity","minimum":1.0,"type":"array","items":{"minimum":1.0,"type":"integer"},"description":"Search for entities with geometries interacting with one or more geometries\n        taken from each of the provided entities. The type of geometric relation can be set using the\n        geometry relation parameter."},"name":"geometry_entity","in":"query"},{"description":"\n        Search entities with geometries interacting with the geometries of\n        entities with the provided references. The type of geometric relation\n        can be set using the geometry relation parameter.\n        ","required":false,"schema":{"title":"Geometry Reference","type":"array","items":{"type":"string"},"description":"\n        Search entities with geometries interacting with the geometries of\n        entities with the provided references. The type of geometric relation\n        can be set using the geometry relation parameter.\n        "},"name":"geometry_reference","in":"query"},{"description":"\n        Search for entities with geometries interacting with geometries\n        entities matching provided curies. The type of geometric relation\n        can be set using the geometry relation parameter.\n        ","required":false,"schema":{"title":"Geometry Curie","type":"array","items":{"type":"string"},"description":"\n        Search for entities with geometries interacting with geometries\n        entities matching provided curies. The type of geometric relation\n        can be set using the geometry relation parameter.\n        "},"name":"geometry_curie","in":"query"},{"description":"DE-9IM spatial relationship, default is 'within'","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/GeometryRelation"}],"description":"DE-9IM spatial relationship, default is 'within'"},"name":"geometry_relation","in":"query"},{"description":"limit for the number of results","required":false,"schema":{"title":"Limit","maximum":500.0,"minimum":1.0,"type":"integer","description":"limit for the number of results","default":10},"name":"limit","in":"query"},{"description":"paginate results from this entity","required":false,"schema":{"title":"Offset","type":"integer","description":"paginate results from this entity"},"name":"offset","in":"query"},{"description":"fields to be included in response","required":false,"schema":{"title":"Field","type":"array","items":{"type":"string"},"description":"fields to be included in response"},"name":"field","in":"query"},{"description":"field parameter will take over any fields specified in the exclude_field parameter","required":false,"schema":{"title":"Exclude Field","type":"array","items":{"type":"string"},"description":"field parameter will take over any fields specified in the exclude_field parameter"},"name":"exclude_field","in":"query"},{"description":"Search for entities by quality","required":false,"schema":{"title":"Quality","type":"array","items":{"type":"string"},"description":"Search for entities by quality"},"name":"quality","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entity/{entity}.{extension}":{"get":{"tags":["Get entity"],"summary":"This endpoint returns data on one specific entity matching the specified ID in the format requested.","operationId":"get_entity_entity__entity___extension__get","parameters":[{"description":"Entity id","required":true,"schema":{"title":"Entity","type":"integer","description":"Entity id"},"name":"entity","in":"path"},{"required":true,"schema":{"$ref":"#/components/schemas/SuffixEntity"},"name":"extension","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset.{extension}":{"get":{"tags":["List datasets"],"summary":"This endpoint lists all datasets, returning the results in the file format specified.","operationId":"list_datasets_dataset__extension__get","parameters":[{"required":true,"schema":{"$ref":"#/components/schemas/SuffixDataset"},"name":"extension","in":"path"},{"description":"Search for datasets by dataset","required":false,"schema":{"title":"Dataset","type":"array","items":{"type":"string"},"description":"Search for datasets by dataset"},"name":"dataset","in":"query"},{"description":"Fields to include in dataset JSON response","required":false,"schema":{"title":"Field","type":"array","items":{"type":"string"},"description":"Fields to include in dataset JSON response"},"name":"field","in":"query"},{"description":"Fields to exclude from the dataset JSON response","required":false,"schema":{"title":"Exclude Field","type":"array","items":{"type":"string"},"description":"Fields to exclude from the dataset JSON response"},"name":"exclude_field","in":"query"},{"description":"Include typologies in dataset JSON response; set to false to remove","required":false,"schema":{"title":"Include Typologies","type":"boolean","description":"Include typologies in dataset JSON response; set to false to remove","default":true},"name":"include_typologies","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset/{dataset}.{extension}":{"get":{"tags":["Get dataset"],"summary":"This endpoint returns a specific dataset in the file format specified.","operationId":"get_dataset_dataset__dataset___extension__get","parameters":[{"description":"Specify which dataset","required":true,"schema":{"title":"Dataset","type":"string","description":"Specify which dataset"},"name":"dataset","in":"path"},{"required":true,"schema":{"$ref":"#/components/schemas/SuffixDataset"},"name":"extension","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DateOption":{"title":"DateOption","enum":["match","before","since","empty"],"type":"string","description":"An enumeration."},"GeometryRelation":{"title":"GeometryRelation","enum":["within","equals","disjoint","intersects","touches","contains","covers","coveredby","overlaps","crosses"],"type":"string","description":"An enumeration."},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"PeriodOption":{"title":"PeriodOption","enum":["all","current","historical"],"type":"string","description":"An enumeration."},"SuffixDataset":{"title":"SuffixDataset","enum":["json","html"],"type":"string","description":"An enumeration."},"SuffixEntity":{"title":"SuffixEntity","enum":["json","html","geojson"],"type":"string","description":"An enumeration."},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}},"tags":[{"name":"Search entity","description":"find entities by location, type or date"},{"name":"Get entity","description":"get entity by id"},{"name":"List datasets","description":"list all datasets"},{"name":"Get dataset","description":"get dataset by id"}]}