Let V∈Q(i)(\a1,…,\an)(\q1,\q2) be a rationally parametrized planar homogeneous potential of homogeneity degree k=−2,0,2. We design an algorithm that computes polynomial \emph{necessary} conditions on the parameters (\a1,…,\an) such that the dynamical system associated to the potential V is integrable. These conditions originate from those of the Morales-Ramis-Simó integrability criterion near all Darboux points. The implementation of the algorithm allows to treat applications that were out of reach before, for instance concerning the non-integrability of polynomial potentials up to degree 9. Another striking application is the first complete proof of the non-integrability of the \emph{collinear three body problem}.