In the present work, a modified supercritical fluid apparatus was applied to pressurized fluid extraction (PFE) of oil from pistachio samples. The effective variables such as temperature, solvent volume (n-hexane), and crushed glass were tested and optimized by a factorial design. The PFE yield (i.e 52.6 g/100g) and fatty acid composition of pistachio oil were found similar to Soxhlet extraction. Furthermore, the PFE method was applied for the extraction of aflatoxins B 1 and B 2 from contaminated pistachio kernels. Solution of 80% (v/v) methanol in water as the extraction solvent at flow rate of 0.5 mL.min -1 and temperatures higher than 80 o C were obtained for efficient extraction of aflatoxins from spiked and naturally contaminated pistachio kernels. The extraction yield or recovery was about 20% higher than the conventional methods such as the AOAC. In the second section, ion mobility spectrometry (IMS) was applied for the determination of total concentration of aflatoxins B 1 and B 2 . A new injection port was designed to introduce liquid samples into the IMS. The linear dynamic ranges for aflatoxins were in the range of 2.0 to 70 ng with a limit of detection (LOD) of the 0.25 ng. Addition of ammonia as the dopant to the carrier gas improved the LOD by a factor of 2.5. Head space extraction followed by the IMS has also been applied for the determination of methadone in spiked human hair. The analytical parameters obtained demonstrated the capability of the method for the detection of methadone in human hair samples.