## 1 Introduction  
The recent increase in the human population and the development of industry have been the main contributors to the growing number of pollutants in the natural environment. The introduction of harmful substances into the air, water, and soil, in addition to having a negative impact on ecosystems and climate, is a direct threat to human health. Furthermore, these compounds can be easily transported between water reservoirs, like from wastewater to river water, to dam water, consequently reaching drinking water and becoming a serious threat to human health. These new emerging pollutants are considered very dangerous, even in trace amounts, due to their serious ecological side effects. Therefore, water pollution by nonsteroidal anti-inflammatory drugs (NSAIDs) has become a subject of global interest and of great interest to major international organizations such as the World Health Organization, United States State Agency for Environmental Protection, and the European Commission [1; 2; 3]. Among several emerging pollutants, NSAIDs are the most common compounds detected in environmental compartments due to their large consumption throughout the world [4]. Pain is a serious public health problem worldwide. About 27% of the adult population suffers from chronic pain [5; 6]. If left untreated, it may be associated with the risk of harmful health effects (e.g., delayed wound healing, immunity disorders, or cardiovascular problems). In addition,it can negatively affect quality of life, daily functioning, sleep, interpersonal relationships, and work performance [7; 8]. Pain alleviation through medication has resulted in widespread NSAIDs use as over-the-counter drugs. These are analgesics and antipyretics which also have anti-inflammatory effects at higher doses [9; 10]. The most common members of this group of drugs are ibuprofen, naproxen, and diclofenac. The widespread availability and abuse thereof may lead to the accumulation of these substances in the environment. Their presence in the aquatic environment could have negative health effects on certain species, while long-time exposure could cause various risks such as drug resistance in humans and animals, even at low concentrations (usually in micro- or nanograms per liter). The nonbiodegradability of NSAIDs makes them easily accumulate in the environment [11; 12; 13]. Therefore, it is of great importance to develop a sensitive, selective, and cost-effective method to accurately monitor NSAIDs in the environment [14; 15; 16; 17]. According to the literature, the use of molecularly imprinted polymers (MIPs) or magnetic MIPs (mag-MIPs) [18] is a promising approach for the removal of trace pollutants from water. The technology of the production of MIPs is based on the formation of complexes between the analyte/template/guest molecule and the functional monomer/host molecule [19; 20]. The technique involves the polymerization of functional monomers and a cross-linker around a template. The analyte-monomer complex is then subjected to polymerization initiated by temperature or irradiation (thermal or photoinitiation), during which a three-dimensional polymer structure is formed [21; 22; 23]. At the subsequent stage, the template is removed from the obtained polymer structure, leaving empty cavities capable of binding the template molecules as they are complementary to these template molecules in size, shape, and functional group positions. The polymers obtained are chemically stable and water-insoluble, which permits their multiple uses in chemical analysis. Moreover, their synthesis process is relatively simple, reproducible, and cheap [24]. MIPs have been employed in fields requiring a certain degree of selectivity, such as sensing, catalysis, and chromatography. However, nowadays, their use in solid-phase extraction (SPE), so-called MISPE, is by far the most advanced technical application of MIPs. The use of MIPs as selective sorbent materials allows for performing a customized sample treatment step prior to the final determination.