Tuned inerter dampers (TID) have been demonstrated as efficient energy dissipation devices for seismic response control. However, its potential capability for energy harvesting remains largely unexplored. Here, we present a theoretical analysis of the power of a structure-TID system subjected to earthquake ground motions. The analytical solutions (ASs) of the average damping power of the system are derived for considering white noise base excitations and the Kanai-Tajimi earthquake model, respectively. Comparisons of the numerical results of a Monte Carlo simulation and the theoretical predictions verify the accuracy of the analytical solutions. Besides, we uncover the influence of the TID parameters on the average damping power and output power of the system. The optimal frequency ratio of the TID for maximizing its output power slightly differs from that for seismic response control, and the former varies with site conditions. In contrast, both the damping power and output power are not sensitive to the damping ratio of the TID. For short-period structures, a small inertance-to-mass ratio () of the TID is beneficial to maximize its output power, while seismic response control requires a large . For long-period structures, the damping power and output power are not sensitive to the . Generally, a structure-TID system on a soft soil site absorbs more energy from a given earthquake and is capable of harvesting more energy than that on a hard soil site. This study may help develop new strategies for self-powered control and monitoring in civil structures.