save queries with api