This paper studies the target searching problem using swarms of unmanned aerial vehicles (UAVs) in unknown environments which information is unknown to the UAVs, other than features they detect through their sensors. Effective decision and control methods are required for UAVs that consider their limitations and characteristics when confronted with target searching problems. A cooperative target searching method is proposed for swarm UAVs based on an improved bean optimization algorithm (BOA) called Robot Bean Optimization Algorithm (RBOA). Compared with conventional BOAs used for optimal computation, RBOA has two main modifications for the cooperative control of swarm robots: 1) it accounts for the free motion space of individual UAVs using a Thiessen polygon; and 2) it adds a free space search mechanism to improve the efficiency of target searching. Based on the above improvements, and by integrating a multi-phase search mechanism and scheduling control strategy, a swarm UAV collaborative search simulation platform is built for experimental purposes. The results obtained from search simulations show that the RBOA can outperform adaptive robotic particle swarm optimization (A-RPSO) in target searches in complex and unknown environments, especially with fewer evolutionary generations and smaller numbers of robots. The RBOA, which is inspired by plant population evolutionary patterns, has fast and effective search capabilities, distributed collaborative interaction, and emergent swarm intelligence. It provides new ideas and support for research into the control of swarm UAVs and swarm robots.