Herein, poly(aniline‐co‐pyrrole) has been synthetized and investigated to adsorb phenylbutazone (PBZ), ceftiofur (CEF) and prednisolone (PRD) in aqueous medium as proof of concept. After proper adsorbent characterization, some studies were carried out in batch process, i. e., contact time, pH, and concentration. The adsorption mechanism has been conducted using kinetic and isothermal models. It was found that the reaction equilibrium was reached in 20 min for all analytes. The best fit for the experimental data were obtained employing the models of dual‐site Langmuir–Freundlich, Fritz–Schlunder and Langmuir, with R2=0.999, 0.952 and 0.974, for PBZ, CEF and PRD, respectively. For PBZ, CEF and PRD, poly(aniline‐co‐pyrrole) provided a Qmax=238.8 mg g−1 and Kmax=0.086 L g−1, Q=0.028 mg g−1 and Kmax=3.258 L g−1, Q=13.66 mg g−1 and KL=0.005 L g−1, respectively. Finally, the copolymer was evaluated in solid phase extraction, which showed recovery around 70 % for PBZ, offering also exciting opportunities for further application in the separation process.