This paper explores numerical methods for recovering a density term in a fractional Sturm-Liouville problem using a set of spectra. By applying Lidskii's theorem, a sequence of trace formulae are derived to elucidate the connections between the unknown coefficients and the eigenvalues of a fractional spectra problem. Two efficient algorithms are proposed based on these trace formulae, and their effectiveness is demonstrated through numerical experiments.