The harmful effects of Cryptosporidium oocysts and Giardia cysts in drinking water have been widely concerned by the international community. Currently, the EPA1623 method is one of the most mature and authoritative methods for detecting Cryptosporidium oocysts and Giardia cysts internationally. However, this method has the limitations of high cost of time and human labor. Based on ultrashort pulse time-space-frequency mapping principle, ultrafast time-encoded flow imaging can reach high speed and high resolution. Therefore, it is proposed for replacing the last three steps of EPA1623, which are immunomagnetic separation, fluorescent staining and enumeration. Specifically, mixed with immunomagnetic beads, the liquid quality sample of Giardia cysts and Cryptosporidium oocysts flow through the microfluidic channel with high throughput of 100 particles/s. With ultrafast time-encoded flow imaging system, images are acquired including oocysts and cysts which are magnetized by attachment of magnetic beads or not, and only magnetic beads. Extracted appearance and shape features, images are classified by K-means cluster algorithm. It is shown in results that, ultrafast time-encoded flow imaging method costs less than 10 minutes and maintains recovery at more than 80%, compared to the last three steps in EPA1623 which need almost 2 hours at less recovery. The proposed method makes full use of the biological properties of immunomagnetic beads, Cryptosporidium oocysts and Giardia cysts, and maintains high percent recovery with much shorter detection time.