This paper addresses, from a heuristic point of view, the problem of the optimal location and sizing of distributed generators (DGs) in alternating-current distribution networks with radial topology. A master–slave optimization approach is followed to place and size the DGs. In the master stage a simple recursive seach method based on sequential searching is proposed. In the case of the slave algorithm, we present an emerging metaheuristic for solving the optimal power flow problem. This metaheuristic is called the vortex search algorithm. It works with a Gaussian distribution and a variable radius function for exploring and exploiting the solution space. Numerical simulations of 33-and 69-node test feeders show its efficiency, simplicity and robusteness in comparison to other methods in the literature. © 2019, World Scientific and Engineering Academy and Society. All rights reserved.