Introduction

Oxytetracycline (OTC) is a member of the tetracycline class of antibiotics that is widely used in animal husbandry. However, only a small amount of OTC is absorbed, and more than 75% of tetracyclines are released into the environment in an active form via feces and urine, the spread of manure and biosolids, and treatment plant effluents.1,2 This huge daily release of antibiotics into the environment leads to an imbalance in the food chain by destroying the natural microbial ecological community, thus posing a threat to natural life in the environment. In addition, bacteria may develop resistance to antibiotics.3 OTC is also potentially toxic to humans and can cause hepatic damage.4,5 Therefore, the development of effective methods for removing OTC from the environment is critical, and numerous research efforts have focused on finding faster, easier, and lower-cost methods for achieving that. Different methods and techniques have been used including biological and chemical degradation,6,7 photodegradation,8,9,10,11 and adsorption.12,13,14,15 One of the easiest ways to remove OTC is to utilize different nanoparticles in the adsorption process. The effectiveness of various nanoparticles has been studied for the removal of OTC from water. For example, a Fe3O4@graphene magnetic nanocomposite was used to remove OTC and tetracycline (TET) from aqueous solutions. These nanocomposites used adsorption mechanisms to remove OTC, with an adsorption rate constant k = 0.974 g mg−1 h−1.16 Mesoporous carbon was used as a catalyst with enzymes to remove OTC, and the antibiotic removal assays that employed this catalyst exhibited better performance than the free enzymes, indicating that the removal mechanism was adsorption instead of degradation.17 Activated carbon was also produced from waste tea by H3PO4 activation to remove OTC under three different gas atmospheres: nitrogen (NAC), air (AAC), and steam (SAC). The authors found that activated carbon prepared under an air atmosphere showed the largest Brunauer–Emmett–Teller (BET) surface area and the best adsorption capacity.4

Carbon nitride-containing composites are among the most widely used of the novel eco-friendly materials for adsorption applications, due to their many attractive properties including wear resistance, chemical and thermal durability, facile synthesis, low density, water resistivity, biocompatibility, and stability in an ambient environment.18 Therefore, in the present work, a NiFe2O4@g-C3N4 nanocomposite is synthesized via thermal decomposition and utilized to remove OTC from water solution, and the crystallinity of the nanocomposite is investigated using powder x-ray diffraction (XRD).

Experimental Part

Nanosorbent Fabrication Procedure

The g-C3N4 powder was produced via the thermal decomposition of urea. A quantity of 3 g of urea was placed in a covered pot. It was then heated to a temperature of 550°C for 2 h, in steps of 10°C/min, while exposed to the surrounding environment. The raw yellow g-C3N4 was cooled, ground, and collected in a container, and NiFe2O4 nanomaterials were synthesized using an extract derived from Foeniculum vulgare seeds. Under stirring, 7.25 g of nickel nitrate hexahydrate (Ni(NO3)2·6H2O) and 20.2 g of iron nitrate nonahydrate (Fe(NO3)3·9H2O) were separately melted in 150 mL of pure water. Subsequently, the amalgamated solutions were agitated for an additional hour. An aliquot of 45 mL of Foeniculum vulgare extract was added. Subsequently, the materials were positioned on a hotplate heated to 100°C and agitated continuously until a thick gel materialized. The gel was subjected to heating in an oven, reaching a temperature of 150°C, and subsequently dried and crushed into a fine powder. The powder was subjected to grinding and sintering at a temperature of 750°C for 120 min to eliminate other impurities and generate nanostructures of NiFe2O4. The NiFe2O4@g-C3N4 nanocomposite was formed by dispersing 2 g of NiFe2O4 nanoparticles onto 4 g of created g-C3N4 nanosheets in 110 mL of isopropanol solvent. The obtained mixture was then subjected to sonication for 60 min. The suspension of the mixture was dried in an oven at 90°C for 16 h, and finally, the nanosorbent was annealed for 24 h at 140°C.

Nanosorbent Description

XRD analysis was performed on the NiFe2O4@g-C3N4 nanosorbent in a 2θ range from 20° to 80° using a Rigaku Ultima IV diffractometer. The different functional groups in the NiFe2O4@g-C3N4 nanosorbent were identified using Fourier transform infrared (FTIR) spectroscopy (Shimadzu IR Affinity-1 spectrometer with deuterated l-alanine-doped triglycine sulfate [DLaTGS] detector). The process involves the preparation of moisture-free KBr adsorbent pellets and then scanning them over an infrared (IR) range of 4000–400 cm−1 at a resolution of 4 cm−1 over 60 scans to capture the spectra. The BET system was employed to assess the surface area and porosity of the NiFe2O4@g-C3N4 nanocomposite by testing N2 adsorption at 77 K using a Micromeritics ASAP 2020 HD 88 analyzer. Before the investigation, the powder sample was outgassed at 250°C for 6 h under continuous He flow. Finally, the Lippens and de Boer t-plot approach was employed. The surface morphology and elemental content of the NiFe2O4@g-C3N4 nanosorbent were determined by energy-dispersive x-ray spectroscopy (EDX) and field-emission scanning electron microscopy. For determining the concentration of the antibiotic, a Labomed UVS-2800 UV–Vis spectrophotometer was utilized. The residual antibiotic concentration was measured at λmax = 265 nm, 277 nm, and 348 nm for OTC, ciprofloxacin (CIP), and TET, respectively.

Oxytetracycline Elimination Method

Adsorption experiments were conducted to investigate the removal of OTC using the NiFe2O4@g-C3N4 nanosorbent. Multiple variables were considered, including the starting concentration of OTC, the time of equilibrium contact, the preparatory solution pH, and the nanosorbent dose. OTC was eliminated on a nanosorbent composed of NiFe2O4@g-C3N4, with a reaction volume of 25 mL OTC (2.5–200 parts per million [ppm]) and dose of 10 mg adsorbent. The impact of pH on the solutions was determined by adding different concentrations of (0.1 M) HCl or (0.1 M) NaOH within the range of 3.0−11. This procedure was performed to determine the maximum pH required for eliminating OTC and the contact duration, which ranged from 5 to 1440 min. In the kinetic studies, a mixture of 10 ppm and 160 mL of OTC was combined with 60 mg of nanosorbent (dose) for 1440 min. Subsequently, a volume of 8 mL of the suspension was extracted and subjected to filtration using a 0.45 µm syringe filter to eliminate the nanosorbent. The concentration of OTC was determined using a UV/Vis spectrophotometer. The tests were conducted in triplicate, and the average removal efficiency was calculated. The adsorption capacity and percentage of OTC removal of the nanosorbent were determined using the following equations:

$$ q_{{\text{e}}} = \frac{m}{V} \left( {C_{{0}} - C_{{\text{e}}} } \right) $$
(1)
$$ {\text{OTC}}\;{\text{elimination}} \left( \% \right) = 100 \times \frac{{\left( {C_{0} - C_{{\text{e}}} } \right)}}{{C_{0} }} $$
(2)

where C0 and Ce denote the initial and final concentrations of OTC, respectively, m (g) is the dose of nanosorbent, and V (L) represents the volume of the OTC solution.

Results and Discussion

In the XRD graph (Fig. 1a), the diffraction peaks of NiFe2O4 appearing at 18.1°, 30.3°, 35.5°, 37.2°, 43.4°, 53.7°, 57.2°, and 63.0° belong to the (111), (220), (311), (222), (400), (422), (511) and (440) diffraction planes that best match with JCPDS card no. 74-2081 documented for the cubic spinel NFO.19,20,21 Additional peaks at 2θ ≈ 13.1° and 27.4° correspond to the g-C3N4 features, where the first peak can be ascribed to the in-plane structural motifs of the tri-s-triazine units (100) and the latter to the interlayer stacking of conjugated aromatic system (002) lattices of graphene nitride (JCPDS 87-1526).22 The d100 and d002 values of 0.6743 nm and 0.3252 nm, respectively, correspond to those reported in the literature.23,24 Parameters including the crystallite size (D nm), lattice constant (a), d-spacing (d Å), volume (V), micro-strain (ε), distance between magnetic ions (ion jump lengths) located in tetrahedral A-site (LA) and octahedral B-site (LB), and the theoretical density (ρx) were calculated as follows25,26 and recorded in Table I.

$$ D = \frac{0.9\lambda }{{\beta \cos \theta }} $$
(3)
$$ d = \frac{\lambda }{2\sin \theta } $$
(4)
$$ d = \frac{a}{{\sqrt {h^{2} + k^{2} + l^{2} } }} $$
(5)
$$ V = a^{3} $$
(6)
$$ \varepsilon = \frac{\beta }{4\tan \left( \theta \right)} $$
(7)
$$ L_{{\text{A}}} = \frac{\sqrt 3 a}{4} $$
(8)
$$ L_{{\text{B}}} = \frac{\sqrt 2 a}{4} $$
(9)
$$ \rho_{{\text{x}}} = \frac{8M}{{Na^{3} }} $$
(10)
Fig. 1
figure 1

The (a) XRD patterns, (b) FTIR, (c) N2-adsorption isotherm, and (d) pore size distribution for the NiFe2O4@g-C3N4 nanosorbent.

Table I The XRD structural parameters for NiFe2O4@g-C3N4

The calculated parameters are in agreement with data reported in the literature for NiFe2O426,27,28 and g-C3N4.23,29,30

The FTIR spectral analysis of NiFe2O4@g-C3N4 (Fig. 1b) was conducted to determine the functional groups present in its structure and the possible ways they are bonded. The graph shows a broad band between 3350 cm−1 and 3100 cm−1, which can be assigned to the stretching modes of O–H and N–H bonds of the terminal amines (–NH3 and =NH).31 Two peaks at 2980 cm−1 and 2900 cm−1 represent the stretching modes of C–H bonds.32 The peaks observed at 1627 cm−1 and 1318 cm−1 correspond to the stretching mode of C=N and C–N bonds, respectively. The band at 1245–1574 cm−1 can be allocated to the stretching vibration of C=N heterocycles.33 The nitride distinctive bending modes triazine units and the deformation modes of N–H appear at 890 cm−1 and 808 cm−1, respectively.34 In addition, the minor peaks observed at 564–485 cm−1 can be attributed to the M–O stretching vibration in the spinel ferrite.35

The N2 adsorption isotherm as a measure of the adsorbent surface area and pore structure was investigated to explore the influence of its porosity on pollutant waste adsorption. Figure 1c shows the type IV model isotherm as per IUPAC taxonomy36 for the mesoporous nanostructure feature. The type H3 hysteresis loop in the high-pressure range (0.7 < P/P0 < 0.9) was associated with the evolution of a slit-like and/or plate-like pore configuration.37,38 The BET surface area of the composites is 59.44 m2 g−1, which can be ascribed to the operative insertion effect of NiFe2O4 nanoparticles between the 2D layers of g-C3N4.39 The pore size distribution (Fig. 1d) shows particles in the range of 20–100 Å with pore radius and volume of 19.3 Å and 0.223 cm3/g, respectively. The excellent mesoporous nature of the composite offers a large number of sites, which increases the adsorption capacity.

The EDX spectrum (Fig. 2g) reveals individual peaks of N, C, Ni, Fe, and O. The elemental atomic percentages were found to be 26.26%, 52.54%, 0.95%, 1.60%, and 18.66% for N, C, Ni, Fe, and O, respectively. No impurity-associated peaks were detected from either XRD or EDX patterns, indicating the purity of the synthesized nanostructure. This is consistent with the color-coded elemental mapping (Fig. 2a, b, c, d, e, and f) that shows homogeneous distribution of only the constituent elements. The morphology of the fabricated composites is illustrated by the transmission electron microscopy (TEM) and scanning electron microscopy (SEM) images provided in Fig. 3. The TEM image (Fig. 3a) of the composite reveals the distinct layered sheet structure of g-C3N4, and the high-resolution image (Fig. 3b) shows the dispersion of NiFe2O4 nanoparticles 53–65 nm in size within the g-C3N4 nanosheets. The SEM images of the layered pure g-C3N4 sheets (Fig. 3c) and the NiFe2O4 nanoparticles (Fig. 3d) confirm the (Fig. 3b) image for the dispersal of the NiFe2O4 nanoparticles on the g-C3N4 sheets.

Fig. 2
figure 2

Elemental mapping (a–f) and EDX (g) for the NiFe2O4@g-C3N4 nanostructures.

Fig. 3
figure 3

The TEM images of the NiFe2O4 (a, b), The SEM of g-C3N4 (c) and NiFe2O4 (d).

The surface elements and their oxidation states were explored using x-ray photoelectron spectroscopy (XPS) analysis. The broad C 1s (Fig. 4a) peak displays two key binding energies at 277 eV and 280 eV, which represent the C–C and C–N=C bonds, respectively.40 The N 1s peaks (Fig. 4b) positioned at 398 eV, 399 eV, and 400 eV binding energies can be associated with the sp2-hybridized nitrogen C=N–C, ternary nitrogen (N–(C)3), and amino functional groups (C–N–H), respectively.41,42 The higher binding energy peak of O 1s (Fig. 4c) at 533 eV can be attributed to surface-adsorbed hydroxyl (OH) groups, while the incidence of lattice oxygen (Olattice) can be confirmed by the other peak at the lower binding energy of 530 eV.43 Binding energy peaks of Fe 2p3/2 and 2p1/2 of Fe2O3 are observed at 719 eV and 730 eV, respectively (Fig. 4d).44 The Ni 2p XPS spectrum (Fig. 4e) shows the key Ni 2p3/2 (857 eV) and Ni 2p1/2 (861 eV) peaks.45

Fig. 4
figure 4

Detailed XPS peaks of (a) C, (b) N, (c) O, (d) Fe, and (e) Ni on the NiFe2O4@g-C3N4 surface.

Oxytetracycline Adsorption Study

Impact of Time, Concentration, and pH

Contact time is an essential factor that greatly affects the adsorption equilibrium process. The impact of contact time on the amount of adsorbed OTC elimination (qt) at pH = 7 and ambient temperature is shown in Fig. 5a. A sharp increase in the adsorbed quantity of OTC can be seen at the beginning, which is a logical consequence of the availability of free adsorption sites to accommodate more adsorbent.46 Nevertheless, as contact time elapses, the accessible adsorption sites are saturated, and more repulsions arise between the OTC molecules in the liquid phase and on the NiFe2O4@g-C3N4 surface.47 As a result, the OTC adsorption decreases until it reaches steady adsorption capacity at ≈ 66 min, indicating that an equilibrium state is attained.

Fig. 5
figure 5

The effects of contact time (a), initial OTC concentration (b), pH (c), and point of zero charge (pHPZC) on OTC adsorption.

The impact of the initial OTC concentration was assessed over a concentration range of 5–200 mg/L under ambient operating settings of 10 mg NiFe2O4@g-C3N4 with 25 mL at room temperature, and a 24-h time interval. Figure 5b shows that the amount of adsorbed OTC (qt) rises steadily as the initial concentration is increased. This particular situation implies that the key driving force was that the increase in the initial concentration eliminated any obstruction to OTC movement within the medium, increasing the frequency of collision between molecules of OTC and NiFe2O4@g-C3N4, and as the number of effective collisions increased, the adsorption quantity increased.48 This explains the direct relation between the OTC adsorbed fraction and the initial concentration.

The solution pH affects the extent of adsorption, as it alters the surface properties of both adsorbents and adsorbates by protonating or deprotonating functional groups in addition to the presence of H+, H3O+, or OH at different pH values. Depending on the medium pH, the tri-carbonyl group of OCT can be deprotonated to produce a positively charged species with pKa1 = 3.22 at pH < 3.5, while at pH 3.5–7.5 the phenolic-diketone group loses a proton (pKa2 = 7.46), and at pH > 7.5, phenolic-diketone (pKa3 = 8.94).49 In other words, it is dominantly present as OTC+ cation at pH ≈ 4, as bipolar form (OTC±) at pH ≈ 7, and as OTC and OTC−2 at pH > 7.5.50 Figure 5c shows the percentage removal of OTC in the pH 3–11 range, where the maximum uptake took place at pH = 7. The low elimination percentage observed at pH 3 and 5 may be attributed to the competitive effect of H+ or H3O+ and the protonated –NH and –NH2 functional groups on the composite’s surface repulsions with the cationic OTC+ form. In the alkaline region of the pH, i.e. 9 and 11, the presence of excess OH may impair the OTC and OTC−2 adsorption, resulting in a lower removal percentage. The point of zero charge (pHPZC) is another factor that controls the adsorption process, as it determines the adsorbent surface charge. As shown in Fig. 5d, the pHPZC value was determined to be 4.56, which implies a positively charged composite surface at pH < 4.56 and a negatively charged surface at pH > 4.56.51 This can explain the variation in the removal percentage at different pH values. At low pH values, the repulsive forces between the positively charged composite surface and the OTC+ may account for the low removal percentage, whereas the repulsion between the negative charge on the NiFe2O4@g-C3N4 surface and the OTC and OTC−2 species reduces the extent of adsorption. Thus, the highest elimination observed in the neutral medium pH = 7 can be attributed to the attractive interaction between the bipolar zwitterion (OTC±) form and the NiFe2O4@g-C3N4 surface.52 This finding is consistent with OTC adsorption on modified carbon nanotubes,48 sedimentary soil,52 and reed residues.53

OTC Adsorption Isotherm Modeling

Adsorption isotherms provide vital information regarding the distribution of molecules between the solid and liquid phases at the equilibrium state of adsorption as the central means for estimating the adsorbate distribution over the solid/liquid interface, along with the assessment of adsorbent adsorption capacity. The most commonly considered are Freundlich’s and Langmuir’s isotherm models to fit the experimental adsorption data. The Langmuir model characterizes a continuous monolayer of adsorbate on a homogeneous surface, where the adsorbent sites interact with the adsorbate with the same energy, with no interaction between neighboring adsorbent sites and adsorbed entities. On the other hand, the Freundlich model adopts an inhomogeneous system with reversible adsorption, which is not confined to monolayer adsorption. The Temkin isotherm is also investigated in this work, where its empirical form considers adsorbent/adsorbate interactions that ignore the very high and low concentration ranges. The model assumes that the enthalpy of removal (ΔHads) of all molecules existing in the layer decreases linearly instead of logarithmically as the surface coverage increases.54 The parameter (BT/RTb) is associated with sorption heat (J mol−1), and Km (L g−1) is an extra constant for the isotherm. The nonlinear plots of the adsorption isotherms (Fig. 6a, b, and c) and the listed parameters (Table II) indicate that the Langmuir model is the most appropriate for the experimental data fitting because it has the highest R2 (0.9945) and lowest R-Chi-S (108.6) values relative to the Freundlich and Temkin isotherms. Furthermore, the RL = 0.034 < 1 supports favorable adsorption, achieving outstanding OTC adsorption reaching 1634 mg g−1. However, because of the high R2 (0.9842) and relatively low R-Chi-S (111.9) values, the Freundlich model partially exemplifies the data as 1/n = 0.879 < 1, which implies a favorable adsorption process. The remarkably small R2 (0.6301) and the high R-Chi-S (7245) of the Temkin isotherm model disqualify it from being used for fitting of the adsorption data. Thus, the equilibrium study findings indicate that the Langmuir isotherm best fits the data in addition to some contribution from the Freundlich isotherm, which implies a predominant chemisorption together with some features of a physisorption effect for the OTC onto the nanosorbent.

Fig. 6
figure 6

Nonlinear adsorption isotherms: (a) Langmuir, (b) Freundlich, and (c) Temkin models.

Table II The parameters estimated for OTC adsorption isotherms

OTC Adsorption Nonlinear Kinetics Modeling

Understanding the adsorption kinetics of the sorbent is critical for the environmental remediation of antibiotics. The pseudo-first-order (PFO), pseudo-second-order (PSO), Elovich (Fig. 7a, b, and c), and intra-particle diffusion (IPD) (Fig. 7d) models were explored to assess the OTC adsorption onto the NiFe2O4@g-C3N4 nanomaterials. The pseudo-first-order model assumes the existence of a linear relationship between the available binding sites and the number of unoccupied active sites.58 The collision between the adsorbate and the free sites on the adsorbent surface is considered the rate-determining step in the PSO,59 whereas the pseudo-second-order kinetic model assumes a rate-determining step involving a chemical adsorption reaction including the sharing or transfer of valence electrons between the adsorbent and adsorbate.60 The nonlinear forms of the adsorption kinetics models are plotted in Fig. 7d to estimate the adsorption parameters and specify the rate-limiting steps in the process,61 and the calculated parameters are presented in Table III. A comparison of the PFO and PSO models reveals the superiority of the PFO for OTC adsorption by the NiFe2O4@g-C3N4 nanostructures, with good agreement between the calculated (qm = 38.02 mg g−1) and experimental (q = 38.28 mg g−1) values and large correlation coefficient (R2 = 0.9873). However, the PSO model with the relatively large R2 = 0.9657, high initial adsorption rate h0 = 24.7618 mg g−1 min−1, and short half-life t1/2 = 6.0067 min can also take part in the adsorption kinetics. Thus the data confirm the suitability of both the PFO and PSO kinetic models for OTC adsorption onto the NiFe2O4@g-C3N4 (Fig. 7 and Table III), which supports both physisorption and chemisorption mechanisms for the OTC adsorption onto the NiFe2O4@g-C3N4 nanosorbent.62 To better understand the OTC adsorption mechanism, the intra-particle diffusion (IPD) model was explored. If the Weber–Morris graph (qt versus t0.5) has a linear correlation and crosses the origin, the adsorption process will be governed solely by intra-particle diffusion.63 However, in the case where the experimental data have multi-linearity, then the adsorption process will occur under the influence of two or more steps or their combination.51 The graph of this model (Fig. 7d) indicates two stages of linearity, with neither of them passing through the origin. This is proof that the adsorption mechanism is controlled by processes other than intra-particle diffusion. The first step represents a mass transfer of OTC molecules from the liquid phase to the adsorbent surface or film diffusion.64 In addition, the high concentration of OTC on the NiFe2O4@g-C3N4 surface and in solution creates a strong driving force to accelerate the adsorption process. During the second stage, the surface adsorption sites tend to become saturated, developing increased resistance for the OTC adsorption into the pores, resulting in a slower adsorption rate and reduced slope of the linear graph.65 The higher correlation coefficient (R12) and diffusion constant (kdif1) of the earlier stage (Table III) indicate the predominance of the film adsorption mechanism for OTC adsorption.49

Fig. 7
figure 7

The PFO (a), PSO (b), Elovich (c) and IPD (d) kinetics models for OTC adsorption.

Table III Kinetics parameters for OTC adsorption

In addition, Bangham’s kinetic model was employed, where the symbols C0, V, and m denote the initial OTC concentration (mg/L), the solution volume (mL), and the mass of the adsorbent added to the solution (g/L), respectively, and αβ (< 1) and k0 are the model constants.69 The linear graph (Fig. 8a) obtained by plotting log(log(C0/C0·mqt)) against log(t), and the low R2 (0.9258) and αβ (0.5324 < 1) established the incomplete relevance of Bangham’s kinetic model to the adsorption process, which suggests that the adsorption kinetics of the OTC removal achieved by the NiFe2O4@g-C3N4 are not governed by pore diffusion.70

Fig. 8
figure 8

The (a) Bangham and (b) Boyd kinetics models.

The role of film diffusion in the adsorption process can be verified by the Boyd model for chemisorption kinetics71:

$$ B_{{\text{t}}} = - 0.4977 - ln\left( {1 - F} \right) $$
(11)
$$ F = \frac{{q_{{\text{t}}} }}{{q_{{\text{e}}} }} $$
(12)

where F is the fraction of the antibiotic molecules adsorbed at any time t (qt) and equilibrium (qe), and Bt is the Fdependent variable. If the Bt versus t plot is linear and has zero intercept, then the pore diffusion is considered the rate-controlling step in the sorption process, i.e. passive diffusion; otherwise, the surface (film) diffusion is dominant.72 The applicability of the Boyd model is confirmed by the Bt versus t linear graph and the large value of R2 = 0.9927 (Fig. 8b) without passing through the origin. This suggests that film diffusion or chemical reaction controlled the adsorption kinetics.73 The diffusion factor (Di) can be calculated using the Boyd plot (β) and the absorbent surface area (A)74:

$$ D_{i} = \frac{\beta }{\pi A} $$
(13)

Depending on the diffusion coefficient, the diffusion is described as film diffusion-controlled, where Di is 10−6–10−8 cm−2 g−1 min−1, whereas in the case the pore diffusion is the slowest and hence rate-determining step, the value of Di is in the range of 10−11–10−13 cm−2 g−1 min−1cm2. The calculated Di value (1.31 × 10−8 cm−2 g−1 min−1) indicates that the intra-particle phenomenon of the diffusion rate is governed by the film diffusion75, which excludes the dominance of pore diffusion as revealed by Bangham’s kinetic model.68

OTC Adsorption Mechanism

FTIR characterization of the nanocomposite with and without loaded OTC was undertaken to better understand the mechanism of OTC elimination. As shown in Fig. 8, the FTIR spectra of free OTC exhibited a band at 3608 cm−1, which can be attributed to O–H stretching vibrations. The N–H stretching vibrations of the OTC molecule’s amide were detected at a wave number of 3364 cm−1. The peaks seen at 1661 cm−1 and 1528 cm−1 were assigned to the amide group’s C=O and NH2 functional groups, respectively. The peaks at 1619 cm−1 and 1582 cm−1 were assigned to the C=O functional group and the amide –NH group, respectively, while the signal at 1453 cm−1 signal was assigned to the C=C skeletal vibration.49 The FTIR spectra of NFO show significant differences with and without the loaded OTC (Fig. 9). The bandwidth at 3000–3400 cm−1 is altered somewhat, indicating that the NiFe2O4@g-C3N4 nanocomposite’s –OH and –NH2 groups were entangled during adsorption. This could be due to the interaction of hydrogen bonds between the NiFe2O4@g-C3N4 nanosorbent and OTC molecules.76 In addition, the N–H stretching vibration band of the OTC molecule was shifted to 1652 cm−1 upon adsorption. The decrease in the wave numbers of the N–H stretching band suggests the involvement of this group in hydrogen bonding.77 Furthermore, after the adsorption of OTC molecules, a vibrational triazine ring mode at 890 cm−1 underwent a virtual shift (882 cm−1), which can be attributed to the ππ interaction between the OTC aromatic rings and the π-electron clouds present in the g-C3N4 skeleton.78

Fig. 9
figure 9

FTIR frequencies of the prepared NiFe2O4@g-C3N4 nanosorbent before and after OTC adsorption.

The FTIR analysis provided evidence of the existence of many functional groups, including –OH and –NH2, and the ππ electron density. These functional groups can potentially regulate the OTC adsorption process on the NiFe2O4@g-C3N4 structural. Therefore, it is possible for adsorbent surfaces and OTC molecules to come into contact with each other by ππ interaction and hydrogen bonds. An illustration of the potential adsorption process of OTC molecules onto the NiFe2O4@g-C3N4 nanosorbent is presented in Fig. 10.

Fig. 10
figure 10

Illustration of the potential adsorption process of OTC molecules onto NiFe2O4@g-C3N4 nanosorbent.

OTC Adsorption Selectivity

To determine the selectivity of NiFe2O4@g-C3N4, a variety of combinations of OTC with other antibiotics (CIP and TET) were investigated (Fig. 11).79 Three combinations, two binary and one ternary, were prepared. The binary mixture 1 contained OTC and CIP, the binary mixture 2 contained OTC and TET, and the ternary mixture contained OTC, CIP, and TET. The antibiotic concentration in each mixture was taken to be 5 ppm. Figure 11a shows that NiFe2O4@g-C3N4 eliminated 95.2% of the OTC while adsorbing only 76.6% of the CIP in combination 1. As shown in Fig. 11b, the nanocomposite adsorbed 84.1% of the OTC and 82.3% of the TET from mixture 2. In the case of the ternary mixture (Fig. 11c), NiFe2O4@g-C3N4 was able to remove 92.0% of OTC, 75.7% of CIP, and 90.6% of TET. According to these findings, the NiFe2O4@g-C3N4 nanosorbent demonstrates a high level of adsorption selectivity for tetracycline antibiotics (Fig. 11d).

Fig. 11
figure 11

UV spectra before and after adsorption of (a) mixture 1 (OTC and CIP), (b) mixture 2 (OTC and TET), and (c) mixture 3 (OTC, CIP, and TET), and (d) removal efficiency of NiFe2O4@g-C3N4.

Recycling of the Fabricated NiFe2O4@g-C3N4 Nanosorbent

The recyclability of the NiFe2O4@g-C3N4 nanosorbent was assessed by conducting four adsorption and desorption cycles, as shown in Fig. 12. It can be seen that the NiFe2O4@g-C3N4 nanosorbent’s capacity to absorb the OTC pollutant decreased as the number of cycles increased. This can be attributed to the deterioration of the active binding sites on the nanosorbent and the irreversible adsorption of the OTC molecules. The desorption efficiency of the NiFe2O4@g-C3N4 nanosorbent decreased from 95.3% in the first cycle to 80.8% in the fourth cycle, resulting in a reduction in efficiency of 14.5% after the four cycles. These results demonstrate the exceptional effectiveness and stability of the NiFe2O4@g-C3N4 nanosorbent during the adsorption of OTC antibiotics. Thus, the NiFe2O4@g-C3N4 nanosorbent is an effective adsorbent for efficient removal of significant quantities of the OTC antibiotic.

Fig. 12
figure 12

Regeneration cycles of constructed NiFe2O4@g-C3N4 nanosorbent.

Comparative Study

The data in Table IV reveal the high performance of the NiFe2O4@g-C3N4 composite towards the elimination of the OTC antibiotic relative to other adsorbents, confirming the effectiveness of the prepared composite for antibiotic removal.

Table IV Comparison of the NiFe2O4@g-C3N4 adsorption efficiency with that of other adsorbents

Conclusion

This study successfully prepared a NiFe2O4@g-C3N4 nanosorbent for the efficient removal of OTC from water, using eco-friendly sol-gel and ultrasonication techniques. Characterization studies confirmed the development of a nanosorbent with a large surface area and small crystallite size. The NiFe2O4@g-C3N4 nanosorbent demonstrated effective selectivity for OTC and facilitated simple regeneration. The analysis of the adsorption kinetics showed that the OTC adsorption process followed the pseudo-second-order rate equation, with chemisorption being the main mechanism for antibiotic adsorption onto the nanosorbent. The data fit the Langmuir isotherm model better than the Temkin and Freundlich models. The artificial nanosorbent demonstrated elimination capacity of 1634 mg g−1. In addition, an adsorption mechanism for OTC was proposed along with a straightforward technique for producing a reusable nanomaterial, NiFe2O4@g-C3N4, with possibilities for use in environmental remediation and reduction of antibiotic residues.