Language:
كتاب الاستسقاء
15  
Invoking Allah for Rain (Istisqaa)
(12)
Chapter: If the people request the Imam to invoke Allah for rain, the Imam should not refuse
(12)
باب إِذَا اسْتَشْفَعُوا إِلَى الإِمَامِ لِيَسْتَسْقِيَ لَهُمْ لَمْ يَرُدُّهُمْ
Sahih al-Bukhari 1019

Narrated Anas bin Malik:

A man came to Allah's Messenger (ﷺ) and said, "O Allah's Messenger (ﷺ)! Livestock are destroyed and the roads are cut off; so please invoke Allah." So Allah's Messenger (ﷺ) prayed for rain and it rained from that Friday till the next Friday. Then a man came to the Prophet (p.b.u.h) and said, "O Allah's Messenger (ﷺ)! The houses have collapsed, roads are cut off and the livestock are destroyed." So Allah's Messenger (ﷺ) said, "O Allah ! (Let it rain) on the tops of the mountains, on the plateaus, in the valleys and over the places where trees grow." So the clouds cleared away from Medina as clothes are taken off.

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ شَرِيكِ بْنِ عَبْدِ اللَّهِ بْنِ أَبِي نَمِرٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّهُ قَالَ جَاءَ رَجُلٌ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ هَلَكَتِ الْمَوَاشِي، وَتَقَطَّعَتِ السُّبُلُ، فَادْعُ اللَّهَ‏.‏ فَدَعَا اللَّهَ، فَمُطِرْنَا مِنَ الْجُمُعَةِ إِلَى الْجُمُعَةِ، فَجَاءَ رَجُلٌ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ، تَهَدَّمَتِ الْبُيُوتُ وَتَقَطَّعَتِ السُّبُلُ وَهَلَكَتِ الْمَوَاشِي‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ اللَّهُمَّ عَلَى ظُهُورِ الْجِبَالِ وَالآكَامِ وَبُطُونِ الأَوْدِيَةِ وَمَنَابِتِ الشَّجَرِ ‏"‏‏.‏ فَانْجَابَتْ عَنِ الْمَدِينَةِ انْجِيَابَ الثَّوْبِ‏.‏
Reference : Sahih al-Bukhari 1019
In-book reference : Book 15, Hadith 14
USC-MSA web (English) reference : Vol. 2, Book 17, Hadith 132
  (deprecated numbering scheme)