كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(18)
Chapter: The prohibition of making lost property announcements in the masjid, and what should be said by one who hears a person making such an announcement
(18)
باب النَّهْىِ عَنْ نَشْدِ الضَّالَّةِ، فِي الْمَسْجدِ وَمَا يَقُولُهُ مَنْ سَمِعَ النَّاشِدَ ‏
Sahih Muslim 568 a

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: If anyone hears a man crying out in the mosque about something he has lost, he should say: May Allah not restore it to you, for the mosques were not built for this.
حَدَّثَنَا أَبُو الطَّاهِرِ، أَحْمَدُ بْنُ عَمْرٍو حَدَّثَنَا ابْنُ وَهْبٍ، عَنْ حَيْوَةَ، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي عَبْدِ اللَّهِ، مَوْلَى شَدَّادِ بْنِ الْهَادِ أَنَّهُ سَمِعَ أَبَا هُرَيْرَةَ، يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ سَمِعَ رَجُلاً يَنْشُدُ ضَالَّةً فِي الْمَسْجِدِ فَلْيَقُلْ لاَ رَدَّهَا اللَّهُ عَلَيْكَ فَإِنَّ الْمَسَاجِدَ لَمْ تُبْنَ لِهَذَا ‏"‏ ‏.‏
Reference : Sahih Muslim 568a
In-book reference : Book 5, Hadith 98
USC-MSA web (English) reference : Book 4, Hadith 1153
  (deprecated numbering scheme)