  Carbon- and Oxygen-rich stars populating the Thermally-Pulsing Asymptotic
Giant Branch (TP-AGB) phase of stellar evolution are relevant contributors to
the spectra of ~1 Gyr old populations. Atmosphere models for these types are
uncertain, due to complex molecules and mass-loss effects. Empirical spectra
are then crucial, but samples are small due to the short (~3 Myr) TP-AGB
lifetime. Here we exploit the vastness of the MaNGA Stellar library MaStar
(~60,000 spectra) to identify C,O-rich type stars. We define an optical colour
selection with cuts of (g-r)>2 and (g-i)<1.55(g-r)-0.07, calibrated with known
C- and O- rich spectra. This identifies C-,O-rich stars along clean, separated
sequences. An analogue selection is found in V,R,I bands. Our equation
identifies C- and O-rich spectra with predictive performance metric F1-scores
of 0.72 and 0.74 (over 1), respectively. We finally identify 41 C- and 87
O-rich type AGB stars in MaStar, 5 and 49 of which do not have a SIMBAD
counterpart. We also detect a sample of non-AGB, dwarf C-stars. We further
design a fitting procedure to classify the spectra into broad spectral types,
by using as fitting templates empirical C and O-rich spectra. We find
remarkably good fits for the majority of candidates and categorise them into C-
and O-rich bins following existing classifications, which correlate to
effective temperature. Our selection models can be applied to large photometric
surveys (e.g. Euclid, Rubin). The classified spectra will facilitate future
evolutionary population synthesis models.
