Source-independent quantum networks are considered as a natural generalization to the Bell scenario where we investigate the nonlocal properties of quantum states distributed and measured in a network. Considering the simplest network of entanglement swapping, recently Gisin et al. [Phys. Rev. A 96, 020304(R) (2017)10.1103/PhysRevA.96.020304] and Andreoli [New. J. Phys. 19, 113020 (2017)10.1088/1367-2630/aa8b9b] independently provided a systematic characterization of the set of quantum states leading to violation of the so-called bilocality inequality. In this work, we consider the complexities in quantum networks with an arbitrary number of parties distributed in chain-shaped and star-shaped networks. We derive the maximal violation of the "n-local"inequality that can be achieved by arbitrary two-qubit states for such chain- and star-shaped networks. This would further provide a deeper understanding of quantum correlations in complex structures. © 2020 American Physical Society.