fix api query