BAYHAQI 12058:
from ʿAmr b. Shuʿayb from his father from his grandfather ʿAbdullāh b. ʿAmr b. al-ʿĀṣ —
[Machine] About the Messenger of Allah, it was asked about lost property. He said, "If it is found on a public road or in a central town, announce it to the people for a year, and if its owner comes, give it back to him, and if he does not come, it is yours. And if it is found in a ruin, it belongs to the finder, and if it is found in a well, it is subject to the one-fifth Islamic tax."
البيهقي ١٢٠٥٨:
عن عمرو بن شعيب عن أبيه عن جده عبد الله بن عمرو بن العاص —
عَنْ رَسُولِ اللهِ ﷺ أَنَّهُ سُئِلَ عَنِ اللُّقَطَةِ فَقَالَ مَا كَانَ مِنْهَا فِي طَرِيقِ الْمِئْتَاءِ وَالْقَرْيَةِ الْجَامِعَةِ فَعَرِّفُوهَا سَنَةً فَإِنْ جَاءَ صَاحِبُهَا فَادْفَعْهَا إِلَيْهِ وَإِنْ لَمْ يَأْتِ فَهِيَ لَكَ وَمَا كَانَ فِي الْخَرَابِ فَفِيهَا وَفِي الرِّكَازِ الْخُمُسُ
hadithunlocked.com