This narration is recorded in many Hadith books.
The following version appears in Mustadrak Hakim:
Sa’id ibn Jubayr (rahimahullah) reports that ‘Abdullah ibn ‘Abbas (radiyallahu ‘anhuma) said: “When Rasulullah (sallallahu ‘alayhi wa sallam) passed away, I told an Ansari man, “Let us go seek knowledge for the Sahabah of Rasulullah (sallallahu ‘alayhi wa sallam) are alive.” He replied, “You are strange O Ibn ‘Abbas, where do you think people will refer to you when there are (senior) Sahabah around?” I left him and began seeking knowledge. When I heard of a Sahabi who had a Hadith which he heard from Rasulullah (sallallahu ‘alayhi wa sallam), I would go to him and sit at his door. The wind would blow dust onto my face. When he would emerge, he would say, “O cousin of Rasulullah (sallallahu ‘alayhi wa sallam), why have you come? What do you require?” I would reply, “I have heard that you have a Hadith which you report from Rasulullah (sallallahu ‘alayhi wa sallam).” [i.e. I would like you to report it to me]. The Sahabi would say, “Why didn’t you send for me?” I would reply, “I am the one who should come to you.” [For knowledge is sought]. People then started gathering by ‘Abdullah ibn ‘Abbas (radiyallahu ‘anhuma). The Ansari man would say, “This youngster was more intelligent than me.”
(Mustadrak Hakim, vol. 3, pg. 538. Also see: vol. 1, pg. 106-107, Sunan Darimi: 590, Al Madkhal of Imam Bayhaqi: 1770, Jami’u Bayanil ‘Ilmi wa Fadlihi: 507 and Al Matalibul ‘Aliyah: 4069)
And Allah Ta’ala Knows best.