## 1 Introduction  
Ibuprofen, that is 2-{4-(2-methylpropyl) phenyl} propanoic acid and ketoprofen--2-(3-benzoylly) propanoic acid, belong to the broad group of non-steroidal anti-inflammatory drugs (NSAIDs). Most probably, they work by non-selective inhibition of cyclooxygenase enzymes that promote inflammation [1]. In addition to their anti-inflammatory effect, they also have an analgesic effect. Ibuprofen and ketoprofen are commonly used to treat mild to moderate muscle pain, dysmenorrhea, fever, and inflammation. Moreover, ketoprofen is used to treat rheumatoid arthritis, osteoarthritis, postoperative pain, and postpartum pain. The high consumption of ibuprofen, as well as low-dose ketoprofen, results from their high availability; they are over-the-counter drugs (OTC). In many European countries, pharmaceuticals containing ibuprofen can also be purchased outside pharmacies [2]. According to Industry Research, the global ibuprofen market was valued at USD 89 million in 2020 and is expected to reach USD 109 million by the end of 2027 [3]. High consumption, incorrect storage, and bad disposal of medicinal substances lead to increasing environmental pollution by drugs and their metabolites. NSAIDs are detected in surface waters, groundwater, and even bottled mineral waters [4; 5]. Traditional wastewater treatment plants are unable to remove drugs with low levels of ppm or ppb in the wastewater. In many European, African countries, and the US, NSAIDs are still detected in the waters flowing from wastewater treatment plants [6; 7; 8; 9; 10]. Since ibuprofen and ketoprofen, as cyclooxygenase inhibitors, interact with the human endocrine system, the amount of their consumption should be carefully controlled. In addition to affecting the human body, these substances and their biologically active metabolites adversely affect aquatic organisms. In order to know in detail, the effects of pharmaceuticals present in the environment on living organisms, their quantity must first be precisely determined. Conducting a quantitative analysis of medicinal substances present in lakes or rivers in very low concentrations requires a preliminary concentration of the samples. Only preconcentrated samples can be analyzed using chromatographs working with sensitive mass spectrometry detectors, but when the concentration of samples is high enough, it is also possible to use cheaper and more widely available UV detectors. Solid-phase extraction (SPE) is very often used to preconcentrate and clean up water samples. Among the sorbents mainly used in SPE to concentrate ibuprofen and ketoprofen are commercially available materials based on modified silica, e.g., Strata X, C18, and Oasis hydrophilic-lipophilic balanced (HLB) sorbents [11; 12; 13; 14; 15]. However, they cannot be used in all the pH ranges and only single-use is recommended, which is not environmentally friendly. Polymer sorbents are a useful alternative because of their properties such as chemical resistance against organic solvents, acids and bases, mechanical strength, permanent porosity, variety of functionalities, high selectivity, and reusability. Among polymeric sorbents, much attention has been paid to molecularly imprinted polymers (MIP) that should be of enhanced selectivity than their nonimprinted counterparts. MIP towards ibuprofen were synthesized using different functional monomers, e.g., methacrylic acid [16], 2-vinylpyridine [17; 18], and towards ketoprofen using 4-vinylpyridine [19], methacrylic acid, and acrylamide [20]. For MIP synthesis, mainly bulk or precipitation polymerization is used. Polymers obtained via the bulk technique are in the form of blocks that have to be grounded before being used in SPE. This process generates a lot of waste, and the particles are of a broad size distribution. On the other hand, particles produced by the precipitation method are in the shape of microspheres, but their diameters are lower than 5 \(\upmu\)m, which is unfavorable for SPE sorbents.