An adaptive particle swarm optimization(APSO) algorithm is presented to solve the problem that the standard particle swarm optimization(PSO) algorithm is easy to fall into a locally optimized point, where inertia weight is nonlinearly adjusted by using population diversity information. Velocity mutation factor and position interchange factor are both introduced. The APSO algorithm thus improves its solvability for global optimization to avoid effectively the precocious convergence. The new algorithm is applied to reactive power optimization of the standard IEEE-30-bus power system as instances, and the simulation results show the effectiveness and feasibility of APSO algorithm for the reactive power optimization. It is proved to be efficient and practical during the reactive power optimization.