You can measure the impedance of a circuit using a impedance analyzer.
It supplies a signal to determine the impedance in a circuit relation to the signal that is injected
This will not work like a spectrum analyzer.
A spectrum analyzer is basically a receiver that sweeps a range of frequencies to give a graphical display of the signals and signal levels that are received.
It is a meter specifically tailored to measure complex impedance of a one-port network at high frequencies. It might be more closely compared to an RF network analyzer, but while the RF network analyzer references measurements to a 50 or 75 ohm terminal characteristic impedance ( limiting itself to measureing values that are perhaps two orders of magnitude above and below this value) the impedance analyzer has a much larger range of impedances that can be measured. I have not seen an impedance analyzer that also includes a spectrum analyzer function.
It's the AC counterpart of an ohmmeter. It can measure the impedance of a circuit component, at some specific AC frequency (or range of frequencies) rather than at DC.
Impedance analyzers are not necessarily tailored to measure at "high frequencies". Often they will cover low audio frequencies.
The HP4192 covers the range from 5 Hz to 13 MHz. The HP4194 covers 100 Hz to 40 MHz. The Wayne-Kerr 6440B covers 20 Hz to 3 MHz. These are instruments that can perform measurements at thousands of frequencies in their design span.