Fixed api url generator