N.Y. Real Property Tax Law § 1196
1.
(a) Within forty-five days after the sale of tax-foreclosed property, the enforcing officer shall determine whether a surplus is attributable to such sale and if so, the amount thereof. Subject to the provisions of subdivision two of this section, such determination shall be made by ascertaining the sum of the total amount of taxes due plus interest, penalties and other charges as defined by section eleven hundred two of this article, and subtracting such sum from whichever of the following is applicable:
2. Notwithstanding the provisions of subdivision one of this section, when a tax district has sold or conveyed tax-foreclosed property to a land bank, a housing development agency or another public entity, and such sale or conveyance was not the result of a public sale, or when a tax district has determined to retain tax-foreclosed property for a public use, no surplus shall be payable if all of the following conditions are satisfied:
3.