Working in a given conformal class, we prove existence of constant Q-curvature metrics on compact manifolds of arbitrary dimension under generic assumptions. The problem is equivalent to solving a nth-order non-linear elliptic differential (or integral) equation with variational structure, where n is the dimension of the manifold. Since the corresponding Euler functional is in general unbounded from above and below, we use critical point theory, jointly with a compactness result for the above equation.