We report on the search for spectral irregularities induced by oscillations between photons and axionlike-particles ( ALPs ) in the \gamma -ray spectrum of NGC 1275 , the central galaxy of the Perseus cluster . Using six years of Fermi Large Area Telescope data , we find no evidence for ALPs and exclude couplings above 5 \times 10 ^ { -12 } \mathrm { GeV } ^ { -1 } for ALP masses 0.5 \lesssim m _ { a } \lesssim 5 neV at 95 % confidence . The limits are competitive with the sensitivity of planned laboratory experiments , and , together with other bounds , strongly constrain the possibility that ALPs can reduce the \gamma -ray opacity of the Universe .