Sahih Muslim , Hadith 2463

Abdullah reported: By Him besides Whom there is no god, there is no chapter in the Book of Allah about which I do not know as to where it was revealed and there is no verse about which I do not know in what context it was revealed, and if I were to know of one having a better understanding of the Book of Allah than I (and I could reach him) on the back of the mule, I would have definitely gone to him on camel's back.

حَدَّثَنَا أَبُو كُرَيْبٍ، حَدَّثَنَا يَحْيَى بْنُ آدَمَ، حَدَّثَنَا قُطْبَةُ، عَنِ الأَعْمَشِ، عَنْ مُسْلِمٍ، عَنْ مَسْرُوقٍ، عَنْ عَبْدِ اللَّهِ، قَالَ وَالَّذِي لاَ إِلَهَ غَيْرُهُ مَا مِنْ كِتَابِ اللَّهِ سُورَةٌ إِلاَّ أَنَا أَعْلَمُ حَيْثُ نَزَلَتْ وَمَا مِنْ آيَةٍ إِلاَّ أَنَا أَعْلَمُ فِيمَا أُنْزِلَتْ وَلَوْ أَعْلَمُ أَحَدًا هُوَ أَعْلَمُ بِكِتَابِ اللَّهِ مِنِّي تَبْلُغُهُ الإِبِلُ لَرَكِبْتُ إِلَيْهِ ‏.‏

sunnah.com