Inferring the fields and couplings of an Ising model from the set of its magnetizations and pairwise correlations is an important problem in information theory, statistics, and physics. We propose an inference algorithm based on a recursive calculation of the multi-spins contributions to the Ising entropy. The recursive procedure is pruned to prevent the outcome from being corrupted by the noise present in the data. The algorithm is applied to real data coming from neurobiology experiments, and compared to existing algorithms developed in information theory and statistics communities.