The electronic structures and topological properties of transition metal dipnictides $XPn_2$ ($X$=Ta, Nb; $Pn$=P, As, Sb) have been systematically studied using first-principles calculations. In addition to small bulk Fermi surfaces, the band anticrossing features near the Fermi level can be identified from band structures without spin-orbit coupling, leading to nodal lines in all these compounds. Inclusion of spin-orbit 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 non-trivial giving rise to surface states. As an example, we presented the surface-direction-dependent band structure of the surfaces states in TaSb$_2$.