Sunan an-Nasa'i, Hadith 2960 ⓘ
It was narrated that Amr - meaning, bin Umar - said: "The Messenger of Allah came and circumambulated the House seven times, then he prayed two Rakahs behind the Maqam and performed Sai between As-Safa and Al-Marwah, and he said: 'Indeed in the Messenger of Allah you have a good example to follow."
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ عَمْرٍو، قَالَ يَعْنِي ابْنَ عُمَرَ قَدِمَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَطَافَ بِالْبَيْتِ سَبْعًا وَصَلَّى خَلْفَ الْمَقَامِ رَكْعَتَيْنِ وَطَافَ بَيْنَ الصَّفَا وَالْمَرْوَةِ وَقَالَ { لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ } .
also referenced under: Book 24, Hadith 0 (In-Book) & Volume 3, Book 24, Hadith 2963 (DarusSalam)