In the present study, the applicability of ZIF-8/LDH/GO/PVDF as a sorbent for the thin film microextraction (TFME) method is introduced. The TFME method followed by high-performance liquid chromatographyultraviolet detection (TFME-HPLC-UV) was applied for the rapid extraction and determination of caffeine (as a model analyte) in various caffeine beverages and urine samples. Parameters that affect the extraction of caffeine were optimized in two consecutive steps as follows: first, a Plackett–Burman Design (PBD) was utilized to screen the significant factors. Then, the screened factors were optimized by utilizing Box–Behnken Design (BBD). Under the optimized conditions (extraction time ¼ 20 min, stirring rate ¼ 665 rpm, salt effect ¼ 20% w/v, 100 mL of methanol and desorption time ¼ 2 min), the method showed good linearity in the ranges of 0.1–200 mg L1 and 0.2–200 mg L1 for caffeine in water and urine samples, respectively. The determined coefficients of determination (R2) were higher than 0.9968. Relative standard deviations (RSDs) for intra-day precision of caffeine at 10 mg L1 were 4.8% and 5.1% in water and urine samples, respectively. Finally, the method was successfully utilized for preconcentration and measurement of caffeine in various caffeine beverages and urine samples.