Sahih Muslim 6174
The Book of the Merits of the Companions
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا عَبْدُ الرَّحْمَنِ، حَدَّثَنِي سُفْيَانُ، عَنْ أَبِي إِسْحَاقَ، عَنْ أَبِي الأَحْوَصِ، عَنْ عَبْدِ اللَّهِ، ح وَحَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، أَخْبَرَنَا جَعْفَرُ بْنُ عَوْنٍ، أَخْبَرَنَا أَبُو عُمَيْسٍ، عَنِ ابْنِ أَبِي، مُلَيْكَةَ عَنْ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لَوْ كُنْتُ مُتَّخِذًا خَلِيلاً لاَتَّخَذْتُ ابْنَ أَبِي قُحَافَةَ خَلِيلاً " .
Abdullah reported Allah's Messenger (ﷺ) as saying:If I were to choose as my bosom friend I would have chosen the son of Abu Quhafa (Abu Bakr) as my bosom friend
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.