Investigation of the legality of the property

When I say investigation, I do not mean reading the deeds of the land register and the cadastre.
Investigation is visiting the property, going to the Town Hall and asking for the building license of the house and its annexes. Investigation is to find out if there is a file of urban infraction. Investigation is getting up from the chair and doing fieldwork to find out the real status (and not just documentary) of the property.