The onset ages of anti-GABABR, anti-LGI1 and anti-CASPR2 encephalitis were relatively older compared to anti-NMDAR encephalitis, and men accounted for more cases. Here, CNTNAP2 is linked to viral encephalitis.