The emergence of confined structures and pattern formation are exceptional manifestations of concurring nonlinear interactions found in a variety of physical, chemical and biological systems 1 . Optical solitons are a hallmark of extreme spatial or temporal confinement enabled by a variety of nonlinearities. Such particle-like structures can assemble in complex stable arrangements, forming "soliton molecules" 2,3 . Recent works revealed oscillatory internal motions of these bound states, akin to molecular vibrations 4-8 . These observations beg the question as to how far the "molecular" analogy reaches, whether further concepts from molecular spectroscopy apply in this scenario, and if such intra-molecular dynamics can be externally driven or manipulated. Here, we probe and control such ultrashort bound-states in an optical oscillator, utilizing real-time spectroscopy and time-dependent external perturbations. We introduce two-dimensional spectroscopy of the linear and nonlinear bound-state response and resolve anharmonicities in the soliton interaction leading to overtone and sub-harmonic generation. Employing a non-perturbative interaction, we demonstrate all-optical switching between distinct states with different binding separation, opening up novel schemes of ultrafast spectroscopy, optical logic operations and all-optical memory.Mirroring the hierarchy of the atomic and molecular composition of matter, fundamental solitons constitute stable entities which can aggregate to form structures of increased complexity. Such condensation manifests in soliton fluids, molecules and crystals, as observed in diverse physical systems 2,9,10 . The underlying forces are responsible for various emergent phenomena, such as self-organization of Bose-Einstein condensates, soliton crystallization in micro-cavities, soliton fission in supercontinua or rogue waves in optical fiber [10][11][12][13][14][15] . It is wellknown that ultrashort solitons can form highly-stable bound-states, and these optical soliton molecules arise from balanced forces during propagation in passive fibers and in dissipative laser resonators [2][3][4][5]8,[16][17][18][19][20][21] . Recent real-time studies have revealed rapid transients, internal vibrations and even chaotic dynamics 6,7,[22][23][24] .In this study, we transfer the concepts of optical spectroscopy to the case of ultrafast soliton molecules by driving them with an external perturbation and monitoring their response in real time. We discover a resonance in the response of soliton molecules to external perturbation and probe the associated anharmonic binding potential (Fig. 1a, approach I). Applying stronger, non-perturbative stimuli, we also demonstrate reliable and reversible all-optical switching between two different bound states (Fig. 1a, approach II)suggesting applications in fast optical sampling and pulse control.