how to get freq via script

hi

its possible to run scan and get the frequency of specified SSID or BSSID to use it later via script and thanx alot
best regards gladio abbas