A hybrid Power Series (PS) and Cuckoo Search via L´evy Flights (CS) optimization algorithm (PS-CS) method is utilized to obtain a solution for the deflection and pull-in instability of a nano cantilever switch in the presence of the van der Waals attractions, electrostatic forces and fringing filed effects. In order to obtain a relation for deflection of the beam, a trial solution including adjustable coefficients, satisfying the boundary conditions of the governing, is proposed. The cuckoo search optimization algorithm is executed to find the adjustable parameters of the trial solution satisfying the governing equation of the nanobeam. The results are compared with the available results in the literature as well as numerical solution. The results indicate the remarkable accuracy of the present approach. The minimum initial gap and the critical free standing detachment length of the nano actuator that does not stick to the substrate due to the van der Waals attractions, as an important parameter in pull-in instability of the nano switches, is calculated. Utilizing the results of the PS-CS, the stress distribution inside the nano actuator is determined at the onset of the pull-in instability.