Exploding granules on the solar surface play a major role in the dynamics of the outer part of the convection zone, especially in the diffusion of the magnetic field. We aim to develop an automated procedure able to investigate the location and evolution of exploding granules over the solar surface and to get rid of visual detection. We used sequences of observations of intensity and Doppler velocity, as well as magnetograms, provided by the Helioseismic and Magnetic Imager aboard the Solar Dynamics Observatory. The automated detection of the exploding granules was performed by applying criteria on either three or two parameters: the granule area, the amplitude of the velocity field divergence, and, at the disc centre, the radial Doppler velocity. Our analyses show that granule area and divergence amplitudes are sufficient to detect the largest exploding granules; thus, we can automatically detect them, not only at the disc centre, but across the whole solar surface. Using a 24-hour-long observation sequence, we have demonstrated the important contribution of the most dynamic exploding granules in the diffusion of the magnetic field in the quiet Sun. Indeed, we have shown that the most intense exploding granules are sufficient to build a large part of the photospheric network. We have also applied our procedure on Hinode observations to locate the exploding granules relative to trees of fragmenting granules (TFGs). We conclude that, during a first phase of about 300 minutes after the birth of a TFG, exploding granules are preferentially located on its edge. Finally, we also show that the distribution of exploding granules is homogeneous (at the level of our measurement errors) over the solar surface without a significant dependency on latitude.