One of the distinctive properties of magnetars, young neutron stars powered mainly by magnetic energy, is the emission of short ($\lesssim$1 s) bursts of hard X-rays. Such bursts have been observed in nearly all the known magnetars, although at different and time-variable rates of occurrence. In the last two decades, the INTEGRAL satellite has extensively covered with good imaging capabilities the Galactic plane, where most magnetars reside. We present the results of a comprehensive search for magnetar bursts in more than twenty years of archival data of the INTEGRAL IBIS instrument (15 keV - 1 MeV). This led to the detection of 1349 bursts with 30-150 keV fluence in the $\sim2\times10^{-9} - 3\times10^{-6}$ erg cm$^{-2}$ range from 21 of the 34 examined magnetars and candidate magnetars with well known positions. The durations of the bursts, in terms of $T_{90}$, follow a lognormal distribution centered at $\sim0.1$ s. Most of the detected bursts originated from three particularly active sources: 1E 1547-5408, SGR 1806-20, and SGR 1935+2154. The integral distributions of their burst fluences follow power laws with slopes $β$= 0.76$\pm$0.04, 0.95$\pm$0.06, and 0.92$\pm$0.10, respectively. The burst spectra are generally well fit with an exponentially cut-off power law with peak energy $E_{peak}$ in the range $\sim20-60$ keV for SGR 1806-20 and SGR 1935+2154, while the bursts of 1E 1547-5408 are slightly harder ($E_{peak}\sim35-100$ keV). A significant anti-correlation between $E_{peak}$ and fluence is found for SGR 1806-20, which provided the largest number of bursts among the sources of our sample.