  Topological invariants are fundamental characteristics reflecting global
properties of quantum systems, yet their exploration has predominantly been
limited to the static (DC) transport and transverse (Hall) channel. In this
work, we extend the spectral sum rules for frequency-resolved electric
conductivity $\sigma (\omega)$ in topological systems, and show that the sum
rule for the longitudinal channel is expressed through topological and
quantum-geometric invariants. We find that for dispersionless (flat) Chern
bands, the rule is expressed as, $ \int_{-\infty}^{+\infty} d\omega \,
\text{Re}(\sigma_{xx} + \sigma_{yy}) = C \Delta e^2$, where $C$ is the Chern
number, $\Delta$ the topological gap, and $e$ the electric charge. In scenarios
involving dispersive Chern bands, the rule is defined by the invariant of the
quantum metric, and Luttinger invariant, $\int_{-\infty}^{+\infty} d\omega \,
\text{Re}(\sigma_{xx} + \sigma_{yy}) = 2 \pi e^2 \Delta \sum_{\boldsymbol{k}}
\text{Tr} \, \mathcal{G}_{ij}(\boldsymbol{k})$+(Luttinger invariant), where
$\text{Tr} \, \mathcal {G}_{ij}$ is invariant of the Fubini-Study metric
(defining spread of Wannier orbitals). We further discuss the physical role of
topological and quantum-geometric invariants in spectral sum rules. Our
approach is adaptable across varied topologies and system dimensionalities.
