  We present a search for nuclear X-ray emission in the brightest cluster
galaxies (BCGs) of a sample of groups and clusters of galaxies extracted from
the Chandra archive. The exquisite angular resolution of Chandra allows us to
obtain robust photometry at the position of the BCG, and to firmly identify
unresolved X-ray emission when present, thanks to an accurate characterization
of the extended emission at the BCG position. We consider two redshift bins
(0.2<z<0.3 and 0.55<z<0.75) and analyze all the clusters observed by Chandra
with exposure time larger than 20 ks. Our samples have 81 BCGs in 73 clusters
and 51 BCGs in 49 clusters in the low- and high-redshift bin, respectively.
X-ray emission in the soft (0.5-2 keV) or hard (2-7 keV) band is detected only
in 14 and 9 BCGs ($\sim 18$% of the total samples), respectively. The X-ray
photometry shows that at least half of the BCGs have a high hardness ratio,
compatible with significant intrinsic absorption. This is confirmed by the
spectral analysis with a power law model plus intrinsic absorption. We compute
the fraction of X-ray bright BCGs above a given hard X-ray luminosity,
considering only sources with positive photometry in the hard band (12/5
sources in the low/high-z sample). In the 0.2<z<0.3 interval the hard X-ray
luminosity ranges from $10^{42}$ to $7 \times 10^{43}$ erg s$^{-1}$, with most
sources found below $10^{43}$ erg s$^{-1}$. In the $0.55<z<0.75$ range, we find
a similar distribution of luminosities below $\sim 10^{44}$ erg s$^{-1}$, plus
two very bright sources of a few $10^{45}$ erg s$^{-1}$ associated with two
radio galaxies. We also find that X-ray luminous BCGs tend to be hosted by
cool-core clusters, despite the majority of cool cores do not host nuclear
X-ray emission (Abridged).
