Depends on the jurisdiction. Since ownership of property, and construction of buildings on it, is generally registered with a government, there is a lot of data in existence, and most of it is public record. Alas, much of it is on paper, and possibly scattered among offices (the property deed in one place, construction-code approvals in another place, etc.).
Some governments have digitized their property registers, though. The most comprehensive one I've found is in Denmark, which has made the property register for the whole country searchable/browsable: http://www.ois.dk
Example: select "Københavns Kommune" from the dropdown box at top-right, type "Vesterbrogade" in the box labeled "Vejnavn", then click "Søg". You'll get a list of all buildings with street addresses on Vesterbrogade, one of the thoroughfares in Copenhagen. If you click on an individual address, you'll get information about the building and a listing of any subunits, e.g. that there are 5 floors, with 2 units on the 1st floor, 1 on the 2nd, etc. Click on any individual unit and you'll get information on everything from number of rooms, to when it was most recently renovated, to what materials are used in the construction.
In the U.S., some cities and counties are starting to provide at least some of this kind of information. For example, for Seattle, you can try the King County Parcel Viewer: http://www.kingcounty.gov/operations/GIS/PropResearch/Parcel...