Teratogenicity is one of the main concerns in clinical medications of pregnant women. Prescription of antiseizure medications (ASMs) in women with epilepsy during pregnancy may cause teratogenic effects on the fetus. Although large scale epilepsy pregnancy registries played an important role in evaluating the teratogenic risk of ASMs, for most ASMs, especially the newly approved ones, the potential teratogenic risk cannot be effectively assessed due to the lack of evidence. In this study, the analyses are performed on any medication, with a focus on ASMs. We curated a list containing the drugs with potential teratogenicity based on the US Food and Drug Administration (FDA)-approved drug labeling, and established a support vector machine (SVM) model for detecting drugs with high teratogenic risk. The model was validated by using the post-marketing surveillance data from US FDA Spontaneous Adverse Events Reporting System (FAERS) and applied to the prediction of potential teratogenic risk of ASMs. Our results showed that our proposed model outperformed the state-of-art approaches, including logistic regression (LR), random forest (RF) and extreme gradient boosting (XGBoost), when detecting the high teratogenic risk of drugs (MCC and recall rate were 0.312 and 0.851, respectively). Among 196 drugs with teratogenic potential reported by FAERS, 136 (69.4%) drugs were correctly predicted. For the eight commonly used ASMs, 4 of them were predicted as high teratogenic risk drugs, including topiramate, phenobarbital, valproate and phenytoin (predicted probabilities of teratogenic risk were 0.69, 0.60 0.59, and 0.56, respectively), which were consistent with the statement in FDA-approved drug labeling and the high reported prevalence of teratogenicity in epilepsy pregnancy registries. In addition, the structural alerts in ASMs that related to the genotoxic carcinogenicity and mutagenicity, idiosyncratic adverse reaction, potential electrophilic agents and endocrine disruption were identified and discussed. Our findings can be a good complementary for the teratogenic risk assessment in drug development and facilitate the determination of pharmacological therapies during pregnancy.