The magnetic diameter is a crucial factor affecting the magnetic properties of magnetic fluid. The magnetic diameter distribution can be estimated based on the magnetic properties. However, the magnetic dipole interaction of magnetic nanoparticles (MNPs) and the variation of the magnetic diameter with temperature have received relatively little attention in previous research. Hence, this research proposes the AP-MMF1-L method to inverse the magnetic diameter which considers the magnetic dipole interaction and derives the magnetic diameter at different temperatures. Firstly the AP-MMF1-L uses the least square method between the first-order modified mean-field Langevin function (MMF1-L) and the measured magnetization curve as the objective function. Meanwhile, the hybrid Artificial bee colony-Particle swarm (AP) optimization algorithm is introduced to inverse the optimal magnetic diameter distribution. Secondly, the hydrodynamic diameter distribution experimental values are compared with the theoretical values, demonstrating the AP-MMF1-L method obtains accurate inversion results of the magnetic diameter distribution when compared to other models. Finally, the arithmetic mean of the magnetic diameter at different temperatures is investigated, revealing a decreasing trend as the temperature rises, approximately following a linear distribution. The AP-MMF1-L provides a novel and effective tool for accurately determining the magnetic diameter of the MNPs across various temperatures.