beautify extended query apis