You can search the City of New York's official real estate records at this site:
ACRIS Main Options
To find a property, you have to first click on "Find Addresses and Parcels". After entering the address, it will return the block and lot number, then you can click on "Document Search by BBL", accept the defaults and you will see a list of documents related to the property's entire history. You can even see scanned images of the deeds, mortgage records, etc.
This will also tell you how much the owner paid for the property, the amount of the mortgage and if the owner has had any tax problems with property.
This works well with homes and condos. However, as BK2Westchester said, co-ops are harder because the units are not owned by individuals.