Objective. High frequency oscillations (HFOs) in intracranial electroencephalography (iEEG) recordings are considered as promising clinical biomarkers of epileptogenic regions in the brain. The aim of this study is to improve and automatize the detection of HFOs by exploring the time frequency content of iEEG and to investigate the seizure onset zone (SOZ) detection accuracy during the sleep, awake and pre-ictal states in patients with epilepsy, for the purpose of assisting the localization of SOZ in clinical practice. Approach. Ten-minute iEEG segments were defined during different states in eight patients with refractory epilepsy. A three-stage algorithm was implemented to detect HFOs in these segments. First, an amplitude based initial detection threshold was used to generate a large pool of HFO candidates. Then distinguishing features were extracted from the time and time frequency domain of the raw iEEG and used with a Gaussian mixture model clustering to isolate HFO events from other activities. The spatial distribution of HFO clusters was correlated with the seizure onset channels identified by neurologists in seven patient with good surgical outcome. Main results. The overlapping rates of localized channels and seizure onset locations were high in all states. The best result was obtained using the iEEG data during sleep, achieving a sensitivity of 81%, and a specificity of 96%. The channels with maximum number of HFOs identified epileptogenic areas where the seizures occurred more frequently. Significance. The current study was conducted using iEEG data collected in realistic clinical conditions without channel pre-exclusion. HFOs were investigated with novel features extracted from the entire frequency band, and were correlated with SOZ in different states. The results indicate that automatic HFO detection with unsupervised clustering methods exploring the time frequency content of raw iEEG can be efficiently used to identify the epileptogenic zone with an accurate and efficient manner.