In this study, BiOI microspheres and the Ag2O/TiO2 heterostructure were synthesized to photocatalytically degrade atenolol (ATL) and carbamazepine (CBZ) in tap water and secondary effluent under Tunisian summer season sunlight. The materials were characterized through XRD, SEM, TEM and DRS. The Ag2O/TiO2 material excelled by completely removing both pharmaceuticals from tap water within 180 min of irradiation, while less than 20 % of CBZ persisted in effluent after 3 h of irradiation. Stability tests using the Ag2O/TiO2 heterostructure over five reaction cycles indicated consistent degradation rates for ATL (k ranged from 3.1 × 10-2 to 5.9 × 10-2 min−1). Conversely, CBZ degradation rates increased from k = 6.4 × 10-3 min−1 to k = 1.8 × 10-2 min−1 in the fifth cycle. This increase was attributed to changes in the oxidation state of silver nanoparticles deposited on TiO2. Quenching tests identified OH radicals as dominant in photocatalytic degradation, followed by photo-holes for CBZ, and O2− radicals for ATL. Through LC-MS/MS, degradation byproducts were identified, allowing for proposed degradation kinetics. Lastly, the toxicity of the byproducts was estimated using the ECOSAR model, displaying a decrease in the toxicity of hydroxylated intermediates, while aminated species represented higher potential for acute and chronic toxicity.