
The electronic structures and topological properties of transition metal dipnictides $XPn_2$ ($X$=Ta, Nb; $Pn$=P, As, Sb) have been systematically studied using firstprinciples calculations. In addition to small bulk Fermi surfaces, the band anticrossing features near the Fermi level can be identified from band structures without spinorbit coupling, leading to nodal lines in all these compounds. Inclusion of spinorbit coupling gaps out these nodal lines leaving only a pair of disentangled electron/hole bands crossing the Fermi level. Therefore, the low energy physics can be in general captured by the corresponding two band model with several isolated small Fermi pockets. Detailed analysis of the Fermi surfaces suggests that the arsenides and NbSb$_2$ are nearly compensated semimetals while the phosphorides and TaSb$_2$ are not. Based on the calculated band parities, the electron and hole bands are found to be weakly topological nontrivial giving rise to surface states. As an example, we presented the surfacedirectiondependent band structure of the surfaces states in TaSb$_2$.